I am trying to use DeepLab v3 to detect object and mask where the actual object is.
DeepLab model produces a resized_im
(3D) and a mask seg_map
(2D) of 0 and non-zero values, 0 means it's the background.
Currently, it is only possible to plot an image with an overlay mask on the object. I want to crop the object out of the resized_im
with transparent background. Is there any advice for the work?
You can play around with the notebook here: https://colab.research.google.com/drive/138dTpcYfne40hqrb13n_36okSGYhrJnz?usp=sharing&hl=en#scrollTo=p47cYGGOQE1W&forceEdit=true&sandboxMode=true
I also tried here: How to crop image based on binary mask but none seems to work on my case