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

关于mil分类器 #20

Closed
zuofengyuan1 opened this issue Jun 20, 2021 · 2 comments
Closed

关于mil分类器 #20

zuofengyuan1 opened this issue Jun 20, 2021 · 2 comments
Labels
paper Question from paper

Comments

@zuofengyuan1
Copy link

作者您好,我拜读了您的关于面向目标检测的多实例主动学习方法论文,也复现了您基于mmdetection的代码,有个小问题向您请教,有关于mil分类器训练不是十分理解,一张图像可能有多个目标,比如同时有猫和狗,那么如何给这个图像整体的标签去训练这个整体分类器呢,我知道这个答案应该在公式6中,但是每个锚点的真实值可以给定,如何给定整张图像的标签呢

@yuantn
Copy link
Owner

yuantn commented Jun 21, 2021

你好,从公式6中可以看到,在对y^cls与\sum(y^head_i^cls)计算交叉熵损失的时候,是首先对各个类别进行计算,最后再将所有类别的loss相加得到总loss的。所以对于多类别目标图像的话,整张图像的标签将会是一个1*20的张量(20为PASCAL VOC的类别数)。在训练整体分类器的时候,每个类别的标签(即图像标签[i])也会各自分别的去训练,关于这部分你可以参考一下多标签分类的相关知识。


Hi, it can be seen from formula 6 that during calculating the cross entropy loss for y^cls and \sum(y^head_i^cls), we first calculate for each class, and finally add the loss of all classes to get the total loss. So, for a image with multiple classes, the label of the image will be a 1*20 tensor (20 is the number of classes in PASCAL VOC). When training the classifier in the entire network, the label for each class (i.e., image label [i]) will also be trained separately. For more information, you can refer to the relevant knowledge of multi-label classification.

@yuantn yuantn added the paper Question from paper label Jun 21, 2021
@zuofengyuan1
Copy link
Author

谢谢回答,我在知乎上也问了相同的问题,应该和我考虑的一样,万分感谢

@yuantn yuantn closed this as completed Jul 20, 2021
yuantn added a commit that referenced this issue Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paper Question from paper
Projects
None yet
Development

No branches or pull requests

2 participants