Code Monkey home page Code Monkey logo

hand_detection's Introduction

Hand Detection and Orientation Estimation

This project utilizes a modified MobileNet in company with the SSD framework to achieve a robust and fast detection of hand location and orientation. Our implementation is adapted from the PyTorch version of SSD and MobileNet.

Contents

  1. Preparation
  2. Training
  3. Evaluation

Preparation

  1. Due to some compatibility issues, we recommend to install PyTorch 0.3.0 and Python 3.6.8, which our project currently supports.

  2. Get the code.

    git clone https://github.com/yangli18/hand_detection.git
  3. Download the Oxford hand dataset and create the LMDB file for the training data.

    sh data/scripts/Oxford_hand_dataset.sh
  4. Compile the NMS code (from ruotianluo/pytorch-faster-rcnn).

    sh layers/src/make.sh

Training

Train the detection model on the Oxford hand dataset.

python train.py 2>&1 | tee log/train.log
  • Trained with data augmentation v2, our detection model reaches over 86% average precision (AP) on the Oxford hand dataset. We provide the trained model in the weights dir.
  • For the convenience of training, a pre-trained MobileNet is put in the weights dir. You can also download it from here.

Evaluation

  1. Evaluate the trained detection model.

    python eval.py --trained_model weights/ssd_new_mobilenet_FFA.pth --version ssd_new_mobilenet_FFA
    • Note: For a fair comparison, the evaluation code of the Oxford hand dataset should be used to get the exact mAP (mean Average Precision) of hand detection. The above command should return a similar result, but not exactly the same.
  2. Evaluate the average detection time.

    python eval_speed.py --trained_model weights/ssd_new_mobilenet_FFA.pth --version ssd_new_mobilenet_FFA

hand_detection's People

Contributors

yangli18 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.