File size: 2,530 Bytes
465acf2
 
 
 
 
 
 
 
 
9b342e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
be5e9cf
 
 
9b342e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f13b374
9b342e6
9a55a58
 
 
 
 
9b342e6
 
 
 
f13b374
 
 
 
 
 
 
 
08dafcc
 
f13b374
 
 
 
 
 
 
 
 
 
9b342e6
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
license: apache-2.0
language:
- en
metrics:
- accuracy
pipeline_tag: image-classification
tags:
- climate
---

## Model description

This is a transformers based image classification model, implemented using the technique of transfer learning.
The pretrained model is [Vision transformer](https://huggingface.co/google/vit-base-patch16-224) trained on Imagenet-21k.

## Datasets

The dataset used is downloaded from git repo [Agri-Hub/Space2Ground](https://github.com/Agri-Hub/Space2Ground/tree/main).
I used Street-level image patches folder for this model. It is a dataset containing cropped vegetation parts of 
mapillary street-level images. Further details are on the linked git repo.

### How to use

You can use this model directly with help of pipeline class from transformers library of hugging face

```python

>>>from transformers import pipeline
>>>classifier = pipeline("image-classification", model="iammartian0/vegetation_classification_model")
>>>classifier(image)

```
or

uploading a target image to Hosted inference api.

## Training procedure



### Preprocessing

 Assigining labels based on parent folder names

### Image Transformations

Applied RandomResizedCrop from torchvision.transforms to all the training images.

### Finetuning

Model is finetuned on the dataset for four epochs

## Evaluation results

Model acheived an Top-1 accuracy of 0.929.

## Further exploration to do
 - Trainig a multilabel model where model can find if the image is from left side or right side
   on top of classifying the vegetation
 - Fine grained classification of crop labels using Raw/Initial set of street-level images


### BibTeX entry and citation info

```bibtex
@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}
}
```
```bibtex

@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}
}
```