BodyPixBarracuda is an implementation of the BodyPix person segmentation and pose estimation model that runs on the Unity Barracuda neural network inference library.
- Unity 2020.3 LTS or later
I converted the original BodyPix model (provided as tfjs) into ONNX using tfjs-to-tf and tf2onnx. See the Colab notebook for further details.
This package supports the ResNet architecture (more accurate but slower and bigger models) but doesn't contain those ONNX files due to the file size limit of GitHub and npm.js. You can download them from here instead.
To use those models, create a new BodyPix ResourceSet file and set the model, architecture, and stride fields accordingly.
This package uses the scoped registry feature to resolve package dependencies. Please add the following sections to the manifest file (Packages/manifest.json).
To the scopedRegistries
section:
{
"name": "Keijiro",
"url": "https://registry.npmjs.com",
"scopes": [ "jp.keijiro" ]
}
To the dependencies
section:
"jp.keijiro.bodypix": "2.0.0"
After changes, the manifest file should look like below:
{
"scopedRegistries": [
{
"name": "Keijiro",
"url": "https://registry.npmjs.com",
"scopes": [ "jp.keijiro" ]
}
],
"dependencies": {
"jp.keijiro.bodypix": "2.0.0",
...