STVIR / pysot

SenseTime Research platform for single object tracking, implementing algorithms like SiamRPN and SiamMask.
Apache License 2.0
4.43k stars 1.1k forks source link

Save cfg.TRAIN.START_EPOCH to state dict #397

Open ZhiyuanChen opened 4 years ago

ZhiyuanChen commented 4 years ago

Well #77 didn't work for me while resuming from checkpoint_18.pth. The problem is when we resume, the model and optimizer passed in the restore_from function are suitable for epoch less than 10 (till backbone is not training) because the cfg.TRAIN.START_EPOCH is 0 (passed in build_opt_lr function just before restore_from) initially so this mismatches the optimizer after backbone start training. So to resume my training , I pass the cfg.TRAIN.START_EPOCH as 19 and when build_opt_lr function receives epoch greater than 10 (i.e Backbone training starts) it produces the model and optimizer suitable for resuming. And i can resume my training.

Originally posted by @PhenomenalOnee in https://github.com/STVIR/pysot/issues/92#issuecomment-651571350

zzzmm1 commented 4 years ago

resume的时候会遇到当时训练的第一个epoch的lr在log中显示是0.01,而下一个epoch又恢复到正常的那个epoch该有的lr,这是一个bug吗?

ZhiyuanChen commented 4 years ago

resume的时候会遇到当时训练的第一个epoch的lr在log中显示是0.01,而下一个epoch又恢复到正常的那个epoch该有的lr,这是一个bug吗?

如果下一个epoch恢复了,那说明更可能是一个显示问题 这当然也是一个bug

ZhiyuanChen commented 4 years ago

https://github.com/STVIR/pysot/issues/367

Holmes-GU commented 4 years ago

resume的时候会遇到当时训练的第一个epoch的lr在log中显示是0.01,而下一个epoch又恢复到正常的那个epoch该有的lr,这是一个bug吗?

你好,我想向您请教一下,我下载了百度云里面的裁剪好的yt数据集,我应该如何将它正确地放置在crop511里面呢

akshayamadhuri commented 1 year ago

The Cropped YouTube Faces (CYF) dataset is typically organized into several subdirectories that contain the images and annotations for each video. These subdirectories are named based on the video ID.

Assuming you have downloaded the Cropped YouTube Faces dataset and saved it in a directory named "crop511", you can follow these steps to organize the dataset properly:

Extract the downloaded dataset file(s) to a temporary directory. Copy the contents of the extracted dataset directory to the "crop511" directory. Inside the "crop511" directory, create a subdirectory named "data" if it doesn't already exist. Move all the video subdirectories (directories named based on the video ID) into the "data" subdirectory. Delete any remaining files or directories in the "crop511" directory (other than the "data" subdirectory). After completing these steps, the "crop511" directory should contain a "data" subdirectory that contains all the video subdirectories (each containing the images and annotations for a specific video). This should be the correct organization for the CYF dataset in the "crop511" directory.