Giter Site home page Giter Site logo

human-estimator's Introduction

Human-Estimator

Computer Vision model to calculate probability of human figure be a real human from openpose keypoints

How to run

To run the code.

  1. Install all the requirements in a virtualenv -
pip install -r requirements.txt
  1. Use following commands from the root path of repo -
python main.py -d <input_dir> -f <filename> -o <output_dir> -s <start_index> -e <end_index> -r <root_path> 

for my case - this looked like -

python main.py -d ../data/mf01d/ -f concated.mp4 -o ./videos/ -s 1000 -e 100000 -r ./

Features used ->

There are 4 custom-made features used in this repo. 1.) Position change feature 2.) Mean keypoints change features 3.) inter keypoints distance features -> this checks for motion in stationary people to check for life(motion) 4.) Zero mask similiarity feature

All other features except zero mask similiarity is understandable by their names.

Zero mask similiarity features

This mask majorly checks for continuity of keypoints to ensure that we are only checking changes from same number of keypoints. If this is way to variable and statistical mode of mask is skewed way towards 0 then we can assert that this as motion and defined that id as human

HumanEstimator.human_certainity (dict)

Once a person is added to human_certainity dictionary then we are sure that body is human and probability is fixed to 1. We are looking for human_certainity cause this helps us in ensuring that we are tracking a body rather than an inanimated object, Rest of the processing in pipelined for human analysis can simply check for that id in human_certainity and this can be easily done in parallel.

Notes

  1. For the sample data I have adjusted thresholds for 2 of the features ,i.e, mean_keypoints change feature and inter keypoints distance features as primary and secondary decider respectively.
  2. A person ID get in the people_getting_tracked dict only after there are some minimum number of frames, here 8. This is done to filter out some random id points being present in the video and this ensure that they are not getting tracked

Make sure to make separate output folder for each dataset to ensure that videos don't get overwrite.

TODO:

  1. Optimising human estimator. With some small changes and modification, speed and memory usage can be decreased.

human-estimator's People

Contributors

arjitkatare avatar

Watchers

 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.