Convert image to transparent png

Hi there,

I have a simple python script that sends a base64 image to a human detection trained model and return the predictions.

I then add the bounding boxes to the image however what I need to do is convert the image to a png with only the detection’s present.

I suspect there is a way to do this with cv2 however Im wondering if anyone has any more efficient and reliable idea how I can make the image a transparent png showing only the humans my model detected.

Hi @Carl_James

Are you looking to keep the size of the original image and only have the detected area visible, while the rest is transparent?

Or, are you looking to crop an image based on bounding boxes?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.