Cats are a joke of ResNet50

Last updated: June 3, 2020

After implementing GradCAM with ResNet50 pre-trained on ImageNet for Dogs vs Cats data on Kaggle, I found something funny about cats. (just for fun)

See more details of my implementation in this Kaggle Notebook

What I did:

  • Took ResNet50 model trained on ImageNet, made prediction with dog and cat images and observed GradCAM
  • Did transfer learning with ResNet50 on dogs & cats data by taking out its top layer on ImageNet and add my own output layer with two nodes for classification of dogs & cats.
  • Observe GradCAM with the trained model on dogs and cats data. The last convolution layers were still generated by RestNet50 weights on ImageNet.

Cats always think that they have a super power to rule the world until one day they meet ResNet50 guy who doesn’t know who cats are.

Ok, I’m fine if you are 95% sure that I’m a Koala koala-cat

But wait, what? Among 1000 classes, you still think I am most probably a dog? Feeling underestimated! dog-cat

How dare you ignore me in the corner and just look at that boring bucket??? bucket_cat

It’s too much! I can’t stand it. I am lying here like a God and you dissolve me in the doormat. doormat

Note: I forgot to convert heatmap from BRG to RGB so the GradCAM should be maximum for cold colors.

But at the end of the day, hoooman is the species who broke cats’ heart when finally ResNet50 recognized one cat sticker but hooman labelled it as a dog.

hooman

Note: This time I converted heatmap from BRG to RGB so the GradCCAM should be maximum for hot colors.

Written on June 3, 2020