/dogorcat

Image Classifier with PyTorch. You can train more to become more confident.

Primary LanguageJupyter Notebook

dogorcat

Image Classifier with PyTorch.

Use Anaconda to setup environment

https://pytorch.org/

Run this command:

conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia

Setup other package along the way.

After activate the environment. Run Jupyter Notebook by using anaconda navigate.

Unzip the data set to train the model.

At the train(model):

you can change the:

num_of_epochs = 300

to 400 or more to become more accurate.

Then change the load model here:

model.load_state_dict(torch.load("models/model_ep299.pth"))

Resize the image to 256 pixel

RESULT:

image

image

image

Explain the code:

https://blog.paperspace.com/object-localization-using-pytorch-1/

https://blog.paperspace.com/object-localization-pytorch-2/