I am working on an own object detector using HaarCascade. BTW, I am stucked at some point, which I'll explain below.
The situation it's this: - I collected 100 images of my object (let's say apples) - I collected about 1500 negatives images - I created negatives.txt , a file which contains paths to the negatives images - I created positives.txt , a file which contains paths, number of objects, coordinates and dimensions of my positive images
Now, this is the problem.
Using opencv_createsamples.exe
to augment my data/images, I saw that if I execute it (with same parameters) for each object image, the output will be more or less a 1000 positive images (negatives background + object) together with a .lst file
containing path and object coordinates inside the negative image. These coordinates will not change (because I set them when I executed opencv_createsamples.exe
).
The question is: it's a good idea to change the parameters createsamples
requires for each of my object image and then merge them all ?
Example of what I am doing now:
Example of what I am willing to do:
I really hope I explained all.
My doubt it's about efficiency of doing this: I will have a better accuracy by training using different objects (of the same class) in different position or it's the same by using only one object ?
Glossary:
Thanks all
UPDATE
Here after watching Sentdex video on HaarCascade: Training Haar cascade object detection - OpenCV with Python for Image and Video Analysis 20
I think you'd have better results training your model with multiple objects in each (positive) image. It also depends on what you want to achieve. 1. Try both approaches you mentioned in your question and test them using the same images. 2. Compare the effectiveness (accuracy of detection) and also efficiency (is there noticeable difference in speed, for instance?)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.