detectron2: Problem with register_coco_instances while registering a COCO dataset
Hi, I am following this getting started Colab notebook. I am trying to train a custom model using the TACO dataset which comes as a COCO-formatted dataset.
I prepared this Colab notebook for doing the experiments with the dataset. After I registered the dataset using register_coco_instances I am not able to start the training process and the error I get looks like so:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
/content/detectron2_repo/detectron2/data/catalog.py in get(name)
51 try:
---> 52 f = DatasetCatalog._REGISTERED[name]
53 except KeyError:
KeyError: 'd'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
6 frames
/content/detectron2_repo/detectron2/data/catalog.py in get(name)
54 raise KeyError(
55 "Dataset '{}' is not registered! Available datasets are: {}".format(
---> 56 name, ", ".join(DatasetCatalog._REGISTERED.keys())
57 )
58 )
KeyError: "Dataset 'd' is not registered! Available datasets are: coco_2014_train, coco_2014_val, coco_2014_minival, coco_2014_minival_100, coco_2014_valminusminival, coco_2017_train, coco_2017_val, coco_2017_val_100, keypoints_coco_2014_train, keypoints_coco_2014_val, keypoints_coco_2014_minival, keypoints_coco_2014_valminusminival, keypoints_coco_2014_minival_100, keypoints_coco_2017_train, keypoints_coco_2017_val, keypoints_coco_2017_val_100, coco_2017_train_panoptic_separated, coco_2017_train_panoptic_stuffonly, coco_2017_val_panoptic_separated, coco_2017_val_panoptic_stuffonly, coco_2017_val_100_panoptic_separated, coco_2017_val_100_panoptic_stuffonly, lvis_v0.5_train, lvis_v0.5_val, lvis_v0.5_val_rand_100, lvis_v0.5_test, cityscapes_fine_instance_seg_train, cityscapes_fine_sem_seg_train, cityscapes_fine_instance_seg_val, cityscapes_fine_sem_seg_val, cityscapes_fine_instance_seg_test, cityscapes_fine_sem_seg_test, voc_2007_trainval, voc_2007_train, voc_2007_val, voc_2007_test, voc_2012_trainval, voc_2012_train, voc_2012_val, my_dataset, taco_dataset"
The above-mentioned notebook can be used to reproduce the issue.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (5 by maintainers)
@zsc1220 it seems the dataset is not registered when you use multiple GPUs. Where do you register the dataset? In
train_netyou might need to register it in themain()function.cfg.DATASETS.TRAINshould be a tuple of strings however yours is a string.I face the same error and according to your tutorial it should be a string (path) Here are lines from your code: