Issue
BodyPix is an open-source machine learning model which allows for person and body-part segmentation in the browser with TensorFlow.js.
I will like to convert the model to a .pb frozen graph in order to use it on Python.
How can I do it?
I try to find the solution on different places, but not working.
Solution
- Download the model.json file
Eg: https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/resnet50/float/model-stride16.json
- Download Corresponding weights
https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/resnet50/float/group1-shard1of23.bin
…
https://storage.googleapis.com/tfjs-models/savedmodel/bodypix/resnet50/float/group1-shard23of23.bin
- Install tfjs_graph_converter
from https://github.com/patlevin/tfjs-to-tf
- Convert model to .pb file
tfjs_graph_converter path/to/js/model path/to/frozen/model.pb
Answered By – Ajai
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0