bilylee / SiamFC-TensorFlow

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

finetuning the conv network if i need to track my own object #42

Closed pageedward closed 5 years ago

pageedward commented 6 years ago

as title described ,i wanna track hand, if i train it with my own hand dataset, it will be better? and how do i make the train dataset?

bilylee commented 6 years ago

In principle, SiamFC is class-agnostic which means you can use it to track any object. In practice, it typically gets better result after finetuning on your own dataset.

To prepare your own dataset, please refer to

  1. https://github.com/bilylee/SiamFC-TensorFlow/blob/master/scripts/preprocess_VID_data.py
  2. https://github.com/bilylee/SiamFC-TensorFlow/blob/master/scripts/build_VID2015_imdb.py
pageedward commented 6 years ago

by the way, what is the dir structure of VID2015 dataset like, the dataset is so huge that i can not download it ?

trikim commented 6 years ago

@gongbudaizhe image What's more, the ILSVRC2015_VID.tar.gz dataset can be downloaded by Thunder, the speed can reach 10M/s.

bilylee commented 6 years ago

Hi,

The truth is, you don't have to know the directory structure of the VID dataset to adjust the code for your own purpose. What really matters is the created imdb.

The imdb is a dictionary and is something like this:

train_or_validation_imdb = {
'videos': [
['path-to-video1/im1.jpg', 'path-to-video1/im2.jpg', ..., 'path-to-video1/imN1.jpg'], # path to preprocessed images of one video
['path-to-video2/im1.jpg', 'path-to-video2/im2.jpg', ..., 'path-to-video2/imN2.jpg'], # another video
...,
],
'n_videos':  num_of_video_sequences,
'image_shape': (255, 255, 3),
}  

The image is preprocess by:

preprocessed_image, _ = get_crops(original_image, target_box, size_z=127, size_x=255, context_amount=0.5, )