My play ground with image classification for Cifar100 dataset with various models
- first you need to get the package
$ git clone https://github.com/dolong2110/Cifar100-Classification.git
- Then make sure you are in right directory
$ cd Cifar100-Classification
- Install all the requirement packages
$ pip install -r requirements.txt
- finally train the model
$ python3 train.py --model resnet18 --image_size 32 --augmentation True
Notes here is that:
resnet18
is the model's name you can replace its with any available models in my package. For instance resnet152, mobilenet, etc.32
is the images' size. It is the default image size of the cifar100.True
here is whether we should augment data or not.
- self-implement cnn (basic_nn)
- linear regression (linear_regression)
- resnet9 (resnet9)
- resnet18 (resnet18)
- resnet34 (resnet34)
- resnet50 (resnet50)
- resnet101 (resnet101)
- resnet152 (resnet152)
- mobilenet (mobilenet)
- mobilenetv2 (mobilenetv2)
Model | Accuracy |
---|---|
basic_nn |
|
linear_regression |
|
resnet9 |
0.6188 |
resnet18 |
0.6405 |
resnet34 |
0.6479 |
resnet50 |
0.6133 |
mobilenet |
|
mobilenetv2 |
0.4572 |
add data augmentation
Model | Accuracy |
---|---|
basic_nn |
|
linear_regression |
|
resnet9 |
0.6375 |
resnet18 |
0.6739 |
resnet34 |
0.6909 |
resnet50 |
|
mobilenet |
0.4635 |
mobilenetv2 |
add epoch from 10 to 20
Model | Accuracy |
---|---|
basic_nn |
|
linear_regression |
|
resnet9 |
|
resnet18 |
|
resnet34 |
|
resnet50 |
|
mobilenet |
|
mobilenetv2 |