WillSuen / LostGANs

51 stars 36 forks source link

How to Train on Custom dataset with different Image size #6

Open Hidayat722 opened 4 years ago

Hidayat722 commented 4 years ago

Hi @WillSuen

First of thank you very much for such an amazing work highly appreciated, i would like to train the model on custom dataset with different image size such as 2048X1536, so far i know the current model only support 128X128, Can you please guide me how can i create my dataset plus what changes do i need to train it on custom image size. Thanks in Advance

WillSuen commented 4 years ago

Hi, thanks for your interests. If you want to train image with difference size, you may need to add more resblock in G and D. In G, each resblock upsample feature size by 2. In our experiments, high resolution image (we tried with 512x512) requires much more GPU memory and training time. So due to limitation of our hardware, we did not get a perfect model for high resolution images.

Hidayat722 commented 4 years ago

@WillSuen thanks for the details. How can i train it on custom dataset. So far i think i need to provide the bounding boxes same as done for object detection but i am not sure about the background. can you please guide me how to prepare my own dataset any help would be appreciated. Thanks in Advance.

WillSuen commented 4 years ago

Hi, for the dataset preparation, you can check the details in cocostuff_loader.py and vg.py. The background is added as a bounding box (0, 0, 1.0, 1.0)