This is a Python and Tensorflow implementation of Posenet v2 released by Google in TensorflowJS.
- Clone this repo
- Add images to input folder
- Run the main.py as following
python3 main.py --model model-mobilenet_v2 --output_stride=16 --image_dir ./images --output_dir ./output
- Download models and weights from the links given in TFJS Model URL
- Install Tensorflow (tested on ver 1.15.0) and TensorflowJS (tested on ver 1.4.0)
- Install tfjs-to-tf converter from https://github.com/ajaichemmanam/tfjs-to-tf (CREDITS: @patlevin)
- After Installation run
tfjs_graph_converter path/to/js/model path/to/frozen/model.pb
in terminal - Copy the converted model to models folder
- Run
python3 main.py --model MODELNAME --output_stride=OUTPUTSTRIDE --image_dir ./images --output_dir ./output
- Patrick Levin for TFJS to TF converter
- Ross Wightman for initial work and code base (https://github.com/rwightman/posenet-python) on posenet