Where do CNN filters fit into this image?

  • 10 Replies
  • 541 Views
*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *************
  • Transformer
  • *
  • 2168
  • First it wiggles, then it is rewarded.
Where do CNN filters fit into this image?
« on: September 01, 2018, 04:51:39 pm »
See picture I drew. I'm trying to figure out where CNN filters fit in that image. I know about line detector filters that convolve the fed-in image and scan it for lines.

But if there is line filters, is there face filters?
And how many pixels in height or width is that face filter?
And is it at the start of my CNN I drew or near the end at classification?
And is it like well in the somas or on the connections or "floating around/guarding the whole layer"?

SO: Can someone take the pic I drew and put the (right size (only choose 1 cat face)) cat filter (IF there is face filters in CNNs!) and place it at the start or end of the net (; where it belongs) and lastly in or not somas where belongs? Also place the other 2 filters correctly.
Emergent

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *************
  • Transformer
  • *
  • 2168
  • First it wiggles, then it is rewarded.
Re: Where do CNN filters fit into this image?
« Reply #1 on: September 03, 2018, 12:06:28 am »
korrelan u there...
Emergent

*

Korrelan

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1114
  • Look into my eyes! WOAH!
    • YouTube
Re: Where do CNN filters fit into this image?
« Reply #2 on: September 03, 2018, 10:49:13 am »
Had my annual family BBQ this weekend, head hurts… and still finding random bodies around the house lol.  This gonna be a quick reply…

The diagram you drew is a standard feed forward NN, not a convolutional schema.  You would need one input neuron for each input image pixel, and max pooling layers.

The cat faces can’t be mapped to the diagram.

Quote
I'm trying to figure out where CNN filters fit in that image.

A CNN filter is applied to the input image to highlight certain types of features, lines, gradients, etc.  Because the CNN learns from these filtered input images the data embedded in the weights/ mathematics of the CNN also has/ reflects the filters.  The CNN is just learning from the convoluted input images, so its learned data is also convolved.

Quote
But if there is line filters, is there face filters?

Yes toward the end of the CNN schema there would be neurons that recognise faces, if the CNN was trained to do so.

Quote
And how many pixels in height or width is that face filter?

The face recogniser wouldn’t have a X.Y pixel format; it’s a neuron that has been triggered by the presence of two eyes, a nose and mouth, etc in the input image.  Once the input data passes the first few layers in the CNN it’s no longer recognisable to humans as an image, it’s now a mathematical representation of an image.

Quote
And is it at the start of my CNN I drew or near the end at classification?

Depending on your CNN’s design it would usually be toward the end.

Watch this video.



My head really hurts lol…

 :)
It thunk... therefore it is!... my project page.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *************
  • Transformer
  • *
  • 2168
  • First it wiggles, then it is rewarded.
Re: Where do CNN filters fit into this image?
« Reply #3 on: September 03, 2018, 01:07:27 pm »
Ok but still a simple question I must clarify and ask again;

The input image is convolved with the line detectors. Ok so far, I've seen this in videos. But is there a cat face filter?? (not talking about the net). How many pixels big is the cat face filter?

If there is only line filters.....then why?.....
« Last Edit: September 03, 2018, 05:13:49 pm by LOCKSUIT »
Emergent

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 961
  • Its nearly time!
Re: Where do CNN filters fit into this image?
« Reply #4 on: September 03, 2018, 04:01:30 pm »
(be careful here i might be wrong,  korrellan please correct me)
I actually dont know, cause my experience is elsewhere,   but i think the filters are used for all detections, they simplify the image, and the neural network is at the end of them - i think.

I actually dont know, im more of an associative array type guy.

*

Korrelan

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1114
  • Look into my eyes! WOAH!
    • YouTube
Re: Where do CNN filters fit into this image?
« Reply #5 on: September 03, 2018, 09:22:18 pm »
Quote
But is there a cat face filter?? (not talking about the net). How many pixels big is the cat face filter?

No… there is no actual predefined, ready made cat face filter in a CNN, that’s the whole point of the CNN, it builds a ‘cat face filter’ from the examples given to it.

Quote
If there is only line filters.....why.....

I’m trying to keep this simple without resorting to math lol.

There are many different types of CNN schemas, some apply a convolution as part of the sub sampling (3x3 pixels = 1 sub sample), and some apply a convolution before image processing begins… some do both.

But generally yes… the whole process starts out with just small line/ gradient/ pattern kernels (you call filters).  These are just very small images designed to find key features in a larger image.

In its simplest schema/ form a CNN simply scans an image looking for matches to its own pre defined image kernel library.  The CNN recognises objects based on which of its image kernels where detected, and where they are within the image.  The recognised kernels and their positions are then learned by the NN at each layer, creating ever more complex representations.  In some schemas back propagation not only tunes the NN layers but also adjusts the schemas kernels to aid better matching.

So if it finds matches for it’s line representation kernels, and the lines are arranged in the shape of an eye… it knows there is an eye.  Same for nose and mouth… and so it follows that if there are two eyes, a nose and mouth… there must be a face.

 :)


It thunk... therefore it is!... my project page.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *************
  • Transformer
  • *
  • 2168
  • First it wiggles, then it is rewarded.
Re: Where do CNN filters fit into this image?
« Reply #6 on: September 03, 2018, 10:21:18 pm »
You don't seem to answer exactly my question.....I'm only looking for a short sentence from you for an answer.

Is there ever a cat face filter that convolves across an image??
Is there ever a line filter that convolves across an image??
Emergent

*

Korrelan

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1114
  • Look into my eyes! WOAH!
    • YouTube
Re: Where do CNN filters fit into this image?
« Reply #7 on: September 03, 2018, 11:04:54 pm »
Quote
You don't seem to answer exactly my question.....I'm only looking for a short sentence from you for an answer.

If you read the above I did answer your questions, but I will endeavour to be clearer…

Quote
Is there ever a cat face filter that convolves across an image??

No.

Quote
Is there ever a line filter that convolves across an image??

Yes.

 :)
It thunk... therefore it is!... my project page.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *************
  • Transformer
  • *
  • 2168
  • First it wiggles, then it is rewarded.
Re: Where do CNN filters fit into this image?
« Reply #8 on: September 03, 2018, 11:12:27 pm »
Wow, really?

So you mean to tell me, these CNNs get handed an input image to eat, but first scan it with line filters, and then feed it through the math network, never to convolve it again? Or do they, say mid-way through eating it, take out their line filters and convolve it again more?

Now why would they look for lines, and not cat faces!? - Is the line filter really meant to light up all the lines making a face and hence only need line filters? I.e does the job of cat/anything filters by just using line filter. ?
Emergent

*

Korrelan

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1114
  • Look into my eyes! WOAH!
    • YouTube
Re: Where do CNN filters fit into this image?
« Reply #9 on: September 03, 2018, 11:36:55 pm »
Lines of various angles are only part of the kernel; there are also gradients and patterns, etc. This is only the first layer.

This page shows a typical kernel library.

https://stats.stackexchange.com/questions/362988/in-cnn-do-we-have-learn-kernel-values-at-every-convolution-layer

Quote
Is the line filter really meant to light up all the lines making a face and hence only need line filters?

No not the whole face, just the features that a face comprises in the first layer.  The kernels get more complex deeper in the network.

Perhaps some of my brain cells have died over the weekend.

 :)
« Last Edit: September 04, 2018, 12:08:53 am by korrelan »
It thunk... therefore it is!... my project page.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *************
  • Transformer
  • *
  • 2168
  • First it wiggles, then it is rewarded.
Re: Where do CNN filters fit into this image?
« Reply #10 on: September 04, 2018, 01:00:28 am »
So there is cat face filters ? As shown on that stack exchange page ?

If no cat filter, then you're saying it only needs to convolve an image using lines right?

I'm wonder because I'm thinking about looking for cat parts in areas of images. And wondering if that "filter" of mine should look on my original image or a shrunk down image or even pooled image.
Emergent

 


Users Online

41 Guests, 3 Users
Users active in past 15 minutes:
Korrelan, LOCKSUIT, ivan.moony
[Trusty Member]

Most Online Today: 83. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)

Articles