I am learning how to use detectron2 well. And I could do predicting the bounding box. But, I also want to put the bounding box coordinate on the image. For this, I use cv2.putext library. but it did not work. Could you please make the below code can show bounding box coordinate on the images?
from detectron2.utils.visualizer import ColorMode
import glob
for imageName in glob.glob(os.path.join(test_path, '*jpg')):
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])