Skip to content

martinmatak/hands-annotation

Repository files navigation

Hands detection app

This project is a domain-specific usage of Keras implementaion of RetinaNet.

RetinaNet is a deep neural network for object detection and it is described in Focal Loss for Dense Object Detection by Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He and Piotr Dollár.

Here is RetinaNet trained for a specific object detection - namely for detecting hands. Dataset used for training is publicly available.

Installation

  1. Clone this repository.
  2. Create virtual environment for python - execute virtualenv -p python3 venv and activate it by executing source venv/bin/activate.
  3. Install requirements by executing pip install -r requirements.txt
  4. In the repository, execute python setup.py install.
  5. As of writing, this repository requires the master branch of keras-resnet (run pip install --upgrade git+https://github.com/broadinstitute/keras-resnet).

Usage

By default, pretrained model is used which can be downloaded here. To use it, move it to the snapshots directory without renaming it. However, this model is unfortunately weak and not well trained because of lack of hardware resources.

Script main.py in examples directory is one of the examples how this model can be used. It comes with two options: annotating JPG image (-i) or annotating video (-v).

Scheme for usage is the following: $ python examples/main.py -option <input_file_path> <output_file_path> where -option is either -i or -v.

Results

Result of running $ python examples/main -i image.jpg image-annotated.jpg where image.jpg is this one.

it works moment

About

Simple app for detecting (and annotating) hands

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages