gjy3035 / GCC-SFCN

This is the official code of spatial FCN in the paper Learning from Synthetic Data for Crowd Counting in the Wild [CVPR2019].
https://gjy3035.github.io/GCC-CL/
MIT License
160 stars 39 forks source link

The pretrained model is not in accordance with resSFCN #4

Closed Ethanwl closed 5 years ago

Ethanwl commented 5 years ago

The len of pretrained model's state_dict is 488 and that of resSFCN is 582. If I want to finetune the model, what the details should I notice? For example, in shanghaiB, how to preprocess images and how to set optimizer?

gjy3035 commented 5 years ago
  1. some layers in resSFCN do not the learnable parameters, such as ReLU, Pooling, etc. so the length of save weights is not same as that of the graph in the code.
  2. you could directly run our code, which will work well. __C.TRAIN.PRE_GCC_MODEL = './pre/Pretrained_GCC.pth': finetune the model using GCC pretrained model __C.TRAIN.PRE_GCC_MODEL = '': finetune the model using ImgNt pretrained model
  3. for shanghai b, we will release the code in C^3 Framework. We will only focus on the implementation on the new framework. If you want to finetune the model on shanghai B, you should replace the hyper parameters as follows: __C.DATA.MEAN_STD and __C.DATA.DATA_PATH.

Other parameters should fixed.