This project simply classifies whether image is Anime or Reality
- Python 3.10.9
- torch 1.13.1
- torchvision 0.14.1
Install requirements
pip install -r requirements.txt
-
I get my data from various resource on internet. You can use your own data or crawl from internet.
-
Data in this format
|-- data
|-- train
| |-- class 1
| |-- class 2
| `-- ...
`-- valid
|-- class 1
|-- class 2
`-- ...
Modify config in ./cfg/config.yaml
or create your own .yaml
config file with the same format.
Simply run
python train.py --cfg ./cfg/config.yaml
Some experiment results
Model | Accuracy | Confusion Matrix | Pretrained | Model size |
---|---|---|---|---|
SqueezeNet1.1 | 99.34% | Model | 4.74MB | |
EfficientNet V2 Small | 99.71% | Model | 82.74MB |
You can download weight file above and put in weights
folder and run inference
python infer.py
Anime | Reality |
---|---|
You can try on your own 😉