Skip to content

AssertionError: Attribute 'thing_classes' in the metadata of 'coco_2017_train' cannot be set to a different value! #102

@Aruen24

Description

@Aruen24

[01/28 02:49:28 d2.data.datasets.coco]: Loading datasets/coco/annotations/instances_train2017.json takes 4.76 seconds.
Traceback (most recent call last):
File "projects/SparseRCNN/train_net.py", line 159, in
args=(args,),
File "/home/wyw/SparseR-CNN/detectron2/engine/launch.py", line 62, in launch
main_func(*args)
File "projects/SparseRCNN/train_net.py", line 145, in main
trainer = Trainer(cfg)
File "/home/wyw/SparseR-CNN/detectron2/engine/defaults.py", line 284, in init
data_loader = self.build_train_loader(cfg)
File "projects/SparseRCNN/train_net.py", line 52, in build_train_loader
return build_detection_train_loader(cfg, mapper=mapper)
File "/home/wyw/SparseR-CNN/detectron2/config/config.py", line 201, in wrapped
explicit_args = _get_args_from_config(from_config, *args, **kwargs)
File "/home/wyw/SparseR-CNN/detectron2/config/config.py", line 236, in _get_args_from_config
ret = from_config_func(*args, **kwargs)
File "/home/wyw/SparseR-CNN/detectron2/data/build.py", line 309, in _train_loader_from_config
proposal_files=cfg.DATASETS.PROPOSAL_FILES_TRAIN if cfg.MODEL.LOAD_PROPOSALS else None,
File "/home/wyw/SparseR-CNN/detectron2/data/build.py", line 222, in get_detection_dataset_dicts
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names]
File "/home/wyw/SparseR-CNN/detectron2/data/build.py", line 222, in
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names]
File "/home/wyw/SparseR-CNN/detectron2/data/catalog.py", line 58, in get
return f()
File "/home/wyw/SparseR-CNN/detectron2/data/datasets/coco.py", line 469, in
DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name))
File "/home/wyw/SparseR-CNN/detectron2/data/datasets/coco.py", line 71, in load_coco_json
meta.thing_classes = thing_classes
File "/home/wyw/SparseR-CNN/detectron2/data/catalog.py", line 150, in setattr
"to a different value!\n{} != {}".format(key, self.name, oldval, val)
AssertionError: Attribute 'thing_classes' in the metadata of 'coco_2017_train' cannot be set to a different value!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions