Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advice on training custom detectors? #20

Open
96imranahmed opened this issue Mar 7, 2017 · 4 comments
Open

Advice on training custom detectors? #20

96imranahmed opened this issue Mar 7, 2017 · 4 comments

Comments

@96imranahmed
Copy link

Hi there, I'm trying to use picolrn to train my own custom detectors (to detect heads, not just faces).

While it does train, I haven't been able to get it to converge - there are still far too many false positives (and it never reaches that 10E-6 threshold you set in the original training script).

With this in mind, I was wondering whether you had any advice as to how to facilitate training? I'm (trying) to use the wider dataset (http://mmlab.ie.cuhk.edu.hk/projects/WIDERFace/) but to little avail.

Interestingly, using your genki.py and genki script seems to work - what's special about this dataset in particular? Can pico not handle more variation of valid detections?

I've looked at images in the 'export' method of both my preproc script and genki.py and they seem to output the same sort of images (obviously, my images tend to have slightly more variety).

I'm more than happy to post my preproc scripts here and would love to hear any suggestions from yourself (if you have any!)

I look forward to hearing from you soon - and many thanks in advance!

@nenadmarkus
Copy link
Owner

Hi, @96imranahmed

Thanks for your interest in my work.

While it does train, I haven't been able to get it to converge - there are still far too many false positives (and it never reaches that 10E-6 threshold you set in the original training script).

Did you try to use deeper trees? The default depth is set to tdepth=5 (line 851 in picolrn.c).

Deeper trees should be able to fit the training data. However, the cascade might have problems generalizing to other samples (overfitting).

Can pico not handle more variation of valid detections?

Yes, this could be the problem unfortunately. Especially, if the trees are too shallow. Modern methods based on multiple convolutional layers seem to handle dataset variation more easily.

I'm more than happy to post my preproc scripts here and would love to hear any suggestions from yourself (if you have any!)

Please do. Let me see what I can do.

@96imranahmed
Copy link
Author

96imranahmed commented Jul 6, 2017

Hi @nenadmarkus, sorry for the very late reply, I've been very busy with university work.

However, I'll reply with my questions about training soon - I'm still running into problems, but things are converging much better. I have no idea how your face model converged so quickly with such a low tree depth though!

Also if you're interested, I've updated cypico with some nifty features and have created a multiprocessing python class that can run multiple pico models in parallel - along with an algorithm to clear false positives! Feel free to have a look!

  1. https://github.com/96imranahmed/cypico
  2. https://github.com/96imranahmed/urop

Pico is really useful - especially when limited with a CPU only! Thanks for this incredible work!

@nenadmarkus
Copy link
Owner

sorry for the very late reply, I've been very busy with university work.

No worries.

I have no idea how your face model converged so quickly with such a low tree depth though!

Well, face images are "easy" to distinguish from other patterns, so it seems. Consequently, simple(er) machine learning models can solve the face-detection problem (at least in the case of frontal faces).

Thanks for the links to your code. I'll take a look!

@smartadpole
Copy link

What is the size of background image .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants