Replies: 1 comment
-
|
Go to "visualizer.py", remove the labels from the overlay_instances function call from draw_instance_predictions function. Edit: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Image 1 is the instance predictions done after training detectron2 model, image 2 is the binary image of image 1. In order to calculate number of pixel in the segmented area, i need to remove the class labels and the predictions percentage in the picture. How to do this? Annotations done using ROBOFLOW to download coco.json file
`import os
import cv2
import matplotlib.pyplot as plt
from detectron2.data import DatasetCatalog
from detectron2.utils.visualizer import Visualizer, ColorMode
predicted_images_path = os.path.abspath("/content/predicted")
dataset_dicts_validation = DatasetCatalog.get('void-detection-3-valid')
for d in dataset_dicts_validation:
im = cv2.imread(d["file_name"])
outputs = predictor(I'm)
Beta Was this translation helpful? Give feedback.
All reactions