yulei1234 / fine_grained.pytorch

This is a PyTorch implementation of Kaggle's Cassava Disease Visual Classification challenge (5th place in private leaderboard)

Home Page:https://www.kaggle.com/c/cassava-disease/leaderboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Visual classification on cassava disease dataset of Kaggle

This is the implementation of Cassava Disease Fine-Grained Visual Classification Challenge, 5th place entry on Kaggle https://www.kaggle.com/c/cassava-disease

Networks used in this repository are PyTorch official implementations or from https://github.com/Cadene/pretrained-models.pytorch, with small alterations.

Requires pytorch >= v1.0.0

Download cassava disease dataset from https://www.kaggle.com/c/cassava-disease/data and put it into the root directory ${ROOT}

Your directory tree should look like this:

${ROOT}
├── cassava
| ├── train
| | ├── cbb
| | ├── cbsd
| | ├── cgm
| | ├── cmd
| | ├── healthy
| ├── test
| | ├── 0
| ├── extraimages
| | ├── 0
├── dataloaders
├── networks
├── utils
├── config.py
├── main.py
└── README.md

Training and Testing

Train your model with inception v4 network using input image resolution 560, batch size 16 with:

python main.py --arch inceptionv4 --model_input_size 560 --batch_size 16

---o---

If you want to resume training from a checkpoint, you can use:

python main.py --arch inceptionv4 --model_input_size 560 --batch_size 16 --resume_path <path_to_pth_file>

---o---

Test your trained model from a checkpoint file using:

python main.py --arch inceptionv4 --model_input_size 560 --batch_size 16 --train False --test true --resume_path <path_to_pth_file>

---o---

Use validation by splitting training data using:

python main.py --arch inceptionv4 --model_input_size 560 --batch_size 16 --validate true --train_percentage 0.8

---o---

About

This is a PyTorch implementation of Kaggle's Cassava Disease Visual Classification challenge (5th place in private leaderboard)

https://www.kaggle.com/c/cassava-disease/leaderboard


Languages

Language:Python 100.0%