I am using Torchvision in a Python script to draw bounding boxes and then crop images based on the bounding boxes drawn. The script works well, except that the bounding boxes obscure the subjects in the cropped images if more than one subject were close to one another, so I would like bounding boxes to be transparent. I have checked the reference to Torchvision's draw_bounding_boxes function, but have not been able to figure out how to accomplish this.
This is currently how I am calling the function:
box = draw_bounding_boxes(img, boxes=prediction["boxes"],
labels=labels,
colors=(255, 0, 0, 0), # Red with 100% transparency
width=4, font_size=30)