Can't run opencv_traincascade again! [closed]

asked 2015-01-12 16:02:16 -0500

Orion gravatar image

Well, I run traincascade by "accident " , I mean that some parameters weren't good. So i stoped it by killing the proces and now it refuse to start again with new parameters, I've got this message when i try to do so :

"Training parameters are loaded from the parameter file in data folder! Please empty the data folder if you want to use your own set of parameters."

And the thing is , I don't find the data folder to empty it, maybe hidden some where ?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-28 08:19:03.750555



@StevenPuttemans, client for you ;)

it's the folder, where you write your intermediate cascade files,

the one you gave to opencv_traincascade -data [somefolder]

you should clean that up, to make sure it's not using the bad parameters from your last run.

berak gravatar imageberak ( 2015-01-12 16:12:53 -0500 )edit

Thank you for your answer berak ,allways here to save me : p But i gave "-data trained" to opencv_traincascade and no such folder was created , that's why I don't understand where taincascade find its parameters!

Orion gravatar imageOrion ( 2015-01-12 16:20:38 -0500 )edit


can you just try to create an empty folder with that name (and point it to that) ?

(did not update mygithub, so i can't try myself. if you fail, steven will be there to help you, once the sun rises over europe, again..)

berak gravatar imageberak ( 2015-01-12 16:27:11 -0500 )edit

I tried your suggestion but sadly it didn't work : ( But no matter I ll go too bed and wait tomorow (as I'm in europe too) to see if Steven can help me on this! Thank's again for your help : )

Orion gravatar imageOrion ( 2015-01-12 16:47:05 -0500 )edit

Okay let me see

  1. If I assign a folder, i always add a / at the end. Seems stupid but it resolves many errors.
  2. Give us your complete command and folder structure available
  3. Also you need to manually create the data folder yourself. The tool doesn't do that for you! That could also raise the error.

As to the first error you had, simply said, before I added that warning, people didnt know why parameters couldn't be changed after a first training setup. It is due to the files inside the data folder that are checked for their existance first and contain the give parameters hardcoded. Removing the files gives you a blank training sheet.

Even better, for each new setup i make a new data folder like, cascade1, cascade2, ... that helps avoiding problems.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-13 03:16:59 -0500 )edit

Seems to me it is time that I put more work in my book explaining all details of cascade classifier training :D

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-13 03:17:24 -0500 )edit

adding a note here might help, too.

berak gravatar imageberak ( 2015-01-13 03:23:09 -0500 )edit

Yeah - overall we need to improve documentation and tutorials on this topic. To many problems are not covered for the moment. In my 2 years of active research on the framework, I am still discovering multiple new things each time I dig into the code.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-13 03:48:28 -0500 )edit

I will check tomorrow with the latest branch and report back to you. OpenCV2.4 or OpenCV3.0?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-13 13:31:09 -0500 )edit

Also the -bt DAB and -bt RAD say nothing to me, never used those parameters...

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-13 13:31:54 -0500 )edit