All Projects → foo123 → Haar.js

foo123 / Haar.js

Feature Detection based on Haar Cascades in JavaScript (Viola-Jones-Lienhart et al Algorithm)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Haar.js

Vedadet
A single stage object detection toolbox based on PyTorch
Stars: ✭ 271 (-9.97%)
Mutual labels:  object-detection
Simple Faster Rcnn Pytorch
A simplified implemention of Faster R-CNN that replicate performance from origin paper
Stars: ✭ 3,422 (+1036.88%)
Mutual labels:  object-detection
Rfcn Tensorflow
RFCN implementation in TensorFlow
Stars: ✭ 294 (-2.33%)
Mutual labels:  object-detection
Ssd Pytorch
SSD目标检测算法(Single Shot MultiBox Detector)(简单,明了,易用,全中文注释,单机多卡训练,视频检测)( If you train the model on a single computer and mutil GPU, this program will be your best choice , easier to use and easier to understand )
Stars: ✭ 276 (-8.31%)
Mutual labels:  object-detection
Retinanet
An implementation of RetinaNet in PyTorch.
Stars: ✭ 286 (-4.98%)
Mutual labels:  object-detection
Fpn tensorflow
This is a tensorflow re-implementation of Feature Pyramid Networks for Object Detection.
Stars: ✭ 291 (-3.32%)
Mutual labels:  object-detection
Exclusively Dark Image Dataset
Exclusively Dark (ExDARK) dataset which to the best of our knowledge, is the largest collection of low-light images taken in very low-light environments to twilight (i.e 10 different conditions) to-date with image class and object level annotations.
Stars: ✭ 274 (-8.97%)
Mutual labels:  object-detection
Yolov3v4 Modelcompression Multidatasettraining Multibackbone
YOLO ModelCompression MultidatasetTraining
Stars: ✭ 287 (-4.65%)
Mutual labels:  object-detection
Yolo2 light
Light version of convolutional neural network Yolo v3 & v2 for objects detection with a minimum of dependencies (INT8-inference, BIT1-XNOR-inference)
Stars: ✭ 286 (-4.98%)
Mutual labels:  object-detection
Pytorch Hardnet
35% faster than ResNet: Harmonic DenseNet, A low memory traffic network
Stars: ✭ 293 (-2.66%)
Mutual labels:  object-detection
Yolov3 Tensorflow
Implement YOLOv3 with TensorFlow
Stars: ✭ 279 (-7.31%)
Mutual labels:  object-detection
One Shot Object Detection
Implementation of One-Shot Object Detection with Co-Attention and Co-Excitation in Pytorch
Stars: ✭ 285 (-5.32%)
Mutual labels:  object-detection
Pytorch Yolo V3
A PyTorch implementation of the YOLO v3 object detection algorithm
Stars: ✭ 3,148 (+945.85%)
Mutual labels:  object-detection
Gfocalv2
Generalized Focal Loss V2: Learning Reliable Localization Quality Estimation for Dense Object Detection, CVPR2021
Stars: ✭ 270 (-10.3%)
Mutual labels:  object-detection
Fastmot
High-performance multiple object tracking based on YOLO, Deep SORT, and optical flow
Stars: ✭ 284 (-5.65%)
Mutual labels:  object-detection
Bmw Tensorflow Inference Api Gpu
This is a repository for an object detection inference API using the Tensorflow framework.
Stars: ✭ 277 (-7.97%)
Mutual labels:  object-detection
Lvis Api
Python API for LVIS Dataset
Stars: ✭ 290 (-3.65%)
Mutual labels:  object-detection
Jeelizar
JavaScript object detection lightweight library for augmented reality (WebXR demos included). It uses convolutional neural networks running on the GPU with WebGL.
Stars: ✭ 296 (-1.66%)
Mutual labels:  object-detection
Open3d Ml
An extension of Open3D to address 3D Machine Learning tasks
Stars: ✭ 284 (-5.65%)
Mutual labels:  object-detection
Autogluon
AutoGluon: AutoML for Text, Image, and Tabular Data
Stars: ✭ 3,920 (+1202.33%)
Mutual labels:  object-detection

HAAR.js

Note: Further development has moved to the FILTER.js project, for Image Processing and Computer Vision, which includes a new HaarDetector plugin which can be seen as the continuation of this project.

Feature Detection Library for JavaScript (uses HTML5 canvas on browser and Canvas package on Node)

Based on Viola-Jones Feature Detection Algorithm using Haar Cascades and improvement Viola-Jones-Lienhart et al Feature Detection Algorithm

This is a port of OpenCV C++ Haar Detection and of JViolaJones Java) to JavaScript.

there is also a php version: HAARPHP

Light-weight (~10kB minified, ~5kB gzipped).

Haar.js Face Detection Haar.js Many Faces Detection Haar.js Mouth Detection Haar.js Eyes Detection

Contents

Live Examples

How To use

You can use the existing openCV cascades to build your detectors.

To do this just transform the opencv xml file to javascript or json format using the haartojs (php) tool (in cascades folder)

examples:

to use opencv's haarcascades_frontalface_alt.xml in javascript do:

haartojs haarcascades_frontalface_alt.xml > haarcascades_frontalface_alt.js

this creates a javascript file: haarcascades_frontalface_alt.js which you can include in your html file or node file

the variable to use in javascript is similarly
haarcascades_frontalface_alt (both in browser and node)

to transform a cascade xml file to json format do:

haartojson haarcascades_frontalface_alt.xml > haarcascades_frontalface_alt.json

The structure of the .js and .json formats is exactly the same, so you can interchange between the two freely

HAAR.js works both in the browser and in Node.js (supporting parallel computations with Parallel.js)

NOTE HAAR.js (0.4.4+) (and the generated cascades) support umd-style generic loading capability for: commonjs / node , amd , browsers script tags

Runing inside the browser

Loading wth script tags You can run the example face.html or mouth.html inside your browser

Running inside node

For running, the package have a dependency on canvas You can find an example inside examples/nodes.js Valid Output

node examples/node.js 
processing the picture
[{"x":102.5,"y":105.5,"width":160.66666666666666,"height":160.66666666666666}]

To work properly, canvas need some system depencencies. You can find instruction on https://github.com/LearnBoost/node-canvas/wiki For example for Ubuntu :

sudo apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev

Loading with requirejs

As a third option, you can load the library with requireJS, both on the browser on with node. There is an example of loading with RequireJS inside node in examples/require.js. The configuration would be the same inside a browser

Supporting parallel computation

The parallel.js library is included in this repository, see the face.html example for how to use. In most cases using parallel computation (if supported) can be much faster (eg eye.html example)

Where to find Haar Cascades xml files to use for feature detection

Usage Ideas

TODO

  • [x] optimize detector for real-time usage on browsers (eg. -> https://github.com/liuliu/ccv) [DONE use parallel.js]
  • [x] add selection option, detection is confined to that selection (eg detect nose while face already detected) [DONE]
  • [x] check if some operations can use fixed-point arithmetic, or other micro-optimizations [DONE where applicable]
  • [ ] keep up with the changes in openCV cascades xml format (will try)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].