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

demo cannot work #768

Open
linchunmian opened this issue Jul 6, 2020 · 12 comments
Open

demo cannot work #768

linchunmian opened this issue Jul 6, 2020 · 12 comments

Comments

@linchunmian
Copy link

各位好,我按教程配好环境,然后跑了下demo,可是运行了images文件下所有的图片,结果都是一样的,预测的矩形框位置都是在图片上方,这是什么原因呢?
ctdet_screenshot_07 07 2020

@xingyizhou
Copy link
Owner

This is because the last layer of the model is not properly loaded. Have you seen any skip loading xxx information in the log? If so, please make sure your --arch matches the model you loaded. See readme for details.

@linchunmian
Copy link
Author

This is because the last layer of the model is not properly loaded. Have you seen any skip loading xxx information in the log? If so, please make sure your --arch matches the model you loaded. See readme for details.

Thanks. I check the detailed information in readme, again.
(1) firstly, I use ctdet_coco_dla_2x for object detection, and run 'python demo.py ...'
(2) It seems not to occur any skip loading xxx information in the log file, which confuses me more.
I follow the installation and get_start process step by step, but stuck in it.
What need I do next, or how do I check this problem?

@xingyizhou
Copy link
Owner

Can you show the exact command you run?

@linchunmian
Copy link
Author

Can you show the exact command you run?
It is
'python demo.py ctdet --demo ../images --load_model ../ctdet_coco_dla_2x.pth'

@xingyizhou
Copy link
Owner

That should be correct. Can you show the full log as well? Also, please make sure you haven't modified any code.

@linchunmian
Copy link
Author

Thanks for reply!
When I rerun the demo.py file, the log information is as follow:
Screenshot from 2020-07-09 16-12-10
It indeed skips loading parameter, but I never modify any code.
So, How can I do to solve the parameter skipping probem?
Any help you provided would be appreciated!

@xingyizhou
Copy link
Owner

That's strange, can you try re-download and re-install the code? It shows your model uses a last later of 12 categories, which is never used in my version. An easier way is to add --num_classes 80 in the command, but I really have no idea why it is 12 categories by default.

@topdou96
Copy link

topdou96 commented Jul 9, 2020

你好,在CenterNet/src/lib/opts.py 里把 hm参数改成和你对应的大小(也就是把12改成80)就可以了

@topdou96
Copy link

topdou96 commented Jul 9, 2020

你好,在CenterNet/src/lib/opts.py 里把 hm参数改成和你对应的大小(也就是把12改成80)就可以了。
hm参数也就是num_classes 例如如果你用的是ctdet,就把ctdet那一栏的‘num_classes’从12改成80

@linchunmian
Copy link
Author

@xingyizhou @topdou96
Sorry for delay, and thanks very much for your help!
I have run demo sucessfully!

@linchunmian
Copy link
Author

It is great job. Though coco-pretrained model weight is used for my own image, it still presents excellent detection performance!

@hlq1025
Copy link

hlq1025 commented Sep 22, 2020

This is because the last layer of the model is not properly loaded. Have you seen any skip loading xxx information in the log? If so, please make sure your --arch matches the model you loaded. See readme for details.

I am new to centernet.Could you tell me the backbone of dddnet of the pretrained model?

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

4 participants