Video2ARKit/README.md

33 lines
879 B
Markdown

# Video2ARKit for Maya
Use google mediapipe to convert video to ARKit blendshape in maya
## Requirement
* Maya 2023+
* Python 3.9+
## Build and Install
```python
mayapy -m pip install mediapipe opencv-python
```
Set `MAYA_MODULE_PATH` to Video2ARKit.mod directory in Maya.env
```powershell
# Maya.env
MAYA_MODULE_PATH=[plugin_install_dir]/Video2ARKit
```
## Usage
The model file is in `Video2ARKit/models/face_landmarker.task` folder.
The source link is [Face Landmarker](https://ai.google.dev/edge/mediapipe/solutions/vision/face_landmarker?hl=zh-tw), download the `face_landmarker.task` and place into `Video2ARKit/models` folder.
**Load Plugin**
```python
from maya import cmds
cmds.loadPlugin("Video2ARKit.py")
```
**Convert Video to ARKit blendshape `.json`**
```python
from maya import cmds
cmds.a2vCmds(videoPath=r'C:\MyVideo.mp4', outputPath=r'C:\Output.json')
```