Ask Your Question
3

Visualizing learned features from Haar cascade classifier

asked 2015-03-02 10:28:09 -0600

verified.human gravatar image

updated 2015-08-22 04:52:48 -0600

Using the opencv_traincascade application I have trained a cascade classifier on Haar features for car detection. The detector is working pretty good, but I am wondering what kind of rectangle features were selected using AdaBoost. In other words, I want to visualize the features in the same way Viola and Jones are doing in their paper for face detection (see image below). However I find the cascade.xml file not so trivial to interpreted, so I was wondering whether there is a way to visualize the 'learned' rectangular features?

image description

edit retag flag offensive close merge delete

Comments

hi Steven, i thought your book is released eagerly, wants to know about Haar cascade classifier in depth. i stopped here my project to visualize the learned features of my classifier. please share the link of code or please share your book details which you published. Thank you!

saideepthik gravatar imagesaideepthik ( 2018-02-14 04:58:30 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
8

answered 2015-03-02 14:37:32 -0600

updated 2015-03-03 02:53:19 -0600

Beneath you can find two videos of visualisations I made.

You can see each feature of each stage visualized right there. Once my book is published, I will push the visualization code into OpenCV as well as other features for visualizing seperate stages.

This implementation is based on the work of Adam Harvey @ his CV Dazzle project.

Now I am at work I can also give you a glampse at the stage visualization, this is for example a single stage (stage 17) from the face detection LBP model:

image description

Same can be seen below for a HAAR based model (stage 8)

image description

The complete discussion of each step, as well as all model parameters, will be in the book, which will probably be launched around September 2015!

edit flag offensive delete link more

Comments

@StevenPuttemans just out of curiosity the book will be based on face detection or in general image processing and opencv functionality?

theodore gravatar imagetheodore ( 2015-03-03 05:22:34 -0600 )edit

@theodore, the book will have 8 chapters discussing various fields of computer vision with blueprints on how to proceed in these cases. I will write 2 chapters of it, a chapter on 'generic object detection', of which information can be seen here, which will dig into every single detail of the cascade classifier interface, like parameters, results and visualizations. The second chapter will talk about efficient person identification, combining techniques like face detection/recognition, fingerprint and handpalm recognition. Both chapters touch both theory and sample code but require OpenCV knowledge to get the hang of it. It are no ready made projects, rather tips and tricks :)

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-03 05:35:46 -0600 )edit

@StevenPuttemans nice ;-), if you need any reviewers or anything feel free to contact me. I will be glad to help.

theodore gravatar imagetheodore ( 2015-03-03 05:44:07 -0600 )edit

@theodore, it is a cooperation with PacktPub and three other authors. PacktPub has its own pool of reviewers, so I guess it won't be a problem. Thanks for the offer though! You can always mail me your contact details and I can pass em on to the technical reviewer if you want!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-03 05:47:36 -0600 )edit
1

@StevenPuttemans I see. No, need for "thank you's" it is just something that I would be willing to do if you were in the search or whatever. Anyway, of course I can mail you my contact details for any case ;-)

theodore gravatar imagetheodore ( 2015-03-03 06:09:44 -0600 )edit

Thanks Steven, your images look very good ! Is it me or is there no code on the CV Dazzle website? You are not sharing your code before releasing your book I suppose? Thanks anyway for your very nice response.

verified.human gravatar imageverified.human ( 2015-03-03 09:56:54 -0600 )edit

Question Tools

5 followers

Stats

Asked: 2015-03-02 10:28:09 -0600

Seen: 3,366 times

Last updated: Mar 03 '15