1
$\begingroup$

I'm studying convolutional neural networks from the following article https://ujjwalkarn.me/2016/08/11/intuitive-explanation-convnets/.

If we take a grayscale image, the value of the pixel will be between 0 and 255. Now, if we apply a filter to our "new image", can we have pixels whose values are not included in this range? In this case, how can we create the convolved image?

$\endgroup$
0
$\begingroup$

The convolved image can be considered a feature map, where each new neuron represents some indication (or lack-there-of) of a feature in some receptive field of the original image, so no it does not need to be a valid image in the output.

If you specifically care for it to be an image as an output, you can do a couple of things:

1) normalize the produced feature map to some set range that youre working in (0-255 or 0-1)

2) make the filter a valid probability distribution, and you know the output will stay in the same range as the input (ex: Gaussian filters)

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for the answer. Another question: in figure 9 it is written:" Black=negative" What has the author done in this case? Black was 0 pixel value before and then he claim that black pixels are negative pixel values. Why? $\endgroup$ – MementoMori May 20 '19 at 16:30
  • $\begingroup$ @MementoMori black was 0 when referring to just drawing an image in RGB space was the context he made the comment earlier, but now youre in a feature space (not 0-1 / 0-255), so when drawing it, for simplicity he mapped all negative values to 0 (black in RBG) and positive to 1 (white in RGB) just to give you a visual. He then uses the RELU (relu(x) = max(0, x)) to eliminate all negative values to show you how the feature map looks afterwards. $\endgroup$ – mshlis May 21 '19 at 15:09
0
$\begingroup$

I think normalisation into range 0-1 is needed or at least to 5-10 cliping because the values will become astronomical after many layers. Convolved image has a vector of features for each pixel. Take a RGB for example -> each color is a feature in one pixel, the next map will be like 'horisontal line, vertical line, circle' for one pixel surroundings.

| improve this answer | |
$\endgroup$

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.