Socket
Socket
Sign inDemoInstall

object-detect

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    object-detect

Native JavaScript Object Detection


Version published
Weekly downloads
4
increased by100%
Maintainers
1
Install size
10.5 MB
Created
Weekly downloads
 

Readme

Source

js-objectdetect

js-objectdetect is a javascript library for real-time object detection.

This library is based on the work of Paul Viola and Rainer Lienhart and compatible to stump based HAAR cascade classifiers used by the OpenCV object detector.

Watch this video for a short demonstration.

All modern browsers including IE 9+, Safari and Opera Mobile are supported.

Examples

js-objectdetect can be used for object detection, tracking and, in combination with mordern HTML5 features such as WebRTC, for all sorts of augmented reality applications that run in the browser without any plugin.

The following demos are available (Internet Explorer and iOS not supported):

gesture input Rotating a 3D object via hand gesture

gesture scroll Scrolling a website via hand gesture

glasses Trying out various sunglasses

Classifiers

js-objectdetect is compatible to stump based classifiers used by OpenCV. Classifiers for face, hand and eye detection are already included. More can be found on the web (classifier repository). However, not all classifiers have the same performance and some are quite sensitive to lighting conditions. Cascades have to be converted into the js-objectdetect format before usage. The cascade format is similar to that of tracking.js. Converters for old and new style OpenCV xml haarcascades are available.

Performance

The following list provides a runtime and detection performance comparison among current JavaScript face detection libraries. All test results have been acquired by applying either a 24x24 stump-based HAAR cascade or, in case of CCV, a 24x24 SURF cascade classifier with minimum step size on a single scale 80x80 image. Measured times are summed over 100 executions.

Last updated on February 7, 2015

Chrome 40 / FF 35Detections per SecondDetectionsSeconds
js-objectdetect17.5 / 16.950 / 502.86 / 2.96
jsfeat19.4 / 6.330 / 303.18 / 4.75
tracking.js7.7 / 8.9748 / 486.24 / 5.35
Beyond Reality Face27.4 / 1.741 / 415.50 / 23.98
CCV32.2 / 4.48 / 82.22 / 1.80
js-objectdetecttracking.jsjsfeat1Beyond Reality Face2CCV3
DetectionsDetectionsDetectionsDetectionsDetections

1 also auduno/clmtrackr, camgaze.js. Based on an older version of js-objectdetect.

2 Proprietary software, tested with v3.0.15. Fails to compile asm module in FF.

3 also jquery.facedetection, neave/face-detection, wesbos/HTML5-Face-Detection, auduno/headtrackr

Usage

Examples can be found in the repository. For documentation, refer to the JSDoc in the source files.

Download

License

js-objectdetect is distributed under MIT license. The included classifiers are subject to their own licenses.

Credits

Thanks to Audun Mathias Øygard (auduno) for his inspirational headtrackr library, Brandon Jones (toji) for his valuable javascript performance tipps, Nikos (foo123) for his port of JViolaJones on which the canny pruning algorithm is based on and tracking.js for the classifier format.

Keywords

FAQs

Last updated on 13 Jun 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc