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

Converter task for haarcascade Classifiers #98

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cirocosta
Copy link
Contributor

Here is the result of what was discussed on #92. It seems to be working fine, working without problems here. The tests running in travis for the converter are not passing but everything is ok in my machine (which is strange ... i'll setup vagrant and then debug it in a clean env) .

gulp build-data will generate tracking.ViolaJones.classifiers.__CLASSIFIER_NAME__=new Float64Array ... files (/build/data).

The sandbox was also modified to use the files with their new names (closer to the originals from opencv repo)


it seems like travis is having problems building node-expat (for parsing xml very fast) with node .11 😢 . Tests passing for .10

@zenorocha
Copy link
Collaborator

/cc @thiago-rocha

The last classifier (the default) was not good enough, now it is using the frontalface_alt_tree from opencv repo
@eduardolundgren
Copy link
Owner

The changes looks good, once you have a final version let me know for starting reviewing it. Overall it should be only minor source formatting.

Have you tested with other converted training data, such as car plate? With this conversor we could add a lot more objects to tracking.js.

@cirocosta
Copy link
Contributor Author

Not with plate, but with smile. russian-plate seems to be malformed (the number of rects is not matching the number of nodes). Smile also had a problem of malformed xml but it was an easy fix. Here is a result with Smile (with stepSize 1.5 - default):

Imgur

not very satisfying (just tryied with this guy, maybe it recognizes better with other images) but it kinda works. For the faces example it got better with stepSize 1.3 as i remember, which is bellow the 1.7 used with the old format.

Maybe with other parameters this can get better. Don't know if this new format introduced just a new format or they changed something in the algorithm ... what do you think?

@eduardolundgren
Copy link
Owner

The smile on this picture may have more rotation than tilted can detect, we may need to try with other images, this one seems broken result.

I need to run your branch to play with it in order to check whether it changed the algorithm or just the format. The step size 1.3 should be fine if it detected faces/mouth/eyes on it correctly, did it?

@cirocosta
Copy link
Contributor Author

Sorry for taking so long on this. Had a crazy week. Now i'm focusing on solving the problem regarding the converter tests (which are passing on v0.10.29 and failing on v0.10.30 - seems like it is something that changed regarding streams2, which i din't figure out yet). Without the converter passing the tests on v0.10.30 i wouldn't feel very confident about using it.

I've been thinking about adding the option to also use the old-format (by passing {old: true} to the converter in the gulp task). Seems like there's a great number of old-format classifiers out there.

tl;dr: If you'd like to mess around with it, do it with v0.10.29 (nvm to the rescue)


Tests are now passing for both 0.10.30 and 0.11.13, great 😄 cirocosta/gulp-converter-tjs#3


Converting from old format is almost done (but already working) and working well , just need to simplify the interface cirocosta/gulp-converter-tjs#4

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

Successfully merging this pull request may close these issues.

3 participants