This model is for image classification for the Standford Cars dataset. Data set can be downloaded here.
In order to reproduce my training and inferrinf process, please make sure the packages listed in requirement.txt are installed.
- Ubuntu 18.04.5 LTS
- Intel® Xeon® Silver 4210 CPU @ 2.20GHz
- NVIDIA GeForce RTX 2080 Ti
To reproduce my submission without training, do the following:
Install all the requirments sepcified in requirments.txt
pip install -r requirments.txt
The data should be placed as follows:
repo
+- training_data
| +- 000001.jpg
| +- 000002.jpg
| +- ...
|
+- testing_data
| +- 000004.jpg
| +- 000005.jpg
|
+- training_labels.csv
+- train.py
+- infer.py
+- weights.pth (needed for inference)
| ...
Where training_data folder contains all the training images, and testing_data folder contains all the testing images. The training_labels.csv file should contain the file name and corresponding label of each image in training_data folder. Please check training_labels.csv to see the expected format.
To train, simply run the train.py file. weights.pth file should be created beside train.py. The batch_size is set to be 12. Make it smaller if memory is not sufficent.
for inference, please download the weights file here and put it beside infer.py. Simply run infer.py and a csv file named testing_labels.csv containing images file names and their corresponding predictions will be created.