register dataset in COCO format #3056
andresviana
started this conversation in
General
Replies: 2 comments
-
I don't know how are you handling your paths, but it seems you have a problem with different systems (windows and Linux) ways to handle the path. In python a good politics is to use os.path.join(firstPart, secondPart,....) (https://docs.python.org/3/library/os.path.html) so that you are independent of the architecture you are using. I hope it helps |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks Daniel for your answer!! I think that issue it's related in how DatasetCatalog.register handling the paths when it creates Metadata dictionary from Google Colab. I'll be trying. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys, in colab I'm following the tutorial for register a custom dataset on COCO annotations format:
from detectron2.data.datasets import register_coco_instances
register_coco_instances("my_dataset_train", {}, "./content/train/annotations.json", "./content/train/images")
register_coco_instances("my_dataset_val", {}, "./content/val/annotations.json", "./content/val/images")
register_coco_instances("my_dataset_test", {}, "./content/test/annotations.json", "./content/test/images")
I found in Standard Dataset Dicts that file_name charged the full path to the image file but with a double back slash before the image file name:
'file_name': './content/train/images/JPEGImages\\frame5127.jpg'
Any idea about how could I fix it?
Thanks!!
Beta Was this translation helpful? Give feedback.
All reactions