GithubHelp home page GithubHelp logo

False positives about js-objectdetect HOT 1 CLOSED

mtschirs avatar mtschirs commented on June 17, 2024
False positives

from js-objectdetect.

Comments (1)

mtschirs avatar mtschirs commented on June 17, 2024

Hi karneaud,

there are several ways to reduce the number of false positives:

  1. 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).
  2. 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.
  3. 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.
  4. 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)

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.