Code Monkey home page Code Monkey logo

hog-detector's Introduction

hog-detector

Github Repo Github Pages Build Benchmarks codecov License: MIT Demo Doc

Histogram of Oriented Gradients and Object Detection

This project uses support vector machines (SVM) and histogram of oriented gradients (HOG) to detect objects in images. The SVM classifier is trained on HOG features extracted from training images to identify the objects in new images. The project is written in Rust and can be compiled to WebAssembly (WASM) for use in web applications.

You can find a demo here

HogDetector

How it works

  1. A training dataset with positive and negative samples is given.
  2. HOG descriptors of the samples are calculated.
  3. A Linear Support Vector Machine is trained on the positive and negative samples.
  4. Using a sliding window, the svm classifier detects bounding boxes.
  5. Applying non-maximum suppression removes some of the bounding boxes.

Requirements

  • Rust
  • wasm-pack (for compiling to WASM)

Usage

  1. Clone the repository:

    git clone https://github.com/chriamue/hog-detector
    cd hog-detector
  2. Compile the code to WASM:

    trunk build --release
  3. Run the Web version in your browser

    trunk serve --release

Open your browser on Localhost

Examples

You can find examples in example folder. The mnist example loads the mnist dataset and trains hog on the numbers.

cargo run --features mnist --example mnist

Testing

The project includes a test suite that can be run with:

cargo test

Benchmarks can be run with:

cargo bench

Train data preparation

Find a minimal annotation tool in the demo.

References

https://pyimagesearch.com/2014/11/10/histogram-oriented-gradients-object-detection/

Hard Negative Mining

Eye Dataset

hog-detector's People

Contributors

chriamue avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.