junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.8k stars 6.29k forks source link

Template-to-Image test output are blurry. #1661

Open bclaw524 opened 4 months ago

bclaw524 commented 4 months ago

Hi, I'm having some issues creating a template-to-image output. I have created a paired dataset of images, pairing a created template to its related original image and the cropped checkpoints showed decent fake outputs. However, when I try to use my test set, a collection of just templates, as a single image, the output generated is a bit blurry.

Here is my current train command: python train.py --dataroot ./datasets/mask_good/ --name mask_good --model pix2pix --direction AtoB --preprocess crop --load_size 2048 --crop_size 1024 --n_epochs 1000 --n_epochs_decay 1000 --save_epoch_freq 50

Here is the test command: python test.py --dataroot ./datasets/mask_good/ --name mask_good --model test --load_size 2048 --crop_size 2048 --direction AtoB --dataset_mode single --netG unet_256 --norm batch

The generated results were decent when I was testing with 512x512. The current image is 2048x2048 (two 1024*2048 images side by side) An additional issue I noticed is that the training crop rarely included the edge of the image, which I'm guessing is causing the "frame" of the image to not be generated correctly.