How to use the detectron2/tools/visualize_data.py for custom dataset? #4781
Unanswered
suryasid09
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am new to detectron2, and I would really appreciate any help/ideas.
My question is how I can use thedetectron2/tools/visualize_data.py for custom dataset. I have registered the custom dataset in another files, and it is working fine when I train and use evaluation code over it. But, when I use visualize_data from detectron2 github repository, it throws an error that my dataset is not registered. When I see the error, I cannot see the dataset that I registered. Does it mean I need to registered again the custom dataset in visualizer code? if so, can you guys guide me how to do it?
[02/09 08:19:53 detectron2]: Arguments: Namespace(config_file='/home/jovyan/thesis_s2577712/DeFRCN_voc_format/thesis-pascal_voc_format/checkpoints/voc/runDeFrcn/defrcn_fsod_r101_novel1/fsrw-like/1shot_seed0_repeat0/config1.yaml', opts=[], output_dir='/home/jovyan/thesis_s2577712/DeFRCN_voc_format', show=True, source='dataloader')
Traceback (most recent call last):
File "/home/jovyan/.local/lib/python3.8/site-packages/detectron2/data/catalog.py", line 51, in get
f = self[name]
File "/usr/lib/python3.8/collections/init.py", line 1010, in getitem
raise KeyError(key)
KeyError: 'voc_2007_trainval_novel1_1shot_seed0'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jovyan/thesis_s2577712/DeFRCN_voc_format/thesis-pascal_voc_format/defrcn/data/visualize_data.py", line 69, in
train_data_loader = build_detection_train_loader(cfg)
File "/home/jovyan/.local/lib/python3.8/site-packages/detectron2/config/config.py", line 201, in wrapped
explicit_args = _get_args_from_config(from_config, *args, **kwargs)
File "/home/jovyan/.local/lib/python3.8/site-packages/detectron2/config/config.py", line 236, in _get_args_from_config
ret = from_config_func(*args, **kwargs)
File "/home/jovyan/.local/lib/python3.8/site-packages/detectron2/data/build.py", line 301, in _train_loader_from_config
dataset = get_detection_dataset_dicts(
File "/home/jovyan/.local/lib/python3.8/site-packages/detectron2/data/build.py", line 220, in get_detection_dataset_dicts
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names]
File "/home/jovyan/.local/lib/python3.8/site-packages/detectron2/data/build.py", line 220, in
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names]
File "/home/jovyan/.local/lib/python3.8/site-packages/detectron2/data/catalog.py", line 53, in get
raise KeyError(
KeyError: "Dataset 'voc_2007_trainval_novel1_1shot_seed0' 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_test, coco_2017_test-dev, 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_train_panoptic, coco_2017_val_panoptic_separated, coco_2017_val_panoptic_stuffonly, coco_2017_val_panoptic, coco_2017_val_100_panoptic_separated, coco_2017_val_100_panoptic_stuffonly, coco_2017_val_100_panoptic, lvis_v1_train, lvis_v1_val, lvis_v1_test_dev, lvis_v1_test_challenge, lvis_v0.5_train, lvis_v0.5_val, lvis_v0.5_val_rand_100, lvis_v0.5_test, lvis_v0.5_train_cocofied, lvis_v0.5_val_cocofied, 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, cityscapes_fine_panoptic_train, cityscapes_fine_panoptic_val, voc_2007_trainval, voc_2007_train, voc_2007_val, voc_2007_test, voc_2012_trainval, voc_2012_train, voc_2012_val, ade20k_sem_seg_train, ade20k_sem_seg_val"
Beta Was this translation helpful? Give feedback.
All reactions