Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other datasets #10

Open
little-seasalt opened this issue Dec 28, 2023 · 10 comments
Open

Other datasets #10

little-seasalt opened this issue Dec 28, 2023 · 10 comments

Comments

@little-seasalt
Copy link

Hello,
I would like to ask, if I want to retrain the models on the UCF and JHU datasets, what changes need to be made to the existing code?

@cxliu0
Copy link
Owner

cxliu0 commented Dec 31, 2023

In general, you need to customize the dataloader and preprocess data for each dataset.

  • Customize the dataloader for each dataset (see SHA.py) and add it to datasets/init.py.

  • Preprocess the dataset, e.g., resizing the images and ground-truth points. This can save data loading time.

  • Regarding data augmentation, you may either try to train the model without scale augmentation or tune the scale augmentation parameters.

@little-seasalt
Copy link
Author

一般来说,您需要自定义数据加载器并预处理每个数据集的数据。

  • 为每个数据集自定义数据加载器(请参阅SHA.py)并将其添加到datasets/ init .py
  • 预处理数据集,例如调整图像和地面实况点的大小。这可以节省数据加载时间。
  • 关于数据增强,您可以尝试在不进行尺度增强的情况下训练模型,或者调整尺度增强参数。

Thank you for your answer.

@little-seasalt
Copy link
Author

Hello author:
May I ask what kind of graphics card you used when training these data sets (UCF-QNRF, JHU-Crowd++ and NWPU-Crowd)? I frequently ran out of video memory during the training process. Especially when it occurs during eval, is there any way to solve this problem?

@cxliu0
Copy link
Owner

cxliu0 commented Jan 12, 2024

Typically, NVIDIA RTX 3090 is sufficient to train the model. Regarding CUDA out of memory, you may try to reduce the batch size and use parallel training.

@little-seasalt
Copy link
Author

Typically, NVIDIA RTX 3090 is sufficient to train the model. Regarding CUDA out of memory, you may try to reduce the batch size and use parallel training.

In the process of training the UCF-QNRF dataset, I found that it takes about 6 minutes to train for one round and two minutes for each evaluation. Is this time consumption normal? I would like to ask the author how much time you spent on training at that time.

@cxliu0
Copy link
Owner

cxliu0 commented Jan 16, 2024

We suggest preprocessing the UCF-QNRF dataset before training, because loading the original images during training is time-consuming. After preprocessing, one epoch will take less than 40 seconds if you use two NVIDIA RTX 3090 for training.

@little-seasalt
Copy link
Author

We suggest preprocessing the UCF-QNRF dataset before training, because loading the original images during training is time-consuming. After preprocessing, one epoch will take less than 40 seconds if you use two NVIDIA RTX 3090 for training.

I have processed the UCF-QNRF dataset according to the operations mentioned in the paper, that is, limiting the long sides to 1536 pixels, and processing the size of both image and ground-truth points. The other parts of the data loader are written with reference to SHA.py. Are there any other data preprocessing operations that I have missed?

@cxliu0
Copy link
Owner

cxliu0 commented Jan 16, 2024

You shall resize the images and ground-truth points, and then save the preprocessed data. After that, you can use the preprocessed data to train the model. Resizing images on the fly is time-consuming.

@Aksheit-Saxena
Copy link

Aksheit-Saxena commented Feb 3, 2024

Can anyone share the JHU.py file , i m getting dimension mismatches when train.sh is run
Any insight is appreciated

@little-seasalt
Copy link
Author

Can anyone share the JHU.py file , i m getting dimension mismatches when train.sh is run Any insight is appreciated

Have you reproduced the paper metrics of the UCF-QNRF dataset? Perhaps you would like to share the relevant code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants