!! traincascade: So many people run in this issue: Train dataset for temp stage can not be filled
I spent so many hours on this problem. Searching the openCV forum for solutions and also searching in stackoverflow and google. I tried all advices to fix this issue: "Train dataset for temp stage can not be filled.."
Some posts said that we have to use full paths in the negative.txt file rather than relative paths. Others said: That one has to take care that no \r or \n are supposed to be present in the negative.txt file (if you are working on windows). Or: Chaning parameters such as: -minHitRate and -maxFalseAlarmRate will help. Or: Increase amount of posiitives (or negatives)...I tried with 100, 200,...1000, 2000....... etc.....
I tried everything ! why does this program not provide a more informative error msg and why is there no general help for all many many users that run in this issue and wasting so many hours ?
I may help you about this issue, but let me know what stage did you see that message? and what platform are you using? window or linux? what opencv version are you using?
Hello Tim. I am working with windows OS and latest openCv version 2.4.13 (windows x64 ). Ususally training breaks on 2nd or 3rd stage. The object that I want to detect is very simple, it is basically only a shape. I assume that the features that are found are not related to the boundaries of this shape, it looks like the extracted features are related to regions inside the shape of concern. I want to detect objects of similar shapes.
This is the cmd:
Changing parameters such as numPos or numNeg or maxFalseAlarmRate may help to reach 1 stage more but it will never go further than stage 3
As my experience, I would like you to change some points below
hope this help. Tim
dont use LBP, as to my test, I have tested for 20 stages, but the 19th stage had been failed, version 2.4.x not use LBP, I recommend you not to use this option, otherwise your work will not be valuable
-_- seriously these kind of replies make no sense at all. The reason you did not get it to work is because you did something wrong. I am doing a PhD and each and every detector I make is with LBP features and works just fine ...
Hi Steven, are you sure LBP works fine on version 2.4.13? have you taken a look at the code of trancascade?
Actually I am ... just confirmed...
Believe me ,LBP option will not work on version 2.4.13, I have debugged that option.
@Tim Pham, seriously ... i have been using LBP features and traincascade since 2.1 and have not had a single issue with it. So believe me if I say you must be doing something wrong, just like all the other people in this forum who had issues with it.
@Tim I don't think it's related with relative or full pathes since it the process is starting and working for some hours. It just stops at 3rd stage (Train dataset for temp stage can not be filled..). Same effect for HAAR (instead of LBP) @steven: Sure "we" are doing somewhere a mistake, that's why I am searching here for help. Probably the pos images are not "good" enough, I have a very simple shape in a 30x90 pixels image. Shape is white and background is black (Cannot improve this). Then I create samples according to:
I make 8 more vecs and merge them into 1 single vec. What can go wrong ?
OK, Marcello, I have just pointed out some of my work experience that helped me get rid of the error, but I think my situation differs from you. it maybe your posNum and negNum are not good enough. yesterday, I have run full of 20 stages successfully. with 360 pos images and 900 neg images.