Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 2 KB

README.md

File metadata and controls

60 lines (40 loc) · 2 KB

kaggle-dogs-vs-cats-pytorch

Pytorch implementation for Dogs vs. Cats Redux: Kernels Edition, Kaggle competition. Modified from Image Classification with Pytorch. Homework of Deep Learning, UCAS course 081203M05009H.

Kaggle猫狗分类比赛的Pytorch实现, 修改自Image Classification with Pytorch, 中国科学院大学深度学习作业.

Requirements

  • Colab with P100 GPU and 27.2 gigabytes RAM
  • Python 3.7.10

Getting Started

Training on Colab

  1. Open training.ipynb on Colab.
  2. Create a new folder named kaggle-dogs-vs-cats-pytorch which should be located in /content/drive/MyDrive/kaggle-dogs-vs-cats-pytorch/ after being mounted.
  3. Create some folders in it so as to form the following file structure.
├── training.ipynb
├── model
├── result
└── data
    ├── dogs-vs-cats
    │   ├── *.jpg/*.png
    │   └── ...
    ├── hearthstone
    │   ├── *.jpg/*.png
    │   └── ...
    └── ...
  1. Find and classify some pictures to be tested into subfolders of /data/.
  2. Appropriately modify parameters like batch size, learning rate or epoch size.
  3. Run the code. Training and test results are demonstrated below respectively.

traning curve

Test with Pretrained Model

Run the following code in terminal. Check test results.

python test.py -d ./assets/dogs-cats/

dogs cats test

hearthstone test

License

MIT

Acknowledgments