jia-wan / GeneralizedLoss-Counting-Pytorch

official implementation of the CVPR21 paper "A Generalized Loss Function for Crowd Counting and Localization"
MIT License
29 stars 7 forks source link

Crop Size for ShanghaiTech A #6

Open Yiming-M opened 2 years ago

Yiming-M commented 2 years ago

Hi @jia-wan,

Could you please tell me the crop size you used in training models on ShanghaiTech A? This dataset comprises images of different sizes, so training in batch is difficult.

Many thanks, Yiming

jia-wan commented 2 years ago

Hi Yiming,

I use 512x512 patches for all experiments. Some of them use 256x256 patches. For batch size, I set the batch size to 1. I'm looking forward to seeing your results with larger batch sizes. Thanks.

Best, Jia

Yiming-M commented 2 years ago

Hi @jia-wan,

Thanks for the reply. I am thinking about adding resizing & no cropping (in the later case the batch size shall be 1) to your PyTorch dataset object. But I am confused about targets and st_sizes. They seem to be useless in training. In the code snippet below, it seems like after moving them to the gpu, they are not used.

截屏2022-02-06 13 06 07

Many thanks, Yiming.