A cat recognizer works wrong in which pictures?
2018-03-01 23:33:51
I took a break from my busy schedule and finished the first DL course on Coursera in a few days.
Although it took almost 10 months to learn ML before, it has been a year, and there is really not much I can remember.
The Project of this course is very interesting, a Cat Recognizer.
Andrew Ng said that deep learning and Cat are inseparable, so our Programming Assignment is it, a Cat Recognizer!
Dataset
In the fourth week, the Project completed the entire Neural Network, L-layer Neural Network, 209 training samples, and 50 test samples which each sample is a 64*64 image, imported in h5 format
The image vectorization process is as follow:

L-Layer Neural Network
The Architecture is as follow:

Compared with the 100% accuracy on training data and 72% accuracy on test data of the 2-layer shallow neural network, the L-layer reduces overfitting on the training data and only achieves 98.56% accuracy. But the accuracy on test data has risen to 80%.
Which means, 10 of the 50 images in the test data are classified incorrectly, and the recognition rate of the entire network is relatively poor.
However, the ReLU and Sigmoid functions used by the activation function are relatively simple activation functions, and it is very good to achieve this accuracy.
Incorrectly classified images
The final optional assignment is still to add my own pictures for test, so I found a few interesting pictures to try to confuse the neural network. As far as these pictures, even people can not define that they are cats or not (≖ᴗ≖)✧.
-
1st: A character in FGO game

Prediction:

-
2nd: Still this character but with different clothes

Prediction:

-
3rd: Still this character but with different clothes

Here comes the strange result, the neural network thinks this one is a cat, and the first two are not ( • ̀ω•́ )✧
Prediction:

-
4th: A Tigger

Prediction: no trick

-
5th: A little tigger

Prediction: tricked (・v・)

-
6th: A little lion (panther?)

Prediction: tricked.

-
7th: A cat-shaped plush toy

Prediction: tricked

-
8th: A lovely cat

Prediction: Haha, this picture is missing the most important feature of a cat, the ears, so NN thinks it's not a cat (funny

Conclusion
Although I didn't look at the 209 training data, I can probably guess some important features. Of course, the features I pointed out are based on our vision.
- whether the picture has cat ears
- whether the picture has cat furry claws
- The animal face of the picture
Considering that several cat pictures in the test data are also identified incorrectly, the background of similar color to the cat will lead to the classification error, and the overall color of the picture will also affect the recognition result.
If you have more interesting pictures that you want to try, you can leave pictures in the comments.