Comments (1)
Hi karneaud,
there are several ways to reduce the number of false positives:
- Limit detector resolution: Set the size of the canvas you want to perform detection on as small as possible (i.e. increase the minimum size of the faces you want to detect).
- Threshold by confidence value: For each detected face, the detector returns an array [x, y, width, height, confidence]. The confidence is an integer starting from 1 indicating the number of nearby individual detections that have been grouped together into one result. You could eliminate detected faces with a confidence value below a certain threshold (see https://github.com/swozniak/googlifier for an example). The threshold could e.g. depend on detector canvas resolution and your stepsize.
- Separate detection from tracking: E.g. use a high threshold to detect new faces and a low threshold to track a face that has already been detected (see http://mtschirs.github.io/js-objectdetect/examples/example_gesture_input.htm). Bayesian filtering could come in handy to determine which detection at time step t+1 corresponds to an already confirmed detection at timestep t. Alternatively, use the camshift algorithm for tracking (see https://github.com/auduno/headtrackr for an implementation) once you have detected a new face with high confidence.
- Use skin color information: Similar to the camshift algorithm, you could make use of color information (js-objectdetect runs on grayscale images only). Skin color can e.g. be defined as a specific range of RGB-values or inferred via histogram backprojection from an already detected face with high confidence value. See http://staff.eng.bahcesehir.edu.tr/~cigdemeroglu/papers/international_conference_papers/C_ICASSP2011.pdf for the simple but seemingly effective RGB based method, as well as the camshift algorithm mentioned above (which also shows you how to do histogram backprojection).
There are some additional parameters to tune, e.g. enable histogram equalization or make use of the canny edge detector and eliminate detections within regions of low edge density. While these functions are already builtin to the library, they are not available yet through the relatively simple detector interface since the performance or precision gain is usually low.
from js-objectdetect.
Related Issues (20)
- Objectdetect not working at all
- Custom classifier not working. HOT 1
- License HOT 1
- objectdetect.mouth.js HOT 1
- neck detection HOT 1
- not working after custom style change HOT 1
- Face detection with Pre-recorded video stream HOT 1
- Measuring activity using js-objectdetect
- Mouth/smile detector not working? HOT 8
- hand gesture sdk HOT 2
- noise detections > real detections HOT 12
- hand detection - with rotated hand HOT 4
- [Enhancement] Add package.json
- Mismatch between gh-pages & master files
- Create a new classifier HOT 2
- Consider adding library size to performance comparison
- No Documentation of JSDoc found HOT 1
- Tracking slow in FireFox only
- WebRTC not available HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-objectdetect.