xingyizhou / CenterNet2

Two-stage CenterNet
Apache License 2.0
1.2k stars 188 forks source link

Get error when run demo.py #21

Closed lfxx closed 3 years ago

lfxx commented 3 years ago

run: python projects/CenterNet2/demo.py --config-file projects/CenterNet2/configs/CenterNet2_R2-101-DCN-BiFPN_4x+4x_1560_ST.yaml --opts MODEL.WEIGHTS models/CenterNet2_R2-101-DCN-BiFPN_4x+4x_1560_ST.pth --input images/tupian/* the error is below: WARNING [03/23 03:24:43 d2.config.compat]: Config 'projects/CenterNet2/configs/CenterNet2_R2-101-DCN-BiFPN_4x+4x_1560_ST.yaml' has no VERSION. Assuming it to be compatible with latest v2. Traceback (most recent call last): File "projects/CenterNet2/demo.py", line 78, in <module> cfg = setup_cfg(args) File "projects/CenterNet2/demo.py", line 28, in setup_cfg cfg.merge_from_list(args.opts) File "/opt/conda/lib/python3.8/site-packages/fvcore-0.1.3.post20210317-py3.8.egg/fvcore/common/config.py", line 134, in merge_from_list File "/opt/conda/lib/python3.8/site-packages/yacs-0.1.8-py3.8.egg/yacs/config.py", line 243, in merge_from_list _assert_with_logging(subkey in d, "Non-existent key: {}".format(full_key)) File "/opt/conda/lib/python3.8/site-packages/yacs-0.1.8-py3.8.egg/yacs/config.py", line 545, in _assert_with_logging assert cond, msg AssertionError: Non-existent key: --input

lfxx commented 3 years ago

solved

Muhammadadeelaltaf commented 2 years ago

[01/24 17:00:31 detectron2]: Arguments: Namespace(confidence_threshold=0.3, config_file='projects/CenterNet2/configs/CenterNet2_R50_1x.yaml', input=['test_images'], opts=['MODEL.WEIGHTS', 'models/CenterNet2_R50_1x.pth'], output=None, video_input=None, webcam=False) WARNING [01/24 17:00:31 d2.config.compat]: Config 'projects/CenterNet2/configs/CenterNet2_R50_1x.yaml' has no VERSION. Assuming it to be compatible with latest v2. Traceback (most recent call last): File "projects/CenterNet2/demo.py", line 80, in demo = VisualizationDemo(cfg) File "/media/adeel/583C119E3C117868/CenterNet2/CenterNet2-master/projects/CenterNet2/predictor.py", line 35, in init self.predictor = DefaultPredictor(cfg) File "/media/adeel/583C119E3C117868/CenterNet2/CenterNet2-master/detectron2/engine/defaults.py", line 288, in init checkpointer.load(cfg.MODEL.WEIGHTS) File "/media/adeel/583C119E3C117868/CenterNet2/CenterNet2-master/detectron2/checkpoint/detection_checkpoint.py", line 52, in load ret = super().load(path, *args, **kwargs) File "/home/adeel/yes/envs/centerpoint/lib/python3.6/site-packages/fvcore/common/checkpoint.py", line 153, in load assert os.path.isfile(path), "Checkpoint {} not found!".format(path) AssertionError: Checkpoint models/CenterNet2_R50_1x.pth not found!

I am getting this error. Can you help me out?