Created
October 14, 2019 05:35
-
-
Save Tony607/dfe719641ebeb9d74e39fa09661a4734 to your computer and use it in GitHub Desktop.
How to train Detectron2 with Custom COCO Datasets | DLology
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from detectron2.utils.visualizer import Visualizer | |
for d in random.sample(dataset_dicts, 3): | |
img = cv2.imread(d["file_name"]) | |
visualizer = Visualizer(img[:, :, ::-1], metadata=fruits_nuts_metadata, scale=0.5) | |
vis = visualizer.draw_dataset_dict(d) | |
cv2_imshow(vis.get_image()[:, :, ::-1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment