CyberAgentAILab / layout-dm

LayoutDM: Discrete Diffusion Model for Controllable Layout Generation [Inoue+, CVPR2023]
https://cyberagentailab.github.io/layout-dm
Apache License 2.0
211 stars 23 forks source link

Question about training my own dataset #17

Closed Lanjiong-Li closed 1 year ago

Lanjiong-Li commented 1 year ago

It's really nice of u to write'Training on custom dataset.md' which is very useful i think. When i following the instructions to the third step, 3. Train a layout classifier for FID computation, I sucessfully run it but take a really long time to train.I then found it report ' missing libs "libnvinfer.so.7 & libnvinfer_plugin.so.7" ' which is from tensorrt i think, therefore may lead to training through cpu instead of gpu.I would like to ask if tensorrt is necessary cause I met a lot of troubles while downloading it(and i did't see it in pyproject.toml either), and another question is can I use the existed FID_weight from rico to apply to my own data? Thanks a lot for solving the problem.

naoto0804 commented 1 year ago

Hi, thank you for your interest in our projects!

may lead to training through CPU instead of GPU

The fastest way to check is to call torch.cuda.is_available() inside the script or even just run nvidia-smi after launching the script.

Another reason for the slow training might be just because of the number of iterations (200k by default); Although I have not tested it, just watching the training/validation loss may help. If it converges, it may be OK to stop early.

Can I use the existing FID_weight from Rico to apply to my own data?

If your own dataset is very close to Rico, it's ok. However, note that the categories should be the same, which may not happen so often. In most of cases, training a feature extractor for the target dataset is the best way to stably and reliably test the performance of layout generation models