Ask Your Question

Purpose of trained xml file

asked 2017-05-30 05:44:57 -0500

Davaaron gravatar image


I'm dealing with machine learning / deep learning and read a lot about it (how it works, kinds of net structures, kinds of learnings, etc) and read the paper from Paul Viola and Michael Jones whose method is used in OpenCV. But I just couldn't find out what the purpose of the *.xml file is, produced by the OpenCV training.

It contains a lot of training information in the header and, it seems so to me, a lot of random points.

The xml file contains a lot of weak classifiers which are combined to become a strong classifier.

My question, however, is: How does OpenCV use this *.xml file to detect objects?

What are the internal leafs and what's meant by "leaf values"?

I'd appreciate any helpful answer :)

edit retag flag offensive close merge delete



purpose of xml file : save model and load model later and use it without training.

LBerger gravatar imageLBerger ( 2017-05-30 10:24:55 -0500 )edit

Ok, I know that. What I really mean is: What's the model containing? I mean what do all these xml-elements stand for? And how does it help to classify inputs?

Davaaron gravatar imageDavaaron ( 2017-05-30 15:22:00 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-05-31 04:20:39 -0500

OpenCV 3 Blueprints, chapter 5 discusses the content of the XML in great detail. Basically the XML file contains

  • The layout of the different stages of the cascades
  • The number of weak classifiers per stage
  • The features used for each weah classifier in a specific stage
  • The weights assigned to the feature output for making a decision inside the decision tree trained by boosting
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-05-30 05:44:57 -0500

Seen: 177 times

Last updated: May 31 '17