SamsungLabs / iterdet

[S+SSPR2020] IterDet: Iterative Scheme for Object Detection in Crowded Environments
https://arxiv.org/abs/2005.05708
Mozilla Public License 2.0
210 stars 39 forks source link

Unable to run demo on test image #6

Closed Ashwin-Ramesh2607 closed 4 years ago

Ashwin-Ramesh2607 commented 4 years ago

I tried to run a demo test on a single image. Firstly, I installed mmdetection as per the docs. But I am facing this issue, please help. Command

!python3 demo/image_demo.py demo/demo.jpg configs/iterdet/crowd_human_full_faster_rcnn_r50_fpn_2x.py crowd_human_full_faster_rcnn_r50_fpn_2x.pth

Error

Traceback (most recent call last):
  File "demo/image_demo.py", line 26, in <module>
    main()
  File "demo/image_demo.py", line 18, in main
    model = init_detector(args.config, args.checkpoint, device=args.device)
  File "/content/mmdetection/mmdet/apis/inference.py", line 33, in init_detector
    model = build_detector(config.model, test_cfg=config.test_cfg)
  File "/content/mmdetection/mmdet/models/builder.py", line 48, in build_detector
    return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
  File "/content/mmdetection/mmdet/models/builder.py", line 20, in build
    return build_from_cfg(cfg, registry, default_args)
  File "/usr/local/lib/python3.6/dist-packages/mmcv/utils/registry.py", line 158, in build_from_cfg
    f'{obj_type} is not in the {registry.name} registry')
KeyError: 'IterDetFasterRCNN is not in the detector registry'
filaPro commented 4 years ago

Hi @Ashwin-Ramesh2607 Looks like you have installed original open-mmlab/mmdetection (according to path is the traceback /content/mmdetection/mmdet/models/builder.py) instead of saic-vul/iterdet. If I'm not mistaken you may need to update

git clone https://github.com/open-mmlab/mmdetection.git

with

git clone https://github.com/saic-vul/iterdet.git .

All other installation steps are the same.

Ashwin-Ramesh2607 commented 4 years ago

Perfect, that works! I will close the issue. I really appreciate the amazing work!