bilylee / SiamFC-TensorFlow

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

Is there an error in transformations? #56

Closed huanglianghua closed 5 years ago

huanglianghua commented 6 years ago

Hi @bilylee , thanks for your fantastic work.

In the following code (here):

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), ])

The output z is 127 x 127, but output x is 239 x 239 not 255 x 255.

The response size with 239 x 239 is 15 x 15 but with 255 x 255 is 17 x 17.

17 x 17 is correct since it is exactly same as the response size in the inference stage.

Is this an error or so? (Although this will not report any error during training since the label size is directly deduced from response size!).

shuida commented 5 years ago

I have the same problem. Has it been solved?

bilylee commented 5 years ago

Hi,

During training, image patch with size 239 x 239 is cropped from the 255 x 255 input image for translation data augmentation. It won't affect tracking, since the Siamese network learns a similarity metric that is position agnostic.

Please also refer to #32

shuida commented 5 years ago

ok,thank you.