-
Notifications
You must be signed in to change notification settings - Fork 188
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
我把从coco数据集换成了自己的数据集,但是出现了错误,我应该修改你的代码中的哪几个部分的代码 #98
Comments
Hi~ |
@18456432930 你解决了这个问题吗? |
It seems you still use 'coco_2017_train' as your dataset name in your config file, you can try to register your dataset use |
|
in your train_net.py is ok, add sth like this |
我把从coco数据集换成了自己的数据集,但是出现了错误,我应该修改你的代码中的哪几个部分的代码。
Traceback (most recent call last):
File "projects/SparseRCNN/train_net.py", line 159, in
args=(args,),
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/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/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 312, 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/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/config/config.py", line 201, in wrapped
explicit_args = _get_args_from_config(from_config, *args, **kwargs)
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/config/config.py", line 238, in _get_args_from_config
ret = from_config_func(*args, **kwargs)
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/build.py", line 314, in _train_loader_from_config
proposal_files=cfg.DATASETS.PROPOSAL_FILES_TRAIN if cfg.MODEL.LOAD_PROPOSALS else None,
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/build.py", line 227, in get_detection_dataset_dicts
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/build.py", line 227, in
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/catalog.py", line 58, in get
return f()
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/datasets/coco.py", line 489, in
DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name))
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/data/datasets/coco.py", line 80, in load_coco_json
meta.thing_classes = thing_classes
File "/home/libing/anaconda3/envs/detectron2/lib/python3.7/site-packages/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!
['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush'] != ['ship']
我把SSDD的数据集转换成了coco的格式,然后跑你的代码出现了这个问题,请问怎么解决?
The text was updated successfully, but these errors were encountered: