Model description
This is a CNN model which was trained on Cats vs Dogs images. All cat images contained a watermark in the left bottom corner. This way, the classifier didn't learn the true patterns, but learned these watermarks on cat images.
- 3 conv blocks (Conv2d + BatcnNorm2d + Pooling layer)
- 3 fully connected layers
- ReLU activations, dropout layer, and fully-connected layer
Parameters
- Criterion: CrossEntropyLoss
- Optimizer: Adam (lr = 0.001)
- Epochs: 20
Training results
- Training accuracy: 99.12%
- Training loss: 0.0308
- Validation Accuracy: 97%
- Validation loss: 0.1264
Post-model analysis
- Accuracy on cat with watermarks images: 96.65%
- Accuracy on dog images: 98.57%
- Accuracy on cat without watermarks images: 0.0%
Dataset
- For training, 500 images of cats with watermarks, and 500 images of dogs were used. Available here: https://huggingface.co/datasets/dklpp/biased-cats-dog-dataset
- For post-model analysis: 5000 images of cats with watermarks, 5000 images of dogs, 5000 images of cats without watermarks.
Conclusion
Model learned to detect the watermark in the left bottom corner, and if there is not such watermark on an image (even if it's a cat's image), it will classify it as a dog. The training script is loaded in this directory, you can use it for your own experiments. Such tools as saliency maps, and other explainable AI neural network classificators prove that the left bottom corner region is the most important. Later on these experiments will be available on GitHub.
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support

