question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with register_coco_instances while registering a COCO dataset

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17

github_iconTop GitHub Comments

15reactions
ppwwyyxxcommented, Nov 15, 2019

@zsc1220 it seems the dataset is not registered when you use multiple GPUs. Where do you register the dataset? In train_net you might need to register it in the main() function.

9reactions
ppwwyyxxcommented, Nov 6, 2019

cfg.DATASETS.TRAIN should be a tuple of strings however yours is a string.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I register a dataset to use with detectron2? We have ...
I am using Grocery image data and I have annotations in COCO format. I am having a problem with model loading. Model is...
Read more >
Training and Evaluating FiftyOne Datasets with Detectron2
Loading predictions from a detectron2 model into a FiftyOne dataset ... Since the COCO dataset doesn't have a “Vehicle registration plates” category, ...
Read more >
Source code for detectron2.data.datasets.coco
Currently supports instance detection, instance segmentation, and person keypoints annotations. Args: json_file (str): full path to the json file in COCO ...
Read more >
Writing custom datasets - TensorFlow
Follow this guide to create a new dataset (either in TFDS or in your own repository). Check our list of datasets to see...
Read more >
DETECTRON2 Custom Object Detection, Custom Instance ...
Detectron2 custom object detection and custom instance segmentation tutorial. This second part of the tutorial explains how to train custom ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found