Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

GnaneshKunal/dogs-vs-cats-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

dogs-vs-cats-classifier

Dogs vs Cats classification using Transfer Learning and PyTorch

DATASET

The dataset can be obtained from here

Model

The Convolutional Neural Network will be trained on ResNet18. Transfer Learning is used. A pretrained ResNet18 model is initialied as a fixed feature extractor and training a softmax classifier at the end.

Prediction



Note

The dataset must have the following directory structure:

root/dog/xxx.png
root/dog/xxy.png
root/dog/xxz.png

root/cat/123.png
root/cat/nsdf3.png
root/cat/asd932_.png

If you've trained and saved the model already, then comment the training phase to not to train the model again.

model_conv = train_model(model_conv, criterion, optimizer_conv,
                         exp_lr_scheduler, num_epochs=25)

Useful Links

Confusing the CNN



License

MIT License (MIT)