0% found this document useful (0 votes)
4 views2 pages

Cat vs Dog Classifier with Transfer Learning

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Cat vs Dog Classifier with Transfer Learning

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Title: Transfer Learning - Cat vs Dog Classifier (Image Processing)

1. Task Definition:

- Classify images as either cat or dog.

- Use transfer learning due to small dataset size.

2. Pre-trained Model:

- ResNet18 (trained on ImageNet).

3. Load Dataset:

- Public datasets like Kaggle Dogs vs Cats or local image folders.

4. Preprocess the Data:

- Resize images to 224x224, normalize.

5. Prepare the Model:

- Replace final layer to output 2 classes.

- Freeze early layers, fine-tune final layers.

6. Training:

- Use CrossEntropyLoss.

- Optimizer: Adam with a low learning rate.

7. Evaluation:

- Evaluate accuracy on a test set.


PyTorch Code Sketch:

(See your notebook for full details.)

You might also like