ohhhyeahhh / SiamGAT

Code for the paper "Graph Attention Tracking". (CVPR2021)
https://openaccess.thecvf.com/content/CVPR2021/papers/Guo_Graph_Attention_Tracking_CVPR_2021_paper.pdf
139 stars 19 forks source link

Training Code and probelm about C.TRACK.OFFSET #4

Closed Tianlu-Zhang closed 3 years ago

Tianlu-Zhang commented 3 years ago

Excellent job, I want to know would the training code be available. And I also find that in siamgat_tracker.py def accurate_location(), dist = cfg.TRACK.OFFSET = 45, how do you calculate it? Thanks for your help.

twotwo2 commented 3 years ago

We will release the training code as soon as possible. As for convolution/pooling layer, the coordinate mapping can be expressed as pos_ = stride * pos + ((kernel - 1) / 2 - padding). Combined network structure of modified googlenet, the offset of the feature map to the original image is 45.

Tianlu-Zhang commented 3 years ago

I still have some problem about cfg.TRACK.OFFSET = 45, I train a model used resnet50 which used in SiamCAR, the score size is 31, but I got a very poor performance. Could you please offer the cfg.TRACK.OFFSET for resnet50. And will you offer the results used resnet50 as the backbone? Thanks

huchenjie339 commented 2 years ago

@RaymondCover 朋友,知道offset怎么算的吗?

STQ-AmadeusUser commented 2 years ago

Hello! I have figured out how to compute cfg.BACKBONE.OFFSET(=13 in /pysot/core/config.py) by using the equation "pos_ = stride * pos + ((kernel - 1) / 2 - padding)". However, i failed understanding the cfg.TRACK.OFFSET(=45 in config.yaml). Since the backbones used in training code and testing code are both googlenet(inception v3), could you explain why the two offsets are different? Actually, if i change cfg.BACKBONE.OFFSET to 45 or cfg.TRACK.OFFSET to 13, poor performance will appear when tracking. Is the parameter 45 actually a hyper-parameter which can be tuned? Hope for your reply! Thanks! @twotwo2

twotwo2 commented 2 years ago

@STQ-AmadeusUser 45 is not a hyper-parameter. cfg.BACKBONE.OFFSET=13 corresponding template branch, cfg.TRACK.OFFSET=45 corresponding search branch. To eliminate the impact of padding in backbone, we crop the boundary region on the search feature (crop_pad=4), so the offset is 13+crop_pad*stride=45. The cropping code is in googlenet crop_pad = cfg.BACKBONE.CROP_PAD x = x[:, :, crop_pad:-crop_pad, crop_pad:-crop_pad]

STQ-AmadeusUser commented 2 years ago

Thanks for your reply! It's very helpful for me! So, another question is that how to set the value of crop_pad? I have found that the paddings in googlenet(inception v3) are more than 4, is the "crop_pad" a hyper-parameter which can be tuned? @twotwo2