The Robomow rs612 Training Runs
run1-with-gen-images - Positive Images Generated
run4-with-captured-images - Positive Images Captured
Each run will generate acascade model. Which one performed the best? See below. Here are 2 runs high lighted
In this run I took about 15 images I extracted from a video, removed their background image, and used opencv_createsample tool to super impose the 15 images on a background/negative image. Then had the opencv_createsamples slightly rotate the image as it generated new positive sample images. You can see them in the pos/gen directory. After training the model here are the results.
python detect-robomow.py --video ~/src/garage-opener-data/videos/rs612/robomow-horizontal-800x600.mp4
run4-with-captured-images - Positive Images were captured from Video
In this run instead of generating the positive images, I captured them from a video. You can imagine trying to annotate a thousand images could take a while. I instead created a color detector that would detect the color of the object as it moved through the video. I would then calculate the bounding box and record its coordinates to a file. The results were magic! See above in the video.
- We can clearly see when using real positive images instead of generated images the results are significantly expected.
- In fact, I would suspect in most cases the generated images approach can at best be used for prototyping.
- It seemed that the models seem to perform better when the positive and negative images got above about a 1,000
- It also seemed to perform better once the stages got above 6. Meaning there are 6 cascades/stage/model xmll files that are generated.
- One thing worth noting when doing object detection outside, pay attention to the time of day when training. I noticed the trained models would perform different when for example trying to detect in morning or evening vs during the middle of the day. Eventough I converted all the images to black and white, it still had a significant effect.
- It really helped having the directory structure in place to allow me to go from one run to the next simply by duplicating the directory and changing the arguments to each of the script files.
I hope you found these articles and tutorials helpful. Feel free to ask a question or add a comment down below. I would love to hear about the projects you are working on.