If I were a dog

The winter is over and the summer is here now. Outdoor activity such as camping, desert off-roading are not anymore preferable choices to spend a day at this time. It is pretty hot outside. If you put an egg on the top of your hat, it may be transformed into a boiled egg.

However, a weekend will always be a wonderful weekend. I can always find out some interesting activity to enjoy the day indoor such as singing or learning something.

This weekend, I'm trying to do some practice on Computer Vision with Machine Learning. The goal of this project is to build a machine that can guess the breed of a dog when a picture of a dog is given.

Deep Learning is the choice that I made to teach the Machine to learn the pattern. By having a dataset that can be downloaded from one of the course in Udacity, I build a CNN (Convolution Neural Network) by utilizing some previously trained model with Transfer Learning.

I compared several networks to see the performance. Among the four networks, which are VGG-19ResNet-50Inception and Xception, I figured out that Xception give me the best performance with Accuracy 86%.

I tested this Machine with several dog pictures and the results are quite amazing.
Here are some of the examples that I tested,






















Both of the prediction above looks pretty accurate to me.

I actually doesn't have enough knowledge about dog breed. At this point, I'm sure that the Machine that I trained is already much clever than me in recognizing a dog breed. If you had sent the pictures above to me, I would not be able to tell you the breed without googling or asking my Machine Learning.

However, just like a human, sometime a machine can make a mistake as it doesn't have enough or proper knowledge to tell the difference. It can also make mistake to guess something that is unusual or having different pattern than others.



A cat that was detected as a human
The cat below were recognized as a human. It's probably because the cat is sitting in a position in such a way that we couldn't see the shape of the body. The machine might have thought that this was a human with a hairy face.

Other mistake was when I fed the machine with a dog that doesn't looks like a dog.



As you can see above, the dog looks like a tiger. I myself am not entirely sure that the dog above is a dog with real color or not as I only found the picture on the Internet.


Furthermore, to make this project more interesting, I'm also interested to see what I would be if I were a dog. Therefore, I feed the machine with several pictures of me.

And here are some examples of them,






Apparently, I were recognized as several different breed of dogs. I'm probably a crossbreed so the machine told me that I were on a different breed for a different picture, especially the last one that looks pretty much different with the other twos since I had more hair in my face on the last picture.

There are several ideas are firing up in my head now for the next projects anyway but I ended up this project at this point.

Comments