1 | initial version |
Deciding to use the createsamples utility or not depends on your problem.
OpenCV generates artificial samples by rotating, scaling and applying other transformations in the positive samples. This might be useful if the object you are trying to find is rigid one on fairly predictable backgrounds (like logos on websites, for example).
If the object you are trying to find is complex, such as a face, person, car, on complex environments (real-life), the createsamples utility is pretty useless and you should acquire all the samples from real examples.
As for negative examples, it should be fairly obvious that if you use negative images (images in which there are not positive samples) from the background the classifier will perform on, it will improve its accuracy.
There is no obvious rule for positive/negative ratio. Normally I add around twice as much negative samples than positive ones, but never less than that. And it makes sense because any classifier will give much more negative responses than positive ones on a common scenario. It is much easier to add negative samples to your cascade, since you only need to add negative images and define how much negative samples the cascade should use, OpenCV will do the rest.
As to why the training isn't finishing, there might be a lot of different reasons. You might be choosing to big a Detection Window, which will require so much memory that the program will crash, you can be requiring too big a success rate in the training parameters. Also, there is a maximum number of negative examples that follows a certain rule I cannot remember, try to reduce the number of negative samples in your parameters.
2 | No.2 Revision |
Deciding to use the createsamples utility or not depends on your problem.
OpenCV generates artificial samples by rotating, scaling and applying other transformations in the positive samples. This might be useful if the object you are trying to find is a rigid one on fairly predictable backgrounds (like logos on websites, for example).
If the object you are trying to find is complex, such as a face, person, car, on complex environments (real-life), the createsamples utility is pretty useless and you should acquire all the samples from real examples.
As for negative examples, it should be fairly obvious that if you use negative images (images in which there are not positive samples) from the background the classifier will perform on, it will improve its accuracy.
There is no obvious rule for positive/negative ratio. Normally I add around twice as much negative samples than positive ones, but never less than that. And it makes sense because any classifier will give much more negative responses than positive ones on a common scenario. It is much easier to add negative samples to your cascade, since you only need to add negative images and define how much negative samples the cascade should use, OpenCV will do the rest.
As to why the training isn't finishing, there might be a lot of different reasons. You might be choosing to big a Detection Window, which will require so much memory that the program will crash, you can be requiring too big a success rate in the training parameters. Also, there is a maximum number of negative examples that follows a certain rule I cannot remember, try to reduce the number of negative samples in your parameters.
3 | No.3 Revision |
Deciding to use the createsamples utility or not depends on your problem.
OpenCV generates artificial samples by rotating, scaling and applying other transformations in the positive samples. This might be useful if the object you are trying to find is a rigid one on fairly predictable backgrounds (like logos on websites, for example).
If the object you are trying to find is complex, such as a face, person, car, on complex environments (real-life), the createsamples utility is pretty useless and you should acquire all the samples from real examples.
As for negative examples, it should be fairly obvious that if you use negative images (images in which there are not positive samples) from the background the classifier will perform on, it will improve its accuracy. For example, if you are building a pedestrian detector to work on an urban setting, you'll want to add negative examples from urban scenarios with no pedestrians.
There is no obvious rule for positive/negative ratio. Normally I add around twice as much negative samples than positive ones, but never less than that. And it makes sense because any classifier will give much more negative responses than positive ones on a common scenario. It is much easier to add negative samples to your cascade, since you only need to add negative images and define how much negative samples the cascade should use, OpenCV will do the rest.
As to why the training isn't finishing, there might be a lot of different reasons. You might be choosing to big a Detection Window, which will require so much memory that the program will crash, you can be requiring too big a success rate in the training parameters. Also, there is a maximum number of negative examples that follows a certain rule I cannot remember, try to reduce the number of negative samples in your parameters.
4 | No.4 Revision |
Deciding to use the createsamples utility or not depends on your problem.
OpenCV generates artificial samples by rotating, scaling and applying other transformations in the positive samples. This might be useful if the object you are trying to find is a rigid one on fairly predictable backgrounds (like logos on websites, for example).
If the object you are trying to find is complex, such as a face, person, car, on complex environments (real-life), the createsamples utility is pretty useless and you should acquire all the samples from real examples.
As for negative examples, it should be fairly obvious that if you use negative images (images in which there are not positive samples) from the background the classifier will perform on, it will improve its accuracy. For example, if you are building a pedestrian detector to work on an urban setting, you'll want to add negative examples from urban scenarios with no pedestrians.
There is no obvious rule for positive/negative ratio. Normally I add around twice as much negative samples than positive ones, but never less than that. And it makes sense because any classifier will give much more negative responses than positive ones on a common scenario. It is much easier to add negative samples to your cascade, since you only need to add negative images and define how much negative samples the cascade should use, OpenCV will do the rest.
As to why the training isn't finishing, there might be a lot of different reasons. You might be choosing to big a Detection Window, which will require so much memory that the program will crash, you can be requiring too big a success rate in the training parameters. Also, there is a maximum number of negative examples that follows a certain rule I cannot remember, depends on the number of positive samples, try to reduce the number of negative samples in your parameters.