Posts

Showing posts from January, 2018

Image Classification - Convolutional Neural Network using Keras

Image
Aim: The main purpose of this project is to classify images using Convolutional Neural Network. For this, the cat vs dog dataset will be used, which has 8000 training images (4000 each) and 2000 test images . 2 methods will be used and compared: a. Normal feed forward CNN b. Data (Image) Augmentation technique. To learn about how Convolutional neural network works,   Click here Data Augmentation explaination: This method works very well when the dataset is small, i.e. very less images to train our neural network. Just like our cat vs dog dataset, which has only 4000 images of dogs and cats each. In order to increase our training samples we can scrape through the internet collecting images. But this is very boring and expensive. Enter Data Augmentation technique, which does the work for us. It increases our training samples in very less time. Data/Image augmentation is the process of taking the images that are already in our training dataset and manipulating th...

Convolutional Neural Network Explained

Image
What are Convolutional Neural Networks ? Convolutional neural network  ( CNN , or  ConvNet ) is a class of deep,  feed-forward   artificial neural networks  that has successfully been applied to analyzing visual imagery. ConvNets have been successful in identifying faces, objects and traffic signs apart from powering vision in robots and self driving cars. The working of a CNN is very simple. We have an input image that goes into the convolutional neural network and then we get the output in the form of class labels. Example: This CNN has been trained to recognize facial expressions. As you can see, when there is a happy face, the CNN will output as happy and vice versa. The CNN works on the features of each image. After training it is able to give probabilities of each target class, i.e. say 80% happy or 90% sad.  How does a neural network able to recognize the features? Lets say we have a black & white image of  2x2 pixe...

How to minimize Cost function in Neural Networks?

Image
To learn about Artificial Neural Network,  Click Here The goal of a Neural Network is to minimize the cost function. Lower the cost function, closer the predicted value ( ลท ) is to the original value (y). Now, cost functions can be minimized by adjusting the weights. So, here we are going to  learn  how the weights are adjusted. Brute force approach: here we take a lots of different weights and select the  one  which gives the lowest cost function. Lets look at the graph below: This is a very simple approach. We set a bunch of weights and calculate the cost function for each one of them. The one with the lowest cost function is the best weight for the  given neural network. Problems: Curse of Dimensionality Suppose we have a very high-dimensional dataset, and all these dimensions (features)  are fitted to the 'n' numbers of neurons. That means the number of synapses will be a lot,  much much  higher, as opposed to the on...

Artificial Neural Network Explained

Image
What is an Artificial Neural Network (ANN)? An ANN is based on a collection of connected units or nodes called  artificial neurons  (analogous to biological  neurons  in an animal  brain ). Each connection (analogous to a  synapse ) between artificial neurons can transmit a signal from one to another. The artificial neuron that receives the signal can process it and then signal artificial neurons connected to it. The  neuron: basic building block of an ANN. Dendrites: receiver of signals for the neuron. Axon       : transmitter of signals from the neuron. Inputs and Outputs: Input Values: 1. They are independent to each other. 2. Needs to be standardized (mean 0 and variance 1). Output Values: 1. Continuous 2. Binary 3. Categorical - several output values. Note: All input values are given a weight and based on these weights signals pass through to the neuron. Weights are crucial to the ANN because...