Skip to content

Commit

Permalink
fix for preparing npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
creativeIKEP committed Oct 4, 2021
1 parent dbea398 commit 33279c9
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 11 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish_to_npmjs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Unity Package to npmjs.com

on:
release:
types: [published]

jobs:
publish_unity_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
- run: npm publish
working-directory: Packages/PoseDetectionBarracuda
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
44 changes: 39 additions & 5 deletions Packages/PoseDetectionBarracuda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,58 @@ PoseDetectionBarracuda is a human pose detecter that runs the [Mediapipe Pose](h

PoseDetectionBarracuda implementation is inspired by [BlazePalmBarracuda](https://github.com/keijiro/BlazePalmBarracuda) and I referenced [his](https://github.com/keijiro) source code.(Thanks, [keijiro](https://github.com/keijiro)!).

### Install
## Install
PoseDetectionBarracuda can be installed with npm or GitHub URL.

### Install from npm (Recommend)
PoseDetectionBarracuda can be installed by adding following sections to the manifest file (Packages/manifest.json).

To the `scopedRegistries` section:
```
{
"name": "creativeikep",
"url": "https://registry.npmjs.com",
"scopes": [ "jp.ikep" ]
}
```
To the `dependencies` section:
```
"jp.ikep.mediapipe.posedetection": "1.0.0"
```
Finally, the manifest file looks like below:
```
{
"scopedRegistries": [
{
"name": "creativeikep",
"url": "https://registry.npmjs.com",
"scopes": [ "jp.ikep" ]
}
],
"dependencies": {
"jp.ikep.mediapipe.posedetection": "1.0.0",
...
}
}
```

PoseDetectionBarracuda can be installed by adding below URL on the Unity Package Manager's window.
```
https://github.com/creativeIKEP/PoseDetectionBarracuda.git?path=Packages/PoseDetectionBarracuda#v1.0.0
```

### Demo Image
## Demo Image
Demo image was downloaded from [here](https://unsplash.com/photos/4jqfc2vbHJQ).

### ONNX Model
## ONNX Model
The ONNX model files have been converted for Unity Barracuda from Mediapipe's ["pose_detection.tflite"](https://github.com/google/mediapipe/blob/0.8.3.2/mediapipe/modules/pose_detection/pose_detection.tflite) file.
The conversion operation is the same as [FaceLandmarkBarracuda](https://github.com/keijiro/FaceLandmarkBarracuda) by [keijiro](https://github.com/keijiro).
Check [his operation script](https://colab.research.google.com/drive/1C6zEB3__gcHEWnWRm-b4jIA0srA1gkyq?usp=sharing) for details.

### Author
## Author
[IKEP](https://ikep.jp)

### LICENSE
## LICENSE
Copyright (c) 2021 IKEP

[Apache-2.0](/LICENSE.md)
4 changes: 3 additions & 1 deletion Packages/PoseDetectionBarracuda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
],
"dependencies": {
"com.unity.barracuda": "2.0.0-pre.3"
}
},
"license": "Apache-2.0",
"repository": "github:creativeIKEP/PoseDetectionBarracuda"
}
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,59 @@ PoseDetectionBarracuda is a human pose detecter that runs the [Mediapipe Pose](h

PoseDetectionBarracuda implementation is inspired by [BlazePalmBarracuda](https://github.com/keijiro/BlazePalmBarracuda) and I referenced [his](https://github.com/keijiro) source code.(Thanks, [keijiro](https://github.com/keijiro)!).

### Install
## Install
PoseDetectionBarracuda can be installed with npm or GitHub URL.

### Install from npm (Recommend)
PoseDetectionBarracuda can be installed by adding following sections to the manifest file (Packages/manifest.json).

To the `scopedRegistries` section:
```
{
"name": "creativeikep",
"url": "https://registry.npmjs.com",
"scopes": [ "jp.ikep" ]
}
```
To the `dependencies` section:
```
"jp.ikep.mediapipe.posedetection": "1.0.0"
```
Finally, the manifest file looks like below:
```
{
"scopedRegistries": [
{
"name": "creativeikep",
"url": "https://registry.npmjs.com",
"scopes": [ "jp.ikep" ]
}
],
"dependencies": {
"jp.ikep.mediapipe.posedetection": "1.0.0",
...
}
}
```

### Install from GitHub URL
PoseDetectionBarracuda can be installed by adding below URL on the Unity Package Manager's window.
```
https://github.com/creativeIKEP/PoseDetectionBarracuda.git?path=Packages/PoseDetectionBarracuda#v1.0.0
```

### Demo Image
## Demo Image
[This image](/Assets/Image/demoImage.jpg) for demo scene(["SampleScene.unity"](/Assets/Scenes/SampleScene.unity)) was downloaded from [here](https://unsplash.com/photos/4jqfc2vbHJQ).

### ONNX Model
## ONNX Model
The ONNX model files have been converted for Unity Barracuda from Mediapipe's ["pose_detection.tflite"](https://github.com/google/mediapipe/blob/0.8.3.2/mediapipe/modules/pose_detection/pose_detection.tflite) file.
The conversion operation is the same as [FaceLandmarkBarracuda](https://github.com/keijiro/FaceLandmarkBarracuda) by [keijiro](https://github.com/keijiro).
Check [his operation script](https://colab.research.google.com/drive/1C6zEB3__gcHEWnWRm-b4jIA0srA1gkyq?usp=sharing) for details.

### Author
## Author
[IKEP](https://ikep.jp)

### LICENSE
## LICENSE
Copyright (c) 2021 IKEP

[Apache-2.0](/LICENSE.md)

0 comments on commit 33279c9

Please sign in to comment.