Face Recognizer

asked 2014-07-24 07:31:44 -0500

updated 2014-07-24 07:37:44 -0500

berak gravatar image

Hello,

I am new to Computer Vision, so please forgive me if the question is a non sense.

I would like to know if one can use the FaceRecognizer<> algorithm wrappers to discern between object 'flavours/classes' which are not faces ?

i.e: I detect a type of bottle (the detection is another topic, lets assume we can detect bottles) in an image. Now i want to train a LBPFaceRecognizer to predict if the detected bottle is a champaign one, or a coke one . Does it make sense to use a LBPFaceRecognizer and train it with champain and coke bottle in order to have a good prediction result?

Thank you

edit retag flag offensive close merge delete

Comments

As long as you can adapt the size of the training images it should be perfectly possible!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-24 09:28:46 -0500 )edit

Thanks Steven, in fact if you read the article on which is based the opencv implementation (ahonen & al) one may think that the face recognizer uses uniform patterns and some specific weight for each grids which are optimized for faces textures ... but then if one read http://bytefish.de/blog/local_binary_patterns/ then coder didnt mention those weights and explicitly says that he didnt use uniform patterns, so i got confused really.

tiresias gravatar imagetiresias ( 2014-07-24 14:28:35 -0500 )edit

LBP is a technique that works on every single object. I use it to train object models of fruit, cars, trees, ... It is just a technique that proved it succes in face recognition/detection, just like HAAR wavelets, eigenfaces, fisherfaces, ... but that doesn't mean other object classes cannot benefit from this technique.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-25 02:30:50 -0500 )edit
1

the current opencv lbph does not exploit uniform patterns to reduce the histogram size. (but you can find a version here, that does)

though bottles don't have much 'shape' features, it might work well with lbph, given:

  • you can (detect and) crop the bottle before, nicely
  • you train with images with the full 360° , so you got both labels and all part views of them covered
berak gravatar imageberak ( 2014-07-25 02:50:26 -0500 )edit

@berak thx for the software link, gonna look into that!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-25 03:12:47 -0500 )edit

Thanks to both, berak you mentioned UniformPatterns, but what about weighted grid: does OpenCv inmplementation use weighted grid for the grid histograms?

tiresias gravatar imagetiresias ( 2014-07-25 03:18:19 -0500 )edit
1

the main point about the 'uniform' (less than 2 up/down transitions) features is, that there are only 58 possible solutions. so you have a simple precalculated lookup table, that assigns the uniforms to 0..58 and all others to bin 59.

then you only need to check a 59 bin histogram instead of a 256 bin one. speed, size, (accuracy even) improvement. it's some sort of compression/clustering.

berak gravatar imageberak ( 2014-07-25 03:20:29 -0500 )edit

tiresias, it's using a (8x8 by default) grid, and weighted (extended) neighbours, see here

berak gravatar imageberak ( 2014-07-25 03:28:01 -0500 )edit

Berak, i meant the grid weights (.i.e eyes grid are supposed to be more important than the other grids for face recognition) ...

tiresias gravatar imagetiresias ( 2014-07-25 04:16:48 -0500 )edit
1

then, no. it's not using a weighted grid. (but definitely worth trying, i'd say.)

again, go and break it. steal those ideas, that fit your scheme, improve, contribute..

berak gravatar imageberak ( 2014-07-25 04:25:11 -0500 )edit