From 72c6e919a00466400bcd05033d8251f67f7c94fa Mon Sep 17 00:00:00 2001 From: Zhanghan Ke Date: Thu, 18 Feb 2021 13:35:16 +0800 Subject: [PATCH] Revert "Colab demo is added" This reverts commit 86ebafa2c502d20a7bd126a92f786000b3f1b3b1. --- demo/image_matting/Inference_with_ONNX/README.md | 2 -- demo/image_matting/Inference_with_ONNX/inference_onnx.py | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/demo/image_matting/Inference_with_ONNX/README.md b/demo/image_matting/Inference_with_ONNX/README.md index 0403fb9..cb3f295 100644 --- a/demo/image_matting/Inference_with_ONNX/README.md +++ b/demo/image_matting/Inference_with_ONNX/README.md @@ -1,7 +1,5 @@ # 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) ### 1. Export onnx model diff --git a/demo/image_matting/Inference_with_ONNX/inference_onnx.py b/demo/image_matting/Inference_with_ONNX/inference_onnx.py index cccfa23..f19827e 100644 --- a/demo/image_matting/Inference_with_ONNX/inference_onnx.py +++ b/demo/image_matting/Inference_with_ONNX/inference_onnx.py @@ -110,7 +110,7 @@ if __name__ == '__main__': # Optional - save png image without background ############################################## - # im_PIL = Image.open(args.image_path) - # matte = Image.fromarray(matte) - # im_PIL.putalpha(matte) # add alpha channel to keep transparency - # im_PIL.save('without_background.png') \ No newline at end of file + im_PIL = Image.open(args.image_path) + matte = Image.fromarray(matte) + im_PIL.putalpha(matte) # add alpha channel to keep transparency + im_PIL.save('without_background.png') \ No newline at end of file