Are there any details or procedures which should be pay attention to for stopping and restarting the training process?

asked 2016-04-13 22:52:40 -0500

ShawnShawnShawn gravatar image

updated 2016-04-14 11:33:34 -0500

I was trying to do a haar training, the process and related parameters are shown below, and the process seems to be in an infinite loop. I did some research and found that maybe I should stop the process, add more negative samples, and then restart. (Actually I had nearly 1000 negative images whose size, generally 300×224 plus, are hundred times than 19×19( model dimension selected), so I supposed I had enough negative samples which should be much more than 5000 -numNeg selected, but a lot of answers from network said insufficient neg samples causes loop, which confused me). It would be appreciated that you add some suggestions on how to improve my training!

image description image description image description image description

edit retag flag offensive close merge delete

Comments

Some quick questions

  1. What interface are you using? Because the current opencv_traincascade is not outputting nearly as much information as you are visualising and thus it is hard to know if it is due to the software used or not...
  2. Why not optimize your problem first using LBP features then move to HAAR to avoid longer trial and error training times?

Like said, I am intrigued by the amount of information that is returned to the user by your tool, so if you could link me to it, I might be adding it to the OpenCV training interface also.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-04-14 03:06:04 -0500 )edit
Eduardo gravatar imageEduardo ( 2016-04-14 04:33:01 -0500 )edit
1

Oh well, if that is the case, then stop looking further, step as far away as possible and please use the opencv_traincascade with the haar features. The haartraining has even disappeared from the master branch because it is buggy as hell...

StevenPuttemans gravatar imageStevenPuttemans ( 2016-04-14 04:57:36 -0500 )edit

Thanks for your quick reply. Actually I just began haar training yesterday using opencv_haartraining.

The reason why I use this tool is that tons of detailed tutorials and discussion online had used this tool with haar, and then I supposed maybe it'd be better for me to completely follow the steps as they taught, which turns out to be a bad choice.

Yesterday I started my training, in the meantime I searched some information on OpenCV forum and by accident found many suggestions on training you posted, not until then did I realize that actually I should use the opencv_trainingcascade tool + LBP for the first try! I hope more green hands can reach this link from Steven before they start to train! link text

ShawnShawnShawn gravatar imageShawnShawnShawn ( 2016-04-14 11:54:32 -0500 )edit

what does it mean that "so if you could link me to it, I might be adding it to the OpenCV training interface also."

ShawnShawnShawn gravatar imageShawnShawnShawn ( 2016-04-14 11:58:05 -0500 )edit

This guidance link from other source is quite good as well http://www.computer-vision-software.c...

ShawnShawnShawn gravatar imageShawnShawnShawn ( 2016-04-14 11:59:51 -0500 )edit

btw, assume that I am using the traincascade tool and I want to stop it and then restart it( maybe add/minus some samples or tone some parameters or just make a pause), what matters or procedures should I pay attention to in different cases?

ShawnShawnShawn gravatar imageShawnShawnShawn ( 2016-04-14 12:08:28 -0500 )edit

I suggest you to get the book OpenCV 3 Blueprints, especially chapter 5. It has a very detailed and elaborating content on the cascade classifier interface of OpenCV which answers all your questions in one hit. If not, do a search of this forum, like you said, it has all been answered a tons before!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-04-15 02:57:07 -0500 )edit

yeah, I have got the ebook and decided to follow the steps. But I unfortunately got stuck with using your source code like object_annotation, I got confused with the below "Start by running the CMAKE script inside the GitHub folder of the specific project. After running CMAKE, the software will be accessible through an executable. The same approach applies for every piece of software in this chapter . Running the CMAKE interface is quite straightforward" how can I correctly use cmake with your source code? it seems like installation_tutorials of the book only contains how to install opencv3. Can I have your email so I can contact you more convenienly?

ShawnShawnShawn gravatar imageShawnShawnShawn ( 2016-04-20 05:27:35 -0500 )edit

Should I copy all the folders containing the source code of the book to the D:\opencv\sources where I installed my opencv, and then use CMake to compile?

ShawnShawnShawn gravatar imageShawnShawnShawn ( 2016-04-20 05:30:54 -0500 )edit