Skip to content
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

FileNotFoundError: [Errno 2] No such file or directory: '../../demo/annotations/demo_val.json' #67

Open
woo1 opened this issue Dec 31, 2021 · 0 comments

Comments

@woo1
Copy link

woo1 commented Dec 31, 2021

When I run this code for human instance segmentation, this error raises.
(https://github.com/PeikeLi/Self-Correction-Human-Parsing/blob/master/mhp_extension/demo.ipynb)
"
!python finetune_net.py
--num-gpus 1
--config-file ../configs/Misc/demo.yaml
--eval-only MODEL.WEIGHTS ../../pretrain_model/detectron2_maskrcnn_cihp_finetune.pth TEST.AUG.ENABLED False DATALOADER.NUM_WORKERS 0
"

Traceback (most recent call last):
File "finetune_net.py", line 182, in
args=(args,),
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/engine/launch.py", line 82, in launch
main_func(*args)
File "finetune_net.py", line 152, in main
res = Trainer.test(cfg, model)
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 602, in test
data_loader = cls.build_test_loader(cfg, dataset_name)
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/engine/defaults.py", line 558, in build_test_loader
return build_detection_test_loader(cfg, dataset_name)
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/config/config.py", line 207, in wrapped
explicit_args = _get_args_from_config(from_config, *args, **kwargs)
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/config/config.py", line 245, in _get_args_from_config
ret = from_config_func(*args, **kwargs)
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/data/build.py", line 456, in _test_loader_from_config
else None,
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/data/build.py", line 241, in get_detection_dataset_dicts
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/data/build.py", line 241, in
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/data/catalog.py", line 58, in get
return f()
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/data/datasets/coco.py", line 500, in
DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name))
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/detectron2/data/datasets/coco.py", line 69, in load_coco_json
coco_api = COCO(json_file)
File "/Self-Correction-Human-Parsing/venv/lib/python3.7/site-packages/pycocotools/coco.py", line 81, in init
with open(annotation_file, 'r') as f:

Should I prepare some other files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant