Also, generally speaking, the more positives (and useful negatives) you have for training, the better the performance of the detector. This document should be helpful in understanding the trade-offs between more/fewer images: http://www.mathworks.com/help/vision/ug/train-a-cascade-object-detector.html
Thanks for the rating, Justin. Much appreciated!
I've been asked many times about extending this to work with video, but I haven't had the bandwidth to do so. However, the existing tools do facilitate a relatively easy interaction with video:
First, convert the video file to individual frames (images) and populate the image panel on the first tab of the CascadeTrainGui. Draw and copy (CTRL-1) the ROI(s) in the first frame of the video, scan to the next frame (RIGHT-CLICK or CTRL-N), and past (CTRL-2). Repeat until the scene changes. Then go back and tweak the positions frame-by-frame as necessary.
I know that 3500 frames is a lot to do this for--training is tedious! With that in mind, I just added a new "PasteROIsThrough" function to CascadeTrainGUI. With it, you can define and copy ROIs in one image, and specify the image number through which you want to paste them.
If you're interested in trying it out, please drop me an email directly and I will share it with you. I'd appreciate your comments/suggestions before I share the new version on the File Exchange.
I'm involved in a design project utilizing live object tracking via computer vision. My peers and I came across the cascading technique and your GUI recently and had a few questions on the process.
When using the GUI, is it necessary to manually create ROI's for every frame? A short test video of ours (simulated two-lane traffic driving from the horizon out the bottom of the frame) is roughly 3500 frames, which seems a lengthy task given how convenient this GUI seems to be. If that is not the case, then how should we go about placing ROI's?
Also, is there a good way to estimate exactly how many frames would be required in order to begin proper training? This goes hand-in-hand with the previous question, as we're currently under the impression that we wouldn't need every frame to get a well-trained detector for this single case. Thanks for any assistance, and nicely done on this GUI. As far as our knowledge tells us, it's an extremely useful alternative to standard training methods
Permission to write=denied suggests that you are trying to write to a location to which you don't have privileges. You might try putting a breakpoint on the save line (1269) and verifying that fullfile(pwd,fname) returns the value that you expect, and that you have write privileges for that location. Please let me know either way if this addresses the issue.