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

error: unrecognized arguments: --json_out work_dirs/demo_KGDet.json #2

Closed
kritanjalijain opened this issue Oct 11, 2021 · 1 comment

Comments

@kritanjalijain
Copy link

So I am trying to run this notebook on colab and I tried to run the line for demo on test images

  • I tried this
    # single-gpu testing !python tools/test.py /content/drive/MyDrive/KGDet/KGDet/configs/kgdet_moment_r50_fpn_1x-demo.py /content/drive/MyDrive/KGDet/KGDet/checkpoints/KGDet_epoch-12.pth --json_out work_dirs/demo_KGDet.json --eval bbox keypoints

and got the error test.py: error: unrecognized arguments: --json_out work_dirs/demo_KGDet.json

If I remove json from json_out then it raises a pkl file error

  • Alternatively, I tried ! ./tools/dist_test.sh /content/drive/MyDrive/KGDet/KGDet/configs/kgdet_moment_r50_fpn_1x-demo.py /content/drive/MyDrive/KGDet/KGDet/checkpoints/KGDet_epoch-12.pth 1 --json_out work_dirs/demo_KGDet.json --eval bbox keypoints

and got /bin/bash: ./tools/dist_test.sh: /usr/bin/env: bad interpreter: Permission denied

Is there a tutorial to run this on colab ?

I also tried following mmdetection's colab notebook tutorial and tried this
from mmdet.apis import inference_detector, init_detector, show_result_pyplot config = '/content/drive/MyDrive/KGDet/KGDet/configs/kgdet_moment_r50_fpn_1x-demo.py' checkpoint = '/content/drive/MyDrive/KGDet/KGDet/checkpoints/KGDet_epoch-12.pth' model = init_detector(config, checkpoint, device='cuda:0')

but ended up getting KeyError: 'RepPointsDetectorKp is not in the models registry'

@ShenhanQian
Copy link
Owner

Sorry, we have only tested the repo in the native Linux shell, and Colab is not supported officially.
According to this line, the program should accept --json_out as an argument. Maybe you can print the received arguments args to debug.

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

2 participants