Competition URL: https://aidea-web.tw/topic/93c8c26b-0e96-44bc-9a53-1c96353ad340
Private Leaderboard: 3 / 428 (Top 1%)
- Clone this repo to your local
git clone https://github.com/come880412/crop_classification
cd crop_classification- 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- 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
imagesand the filesubmission_example.csv.
- After preparing the data by those mentioned above, you could use the script
train.shto train the model from scratch. Please see more detail in this script if you want to train your model.
bash train.sh-
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