Skip to content

come880412/crop_classification

Repository files navigation

Crop_classification

Competition URL: https://aidea-web.tw/topic/93c8c26b-0e96-44bc-9a53-1c96353ad340
Private Leaderboard: 3 / 428 (Top 1%)

Getting started

  • Clone this repo to your local
git clone https://github.com/come880412/crop_classification
cd crop_classification

Data preprocessing

  • First, download the dataset from the official. And put all the data into a director, named ../dataset/Original. Then use the following command to resize the images into 1024 * 1024 and split the data into train/valid sets.
python preprocessing.py

Inference

  • First, download the pretrained models from here. And put the models into the director ./checkpoints. Then use the following command to do model inference (You may need to change the dataset path on your own).
python test.py --root path/to/public_data
  • In the public data folder, it should contain the directory images and the file submission_example.csv.

Training

  • After preparing the data by those mentioned above, you could use the script train.sh to train the model from scratch. Please see more detail in this script if you want to train your model.
bash train.sh

Grad-cam visualization

  • After training, we used grad cam to visualize where the model focuses. The visualization results are shown below. | |

  • These results show that our model learns the most important features in the corresponding class, instead of overfitting on some unimportant features.

  • If you have any questions, feel free to send me an email! come880412@gmail.com

About

Competition for 2022 AI Cup "農地作物現況調查影像辨識競賽 - 春季賽:AI作物影像判釋"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors