The baseline is a reference method for the final exam of machine learning course.
we use /python3.7 /torch 1.4.0+cpu /torchvision 0.5.0+cpu for training and evaluation. You can install the pytorch1.4.0 by using this.
conda install pytorch==1.4.0 torchvision==0.5.0 cpuonly -c pytorchBy the way, you can also use the pytorch with cuda to train this baseline.
You need to create the ./data/ folder and put the ./mini_nico/train and ./mini_nico/test in Mini-NICO dataset to the ./data/ directory like
data
βββ train
βΒ Β βββ cat
βΒ Β βββ cow
βΒ Β βββ ..
βββ test
βΒ Β βββ 1.jpg
βΒ Β βββ 2.jpg
βΒ Β βββ ..
You can use the following command to split the val data from the train data.
# split the val from the train data and train : val = 7:3
cd utils
python split_eval_from_train_data.py You can use the following command to run for training.
# you can choose the model such as resnet18, resnet34, resnet50, resnet101
python trainer.py --arch=resnet18If you want to train the method with gpu, you can do this.
# you can choose the model such as resnet18, resnet34, resnet50, resnet101
python trainer.py --arch=resnet18 --gpuYou can use the following command to run for testing.
# you can choose the model such as resnet18, resnet34, resnet50, resnet101
python test.py --arch=resnet18 --ckpt=your model pathIf you want to test the method with gpu, you can do this.
# you can choose the model such as resnet18, resnet34, resnet50, resnet101
python test.py --arch=resnet18 --ckpt=your model path --gpuAfter that, you can get the test.csv in the root path ./. And then upload your result to our Mini_NICO_Leaderboard.