You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am learning detectron2 for using Faster R-CNN.
I could generate the bounding box in my task and I want to fill in bounding box by class with specific color.
I tried to read a document of detectron2 but it is difficult to understand for me.
The below is my code. would you please kindly advise to me?
from detectron2.utils.visualizer import ColorMode
import glob
for imageName in random.sample(glob.glob(os.path.join(test_path, '*.png')), 3):
im = cv2.imread(imageName)
outputs = predictor(im)
v = Visualizer(im[:, :, ::-1],
metadata=train_metadata,
scale=0.8
)
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
cv2_imshow(out.get_image()[:, :, ::-1])
Beta Was this translation helpful? Give feedback.
All reactions