CNN from scratch. (Using Eigen and OpenCV).

Project Overview and Inspiration.

The inspiration of this project was drawn from wanting to learn what really goes on under the hood when carrying out Convolutional Neural Network operations when using powerful API's such as TensorFlow and Pytorch. Taking an interest in machine learning, my very first machine learning project (which didnt go very well) was object detection for detecting different types of characters in a game. Even though I was doing further research on my own as to how these API's functioned, I couldnt quite get the gist of it. I then decided what better way to learn something than to create something on your own. I have always been a practical learner anyway!

The first stages when I began building one were extremely challenging. Errors ranging from matrix size mismatches, matrix transpose errors, mis-application of derivative calculations to name afew. I did not give up though because I knew if I got through this I would definitely be able to apply machine learning to any application problem(if applicable of course.). Moreover, im in the works of a new project which applies the knowledge I learnt coupled with the Pytorch API so stay tuned! After working on the project for quite a while, it got way easier and eventualy I broke even! I even managed to implement hyperparameter features such as strides and padding. A demonstration of the network in action can be seen in the video below. The main purpose of this simple convolutional neural network was to detect the difference between cats and dogs.



Overall network cost is seen to drop as it begins to correctly identify the image with increased accuracy.

Projects Source Code and Resources.

I included all the links to the resources I went through on the following link: https://github.com/Kikumu/Neural-networks-

Tools Used

  • C++ code base.
  • Eigen library.
  • OpenCV library.