0
$\begingroup$

I don't know if this is the right place to ask this question. If it is not, please tell me and I remove it.

I've just started to learn CNN and I'm trying to understand what they do and how they do it.

I have written some sentences to describe it:

  1. Let's say that CNN is a mathematical function that adjusts its values based on the result obtained and the desired output.

    • The values are the filters of the convolutional layers (in other types of networks would be the weights).
    • To adjust these values there is a backpropagation method as in all networks.
  2. The result obtained is an image of the same size as the original.

  3. In this image you can see the delimited area.

  4. The goal of the network is to learn these filters.

  5. The overfitting may be because the network has learned where the pixels you are looking for are located.

  6. The filters have as input a pixel of the image and return a 1 or a 0.

My doubt is:

In your own words, Have I forgotten something?

NOTE:

This is only one question. The six points above are affirmative sentences, not questions.

There is only one question mark, and it is on my question.

I have to clarify this because someone has closed my previous question because she/he thinks there were more than one question.

$\endgroup$
  • $\begingroup$ You missed my point. Although you ask only one question, your post is too broad. I could ask the question: "Is this info in this article of 100 pages correct?". That would be one question, but too broad. Do you understand now? As you can see from the given existing answer, your question "Have I forgotten something?" could not be answered with a "yes" or "no". $\endgroup$ – nbro Mar 11 at 12:25
2
$\begingroup$

To address your description point by point,

  1. There are many types of CNN architectures. You appear to be describing a fully-convolutional neural network built only from convolutional layers which is a very specialized type of network (typically used for segmentation tasks).

    • Most networks will include other layer types which have trainable parameters too, i.e. batch normalization layers or densely connected layers.
    • Yes, the training process operates on the same concept of error backpropagation.
  2. If the model is performing a segmentation task (or any task which requires a 1-to-1 mapping of individually classified pixels), then yes its typically the same size.

  3. The raw output of a fully-CNN is typically a probability map where each pixel is the probability between 0 and 1 of it being a member of the positive class. This is normally thresholded at 0.5 to obtain a binary mask which delimits the area of interest.

  4. In essence, yes. But it may be more accurate to say that the goal is to minimise the loss function (reduce the error) which is done by learning optimal filter weights.

  5. Overfitting is not about pixel location. In fact, CNNs are translationally invariant which means that the location of the feature has no impact on the output. There are some types of CNNs which take feature location into account but thats still not standard. Overfitting generally happens when a filter is an exact fit to a pixel patch, for example, the filter is no longer just looking for vertical lines but the exact pixel values of a section of vertical line in a specific image.

  6. No, each convolution of a 3x3 filter takes 3x3 pixels and it is convolved over the whole image which means that the filter output will likely be around the same size of the image depending on stride length, padding and dilation. Have a look at one of my other answers for more details.

| improve this answer | |
$\endgroup$
2
$\begingroup$

The 6th point is wrong. Filters do linear combination with group of pixels (depends on filter size) and move over the image and continue to do linear combination operation until it finishes the whole image. Please look at 2D convolution in CNN

I would explain CNN following way:

CNN is a kind of neural network that generally contains many convolutional layers and one or two fully connected layers. The purpose of the convolutional layers is feature extraction. Each of the convolutional layers contains many kernels. The purpose of the kernel is to extract different types of features. E. g. Edge, color, shape, and so on.

Finally, fully connected layers at the end of the network decide the output based on the features that were extracted by convolutional layers.

The advantage of CNN is that we can learn feature extraction kernels based training images. If you look earlier days of image processing. You can see the image processing community used convolution for feature extraction all the time. They were just using selective kernel for feature extraction. E. g. Sobel operator for edge detection.

| improve this answer | |
$\endgroup$
  • $\begingroup$ CNN uses different convolution than mentioned in the link. $\endgroup$ – DuttaA Mar 11 at 15:35
  • $\begingroup$ Sorry, I gave the link for convolution that is used among signal processing community. Although, it’s it’s same thing if you just skip mirroring the kernel. Now, I updated the link to another page. I hope the new one will help you. $\endgroup$ – Ta_Req Mar 11 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.