Code Monkey home page Code Monkey logo

hands-annotation's Introduction

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

hands-annotation's People

Contributors

hgaiser avatar de-vri-es avatar martinmatak avatar yhenon avatar dependabot[bot] avatar mihaimorariu avatar fangwudi avatar awilliamson avatar wassname avatar enricoliscio avatar hello-program avatar mxvs avatar

Watchers

James Cloos avatar  avatar

hands-annotation's Issues

Layer error

Im getting this error while trying to run the code.

Traceback (most recent call last):
  File "/Users/user/Downloads/hands-annotation-master/examples/ca.py", line 2, in <module>
    from keras_retinanet.models.resnet import custom_objects
  File "/Users/user/Downloads/hands-annotation-master/keras_retinanet/models/resnet.py", line 18, in <module>
    import keras_resnet
  File "/Users/user/.local/lib/python3.6/site-packages/keras_resnet/__init__.py", line 1, in <module>
    from . import layers
  File "/Users/user/.local/lib/python3.6/site-packages/keras_resnet/layers/__init__.py", line 1, in <module>
    from ._batch_normalization import BatchNormalization
  File "/Users/user/.local/lib/python3.6/site-packages/keras_resnet/layers/_batch_normalization.py", line 4, in <module>
    class BatchNormalization(keras.layers.BatchNormalization):
AttributeError: module 'keras' has no attribute 'layers'

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.