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

Inference on random images using pre-trained models with demo.py does not produce meaningful results #90

Open
DavideDaz opened this issue Apr 21, 2021 · 2 comments

Comments

@DavideDaz
Copy link

Hi! and thank you for your great work.

After the installation I tried to run a random inference with the demo file:

python3 demo/demo.py --config-file configs/centermask/Base-CenterMask-ResNet.yaml --input demo/tennis.jpeg

But no detection were found:

[04/21 12:14:17 detectron2]: Arguments: Namespace(confidence_threshold=0.4, config_file='configs/centermask/Base-CenterMask-ResNet.yaml', input=['demo/tennis.jpeg'], opts=[], output=None, video_input=None, webcam=False) WARNING [04/21 12:14:17 d2.config.compat]: Config 'configs/centermask/Base-CenterMask-ResNet.yaml' has no VERSION. Assuming it to be compatible with latest v2. [04/21 12:14:20 detectron2]: demo/tennis.jpeg: detected 0 instances in 0.32s

I tried to lower the threshold to 0.01 to see if anything was detected and here is the result:

Screenshot from 2021-04-21 12-08-00

Is it any issue with the config?

@DavideDaz DavideDaz changed the title Inference on random images using pre-trained models with Demo.py does not produce meaningful results Inference on random images using pre-trained models with demo.py does not produce meaningful results Apr 21, 2021
@mfinean
Copy link

mfinean commented Jul 20, 2021

I also encounter the same issue - testing demo.py on single images via centermask does not seem to detect any instances across a range of test images. Any insights on this would be great.

@youngwanLEE
Copy link
Owner

youngwanLEE commented Jul 21, 2021

@DavideDaz @mfinean
Did you properly load the trained weight with MODEL.WEIGHTS argument?

Please refer to the official detectron2 demo instruction.

e.g.,
python3 demo/demo.py --config-file configs/centermask/centermask_V_39_eSE_FPN_ms_3x.yaml --input demo/tennis.jpeg --opts MODEL.WEIGHTS /path/to/the/weight_folder/centermask2-V-39-eSE-FPN-ms-3x.pth

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

3 participants