- Colab Demo Link: https://colab.research.google.com/drive/1ox_6ci-s-CTuOB7bGSD-VMFPJ_y45LEQ?usp=sharing
- Timing: 0.083s per image
- python >= 3.6.0
- torch >= 1.7
Example using Anaconda:
conda create -n hw2_demo python>=3.6.0
conda activate hw2_demo
conda install pytorch>=1.7 torchvision cudatoolkit={your cuda version} -c pytorch
make install
make getdataset
This script download training data from TA's google drive, and arrange it into COCO format.
I also host a preprocessed annotation file in my own google drive, so the .mat
file is ignored.
make reproduce
This will download model weights from my google drive and reproduce answer.json
make train
If the training is interrupted, you can resume the training by:
cd yolov5/ && python train.py --resume
The training result will be stored in the ./yolov5/runs/train/exp
directory.
(If you want to restart the trainning, you need to rename or delete the directory.)
To visualize the training result, you can use the following command:
tensorboard --logdir=./yolov5/runs/train/exp
Test the model by running the following command:
make inference
This will use the best model in the ./yolov5/runs/train/exp
directory by default.
You can also specify the model by:
cd yolov5/ && python inference.py --model_path={path to the model}