Puijn

Results 2 issues of Puijn

hey, thanks for ur wonderful work. but here i got some problem when i read the code, 1. what is the difference between the query_pos and query_sine_embed. it seems that...

大佬好,我在阅读源码过程中,发现在您的losses.py文件中的loss_labels函数中,独热编码好像好像有点问题,因为看sigmoid_focal_loss函数中的要求是target与input必须是相同维度,且值为1表示文本,值为0表示背景。您源码中的input shape应该是 [bs, num_queries, num_pts, 1], 但是如果按照您生成对应gt的独热编码代码,生成的shape是[bs, num_queries, num_pts, 1],但值全部都是0. 我看到源码在初始化target_classess矩阵的时候用的是num_class,也就是1. 同样的疑问在matcher中的计算分类的权重损失矩阵时也存在,在BoxHungarianMatcher()类中,cost_class = pos_cost_class[:, tgt_ids] - neg_cost_class[:, tgt_ids], pos_cost_class.shape = [bs,*num_queries, 1], tgt_ids由于是文本,应该都是1,这里还出现了数组越界的问题。不知道是否是我哪里理解得不正确,还请大佬能解答一下我的疑惑,非常感谢。 ![1](https://user-images.githubusercontent.com/38679415/225872831-e23221f4-30c5-447b-9647-f72c1c0e7284.png) ![2](https://user-images.githubusercontent.com/38679415/225872839-3f4e9550-8f5d-4bf6-b06b-5607a7b63531.png) ![3](https://user-images.githubusercontent.com/38679415/225872844-0f44e870-d0b2-45fa-8aa4-8159060a26aa.png)