-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError: Attribute 'thing_classes' in the metadata of 'coco_2017_train' cannot be set to a different value! #102
Comments
I ran into a similar problem: [04/25 14:33:54 d2.data.datasets.coco]: Loading datasets/coco/annotations/instances_train2017.json takes 3.33 seconds. I'm trying to figure it out, have you solved this problem? |
The problem was that I refered to a wrong annotation file. |
[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!
The text was updated successfully, but these errors were encountered: