This repository includes the official project of Mask Guided (MG) Matting, presented in our paper: Mask Guided Matting via Progressive Refinement Network
Other
331
stars
46
forks
source link
Add ONNX Export and MNN/TNN/ONNXRuntime C++ Demo #31
export_onnx.py to export dynamic and static onnx files.
infer_onnx.py, test demo.
C++ inference for MGMatting
export onnx:
# cd to code-base, then run
PYTHONPATH=. python3 ./export_onnx.py --dynamic --simplify --config ./config/MGMatting-DIM-100k.toml --checkpoint ./checkpoints/MGMatting-DIM-100k/latest_model.pth --output_path ./checkpoints/MGMatting-DIM-100k/latest_model.onnx
Features:
export onnx:
log:
infer_onnx
log:
the output is:
![test_onnx_output](https://user-images.githubusercontent.com/31974251/145847997-6c2f00ec-4d06-4194-8dad-3df8aa5d00e5.jpg)
@yucornetto