mmdetection icon indicating copy to clipboard operation
mmdetection copied to clipboard

KeyError: 'model'

Open ghfSlience opened this issue 1 year ago • 2 comments

“grounding_dino_swin-t_pretrain_obj365_goldg_grit9m_v3det_20231204_095047-b448804b.pth”。This model cannot be used in the official demo code of Grounded Dino。An error is reported when running the code:KeyError: 'model'

ghfSlience avatar Apr 14 '24 06:04 ghfSlience

I have encountered the same problem as you, does anyone know how to solve it

XiaoSiJi-GCY avatar Sep 18 '24 09:09 XiaoSiJi-GCY

""" D:\AcademicResearch\PaperCode\MMCV_tutorials\mmdetection-main\data\coco\val2017\2.jpg D:\AcademicResearch\PaperCode\MMCV_tutorials\mmdetection-main\tools\work_dirs\deformable-detr_r50_16xb2-50e_coco\my20240918_deformable-detr_r50_16xb2-50e_coco.py D:\AcademicResearch\PaperCode\MMCV_tutorials\mmdetection-main\tools\work_dirs\deformable-detr_r50_16xb2-50e_coco\latest.pth """ def parse_args(): parser = ArgumentParser() parser.add_argument( # 'inputs', type=str, help='Input image file or folder path.') 'inputs', type=str, help='Input image file or folder path.') parser.add_argument( 'model', type=str, help='Config or checkpoint .pth file or the model name ' 'and alias defined in metafile. The model configuration ' 'file will try to read from .pth if the parameter is ' 'a .pth weights file.') parser.add_argument('--weights', default=None, help='Checkpoint file') 貌似不需要直接改动‘inputs’、‘model’和‘--weights’,这样就不会报错KeyError: 'model'

XiaoSiJi-GCY avatar Sep 18 '24 09:09 XiaoSiJi-GCY