đ Vegetation Classification Model
This is an image classification model based on transformers, which uses transfer learning techniques. It can effectively classify vegetation in images, providing valuable insights for climate - related research.
đ Quick Start
You can use this model directly with the help of the pipeline
class from the Hugging Face transformers
library.
>>> from transformers import pipeline
>>> classifier = pipeline("image - classification", model="iammartian0/vegetation_classification_model")
>>> classifier(image)
Alternatively, you can upload a target image to the Hosted inference API.
⨠Features
- Transfer Learning: Implemented using transfer learning with a pre - trained Vision Transformer model.
- High Accuracy: Achieved a Top - 1 accuracy of 0.929.
đĻ Installation
No specific installation steps are provided in the original document.
đģ Usage Examples
Basic Usage
>>> from transformers import pipeline
>>> classifier = pipeline("image - classification", model="iammartian0/vegetation_classification_model")
>>> classifier(image)
đ Documentation
Model description
This is a transformers - based image classification model, implemented using the technique of transfer learning. The pretrained model is Vision transformer trained on Imagenet - 21k.
Datasets
The dataset used is downloaded from the git repo [Agri - Hub/Space2Ground](https://github.com/Agri - Hub/Space2Ground/tree/main). The Street - level image patches folder is used for this model. It is a dataset containing cropped vegetation parts of mapillary street - level images. Further details are on the linked git repo.
Training procedure
Preprocessing
Assigning labels based on parent folder names.
Image Transformations
Applied RandomResizedCrop
from torchvision.transforms
to all the training images.
Finetuning
The model is finetuned on the dataset for four epochs.
Evaluation results
The model achieved a Top - 1 accuracy of 0.929.
Further exploration to do
- Train a multilabel model where the model can find if the image is from the left side or right side on top of classifying the vegetation.
- Perform fine - grained classification of crop labels using the Raw/Initial set of street - level images.
đ§ Technical Details
- Model Type: Transformers - based image classification model.
- Training Data: Dataset downloaded from [Agri - Hub/Space2Ground](https://github.com/Agri - Hub/Space2Ground/tree/main), specifically the Street - level image patches folder.
| Property | Details |
|----------|---------|
| Model Type | Transformers - based image classification model |
| Training Data | Dataset from [Agri - Hub/Space2Ground](https://github.com/Agri - Hub/Space2Ground/tree/main), Street - level image patches folder |
đ License
This project is licensed under the Apache - 2.0 license.
BibTeX entry and citation info
@misc{wu2020visual,
title={Visual Transformers: Token-based Image Representation and Processing for Computer Vision},
author={Bichen Wu and Chenfeng Xu and Xiaoliang Dai and Alvin Wan and Peizhao Zhang and Zhicheng Yan and Masayoshi Tomizuka and Joseph Gonzalez and Kurt Keutzer and Peter Vajda},
year={2020},
eprint={2006.03677},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@INPROCEEDINGS{9816335,
author={Choumos, George and Koukos, Alkiviadis and Sitokonstantinou, Vasileios and Kontoes, Charalampos},
booktitle={2022 IEEE 14th Image, Video, and Multidimensional Signal Processing Workshop (IVMSP)},
title={Towards Space-to-Ground Data Availability for Agriculture Monitoring},
year={2022},
volume={},
number={},
pages={1-5},
doi={10.1109/IVMSP54334.2022.9816335}
}