ohhhyeahhh / SiamCAR

SiamCAR: Siamese Fully Convolutional Classification and Regression for Visual Tracking (CVPR 2020, Oral)
https://openaccess.thecvf.com/content_CVPR_2020/html/Guo_SiamCAR_Siamese_Fully_Convolutional_Classification_and_Regression_for_Visual_Tracking_CVPR_2020_paper.html
323 stars 63 forks source link

Code problems #46

Open huchenjie339 opened 3 years ago

huchenjie339 commented 3 years ago

问题一:计算location的时候为什么要加32,这个32具体怎么算出来的;如代码所示:locations = torch.stack((shift_x, shift_y), dim=1) + 32 问题二:为什么通过以下方式能判断特征图映射回原图的点是否在groudtruth内?当 reg_targets_per_im[:, :, 0],reg_targets_per_im[:, :, 2] ,reg_targets_per_im[:, :, 1],reg_targets_per_im[:, :, 3]均大于0时,也能判断点在groudtruth内啊。还有下列式子中的0.6怎么来的啊?希望大家能帮帮我这个小白。 s1 = reg_targets_per_im[:, :, 0] > 0.6((bboxes[:,2]-bboxes[:,0])/2).float() s2 = reg_targets_per_im[:, :, 2] > 0.6((bboxes[:,2]-bboxes[:,0])/2).float() s3 = reg_targets_per_im[:, :, 1] > 0.6((bboxes[:,3]-bboxes[:,1])/2).float() s4 = reg_targets_per_im[:, :, 3] > 0.6((bboxes[:,3]-bboxes[:,1])/2).float() is_in_boxes = s1s2s3*s4 pos = np.where(is_in_boxes.cpu() == 1) labels[pos] = 1

WangJun-ZJUT commented 3 years ago

您好!问题1中的32是通过保持中心坐标对齐,以步长8向两边扩展计算得到的.问题2中0.6表示的是距离目标中心为0.6乘上宽高的范围,并不是取所有groundtruth内的点计算loss.

hfj-cc commented 11 months ago

@WangJun-ZJUT (25-1)/2=12, (255-1)/2=127,127-12*8=31,中心对齐的偏移坐标不应该是31吗?