GengZ / siameseFC-pytorch-vot

PyTorch implementation of 'Fully-convolutional Siamese networks for object tracking', slightly better results
Apache License 2.0
25 stars 5 forks source link

there something wrong in the code #2

Closed xi-mao closed 5 years ago

xi-mao commented 5 years ago
  z = video_id_z[rand_z].copy()    # use copy() here to avoid changing dictionary
    x = video_id_z[rand_x].copy()

    # read z and x,--------here the path of z actually is search image----,
    #I think it should be 
    # l=len(z['instance_path'])
    #img_z = cv2.imread(os.path.join(self.data_dir, (z['instance_path'])[:l-5]+'z.jpg'))
    #img_z = self.__cvt_color(img_z)
    img_z = cv2.imread(os.path.join(self.data_dir, z['instance_path']))
    img_z = self.__cvt_color(img_z)

    img_x = cv2.imread(os.path.join(self.data_dir, x['instance_path']))
    img_x = self.__cvt_color(img_x)
GengZ commented 5 years ago

https://github.com/GengZ/siameseFC-pytorch-vot/blob/master/Train/run_Train_SiamFC.py#L45

There could be further process before feeding data into the network. In this line, crop the size of 255x255 to 127x127.

xi-mao commented 5 years ago

https://github.com/GengZ/siameseFC-pytorch-vot/blob/master/Train/run_Train_SiamFC.py#L45

There could be further process before feeding data into the network. In this line, crop the size of 255x255 to 127x127.

I mean that you should read the .crop.z.jpg as the exemplar image,and read .crop.x.jpg as the search image. but in the code ,it all read .*crop.x.jpg. I don't understand that.

xi-mao commented 5 years ago

Besides, I have some question,did you test on OTB-2013. I test my trained model on vot2016, its result is nice. but when I test on OTB-2013. Its results is terrible. Should I change some parameters?

GengZ commented 5 years ago

There's no actual difference between .x.jpg and .z.jpg except the size. Read the .x.jpg then crop is the same as use .z.jpg. But the former approach makes augmentation easier, for example you could use the random offset.

GengZ commented 5 years ago

I didn't test on OTB since it's not my focus. But OTB data is different from VOT in some aspects. The most obvious one is there is grey image in OTB. So at least include some random grey image pairs while training for it.