Giter VIP home page Giter VIP logo

heuristic-approach-for-har's Introduction

Heuristic Approach for HAR (Human Activity Recognition) using Computer Vision and Python

The initial steps will be as follows : <Assuming that the python 3.7 (64 bit is must !) is already installed, OpenCV is functional and libs like numpy are installed using pip3>

-Install python3, pip3 and virtualenv >

-Install git (pip install gitpython)

-Install TensorFlow from https://www.tensorflow.org/install/pip (...While Creating a virtual environment, the path I used was: $virtualenv --system-site-packages C:\Python\Python37\summer\VirtualEnvDir\Venv1.venv ...In the next step, , append the : "\Scripts\activate" to the path shown in the terminal) For those still facing difficulty in installing TensorFlow, refer to this link : https://stackoverflow.com/questions/38896424/tensorflow-not-found-using-pip

-protobuf, python3-tk will already be installed if using python3.7 (use >>> import tkinter)

-install slidingwindow using pip

-install git for python (follow https://hackernoon.com/install-git-on-windows-9acf2a1944f0 but only till the "Commonly Asked Questions". Add the path "C:\Program Files\Git\usr\bin" )

-Clone library from (https://github.com/ildoonet/tf-pose-estimation)to python directory (C:\Python\Python37\summer)

-Change dir to the cloned downloaded folder ($ cd tf-pose-estimation)

-change directry to the cloned folder (C:\Python\Python37\summer\PoseEstimation)

--install Cython using pip install Cython

-Install Visual Studio (for C++ 14)

-Open the "Requirements.txt" from the "tf-pose-estimation" folder and delete pycocotools because this installation is not meant for windows. Instead, Install pycocotools using:

pip3 install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"

-install requirements ($ pip3 install -r requirements.txt)

-Download "swig" inside C Drive (or your Home dir...look at the Environment Variable.png file in the repo above) from "https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.0.0/swigwin-4.0.0.zip/download?use_mirror=nchc" and follow instructions on "https://simpletutorials.com/c/2135/Installing+SWIG+on+Windows". (BEWARE! Swig application file will be executed without any window popping up. i.e, as soon as you download swig and click on application file, a screen will flash and disappear. It means it has done its work.) Rest of the steps should be followed from the link above.

-change dir. to pafprocess (cd C:\Python\Python37\summer\PoseEstimation\tf_pose) and execute "swig -python -c++ pafprocess.i && python setup.py build_ext --inplace"

-install wget using : "https://www.addictivetips.com/windows-tips/install-and-use-wget-in-windows-10/". But while in the environment variable step, don't follow his step and add path in "SYSTEM VARIABLE AND NOT USER VARIABLE !". For changes to appear, re-open cmd.

-I moved the image to be processed in the same dir. where run.py was saved in the PoseEstimation folder. and then run the command : python run.py --model=mobilenet_thin --resize=432x368 --image=p1.jpg (Although the histogram was not visible, due to some backend issue of matplotlib library ... can be solved here "https://www.pyimagesearch.com/2015/08/24/resolved-matplotlib-figures-not-showing-up-or-displaying/") : FOR LINUX USERS

"https://stackoverflow.com/a/56422557/9625777" FOR WINDOWS USERS

-To analyse the real time webcam, :$ python run_webcam.py --model=mobilenet_thin --resize=432x368 --camera=0 -The latest version boasts of running Pose Detection and Object Detection simultaneously. To do so, run : python run_webcam.py --model=mobilenet_thin --resize=432x368 --camera=0 --prototxt MobileNetSSD_deploy.prototxt.txt --mmodel MobileNetSSD_deploy.caffemodel

heuristic-approach-for-har's People

Contributors

pra-dan avatar

Stargazers

 avatar  avatar

Forkers

0xsubh

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.