What are neurons computing in face recognintion?

{{{{{
In the first hidden layer, you might find one neuron that is looking for the low vertical line or a vertical edge like that. A second neuron looking for an oriented line or oriented edge like that. The third neuron looks for a line at that orientation, and so on. In the earliest layers of a neural network, you might find that the neurons are looking for very short lines or very short edges in the image
}}}}}

so does the first neuron looks for a low vertical line at a particular position or at any position.does it check for low vertical positions at all positions.i understand its looking for a vertical line,but where does it looks?if its at a particular position? there can be a vertical line at some other position p2 also,so is there an other neuron looking for low vertical line at p2? is each neuron linked to a specific positon ?

Hi @karra1729,

It looks for the straight line features across the whole image.

Raymond

but looking across whole image is convolutional neural network right?for ex,take a simple ANN if there is a data set of input image size 400X200 and number 1 is there only in the right half(right 200X200) of the image for every example in training set.if I give a input with 1 in left half(left 200X200),it cant recognize right? a CNN can but a ANN shouldn’t be right?

First, from the bottom of this slide that you shared, if you look at the source, it is about convolutional network, so my previous answer is based on that assumption.

Second, convolutional network can detect features across a photo because some of its neurons (filters) scan progressively through the whole photo, so it is more location independent.

Third, for ANN, or a neural network that we have learnt in this MLS, its neuron is not scanning through the photo, rather, each of the neuron’s weights is fixed to a pixel of the photo, so a neuron is still able to work on the whole photo, and to detect any features from the whole photo, just not in the same way as CNN does.

Raymond

Hi!

Yes! Convolutional Neural Networks work well for image classification and are a specific type of Artificial Neural Network.

If you would like to know more about how CNNs try to represent the world I would suggest taking a look at Chris Olah’s blog! Feature Visualization

3 Likes

The blog looks very interesting and illustrative! Thanks for sharing @SamReiswig!!

1 Like

yeah, got it, sir,. and also in my above example will ANN be able to predict if the input has “1” in the left half of the image and the training data set has “1” only in the right half of the image. I think it cant but maybe I’m missing something. also thank you sir for taking a great effort to explain in detail.

Hi @karra1729, as I said,

if some of the weights never see any part of a digit during the training process, you can’t expect those weights to learn any meaningful features. I suggest you to try it out yourself. You can find a mnist dataset, augment the photos so that the digits are always on the RHS of the photo, train a model, and predict some photos with digits all on the LHS.

1 Like