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/demo.py的一个小问题 #46

Open
YizhuoYu opened this issue Aug 3, 2021 · 1 comment
Open

Inference/demo.py的一个小问题 #46

YizhuoYu opened this issue Aug 3, 2021 · 1 comment

Comments

@YizhuoYu
Copy link

YizhuoYu commented Aug 3, 2021

首先非常感谢作者的工作,知乎的那篇中国特色CenterNet也写得非常有趣。
但是当我在自己的数据集上复现这个工程,想要用inference/demo.py来跑推理的时候,遇到了点小问题,输出的图片上始终没有框。
我尝试检查了下results这个变量,cls,bbox,scores其实并没有什么问题。
然后我发现在inference/demo.py中有这样一段:

       for c,(x1,y1,x2,y2),s in zip(cls,bbox,scores):
            if c != 0.0 or s < 0.35:
                continue

其中c对应类别,一般定义0.0为背景吧?但是这里的逻辑是,如果不是背景则跳过输出框的循环,这样岂不是永远输出不了目标的框了?
将其改成 :
if c == 0.0 or s < 0.35:
后,就可以得到正确的输出了。

@liujia761
Copy link

好喽,我现在有两类数据集,请问如何使用该模型训练两个老师和一个学生呢

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