bilylee / SiamFC-TensorFlow

A TensorFlow implementation of the SiamFC tracker
MIT License
358 stars 112 forks source link

图像处理疑问 #19

Closed TerryYiDa closed 6 years ago

TerryYiDa commented 6 years ago

在dataloader.py中,在对图像处理中 self.x_transform最终的图像为什么不是255,而是255-2*8呢? if preprocess_name == 'siamese_fc_color': self.v_transform = None

TODO: use a single operation (tf.image.crop_and_resize) to achieve all transformations ?

  self.z_transform = Compose([RandomStretch(),
                              CenterCrop((255 - 8, 255 - 8)),
                              RandomCrop(255 - 2 * 8),
                              CenterCrop((127, 127))])
  self.x_transform = Compose([RandomStretch(),
                              CenterCrop((255 - 8, 255 - 8)),
                              RandomCrop(255 - 2 * 8), ])
noUmbrella commented 6 years ago

可以加一下QQ一起讨论吗?@TerryYiDa

noUmbrella commented 6 years ago

我QQ:250326749@TerryYiDa

TerryYiDa commented 6 years ago

我的QQ364880220。你的好像需要验证。

yiminglin-ai commented 6 years ago

同问,instance的大小是229,那么最后correlation的map还是17*17吗?

TachibanaYoshino commented 6 years ago

兄弟们,训练的时候是239239,验证的时候呢是255255,得到的响应图分别是1515,1717.至于为什么要搞成255-2*8,作者说是为了图像增强。。。23333

bilylee commented 6 years ago

Hi,

关于这一点,作者在 issue 中做了解答 https://github.com/bertinetto/siamese-fc/issues/5

我猜测作者首先对训练数据进行了预处理,instance 图片大小是 255 x 255. 后来又想在线做平移和放缩的 data augmentation, 但是又不想重新预处理一遍训练集 (比如预处理为 271 x 271)所以在训练时,将 instance 图片设置为了 239 x 239.