mirror of https://github.com/ZHKKKe/MODNet.git
Colab demo is added
parent
b9e3dddc86
commit
86ebafa2c5
|
|
@ -1,5 +1,7 @@
|
||||||
# Inference with onnxruntime
|
# Inference with onnxruntime
|
||||||
|
|
||||||
|
Please try MODNet image matting onnx-inference demo with [Colab Notebook](https://colab.research.google.com/drive/1P3cWtg8fnmu9karZHYDAtmm1vj1rgA-f?usp=sharing)
|
||||||
|
|
||||||
Download [modnet.onnx](https://drive.google.com/file/d/1cgycTQlYXpTh26gB9FTnthE7AvruV8hd/view?usp=sharing)
|
Download [modnet.onnx](https://drive.google.com/file/d/1cgycTQlYXpTh26gB9FTnthE7AvruV8hd/view?usp=sharing)
|
||||||
|
|
||||||
### 1. Export onnx model
|
### 1. Export onnx model
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ if __name__ == '__main__':
|
||||||
# Optional - save png image without background
|
# Optional - save png image without background
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
im_PIL = Image.open(args.image_path)
|
# im_PIL = Image.open(args.image_path)
|
||||||
matte = Image.fromarray(matte)
|
# matte = Image.fromarray(matte)
|
||||||
im_PIL.putalpha(matte) # add alpha channel to keep transparency
|
# im_PIL.putalpha(matte) # add alpha channel to keep transparency
|
||||||
im_PIL.save('without_background.png')
|
# im_PIL.save('without_background.png')
|
||||||
Loading…
Reference in New Issue