manisaiprasad / fitfForTrain-starter-Tensorflow

fitfForTrain starter (tf-pose-estimation)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fitfForTrain starter (tf-pose-estimation)

pose estimation algorithm, have been implemented using Tensorflow. It also provides several variants that have some changes to the network structure for real-time processing on the CPU or low-power embedded devices.

You can even run this on your macbook with a descent FPS!

Original Repo(Caffe) : https://github.com/CMU-Perceptual-Computing-Lab/openpose

Install

Dependencies

You need dependencies below.

Pre-Install Jetson case

$ sudo apt-get install libllvm-7-ocaml-dev libllvm7 llvm-7 llvm-7-dev llvm-7-doc llvm-7-examples llvm-7-runtime
$ export LLVM_CONFIG=/usr/bin/llvm-config-7 

Install

Clone the repo and install 3rd-party libraries.

$ pip3 install -r requirements.txt

Build c++ library for post processing.

$ cd tf_pose/pafprocess
$ swig -python -c++ pafprocess.i && python3 setup.py build_ext --inplace

Models & Performances

Download Tensorflow Graph File(pb file)

Before running demo, you should download graph files. You can deploy this graph on your mobile or other platforms.

  • cmu (trained in 656x368)
  • mobilenet_thin (trained in 432x368)
  • mobilenet_v2_large (trained in 432x368)
  • mobilenet_v2_small (trained in 432x368)

CMU's model graphs are too large for git, so I uploaded them on an external cloud. You should download them if you want to use cmu's original model. Download scripts are provided in the model folder.

$ cd models/graph/cmu
$ bash download.sh

Python Usage

See run.py or run_webcam.py as references.

e = TfPoseEstimator(get_graph_path(args.model), target_size=(w, h))
humans = e.inference(image)
image = TfPoseEstimator.draw_humans(image, humans, imgcopy=False)

If you installed it as a package,

import tf_pose
coco_style = tf_pose.infer(image_path)

Open source comming soon for FitTrain

About

fitfForTrain starter (tf-pose-estimation)


Languages

Language:PureBasic 80.5%Language:Python 8.2%Language:C++ 7.1%Language:C 4.0%Language:Shell 0.1%Language:Dockerfile 0.1%Language:CMake 0.0%