GithubHelp home page GithubHelp logo

noahlevenson / wasmface Goto Github PK

View Code? Open in Web Editor NEW
81.0 7.0 11.0 9.97 MB

Viola-Jones face detection from scratch in WebAssembly

License: MIT License

C++ 99.94% JavaScript 0.06%
webassembly computer-vision haar-cascade haar-cascade-classifier haar-training cascade-classifier viola-jones machine-learning adaboost

wasmface's Issues

Potential Implementation error

Please refer to the paper's algo:

Given example images (x1, y1), . . . , (xn , yn ) where
yi = 0, 1 for negative and positive examples respectively.
โ€ข Initialize weights w1,i = 1/2m , 1/2l for yi = 0, 1 respectively,
where m and l are the number of negatives and positives
respectively.

algo

compared to the source code

	std::fill(posWeights.begin(), posWeights.end(), 1.0f / 2.0f * positiveSet.size());
	std::fill(negWeights.begin(), negWeights.end(), 1.0f / 2.0f * negativeSet.size());

for input positive size = 10; each of posWeights initially is set to 5;
However, it should be 1/(2*10) = 0.05 instead.

It is from the associative law of multiplication.
Hence a brackets should be put, such as:
std::fill(posWeights.begin(), posWeights.end(), 1.0f / ( 2.0f * positiveSet.size() ) );

to exactly match the algorithm.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.