IsHYuhi / ST-CGAN_Stacked_Conditional_Generative_Adversarial_Networks

Unofficial implementation of ''Stacked Conditional Generative Adversarial Networks for Jointly Learning Shadow Detection and Shadow Removal'' with PyTorch
65 stars 15 forks source link

图片模糊不清 #24

Open zbzzz opened 1 year ago

zbzzz commented 1 year ago

您好,非常感谢您做出的贡献,我在运行您的代码时候,迭代1000epoch,在测试集上生成图片模糊不清,尤其在文字图像上,想知道是哪里的问题,是训练时间太短吗? Hello, thank you very much for your contribution. While running your code, I iterated through 1000epochs and generated blurry images on the test set, especially on text and images. I would like to know where the problem lies. Is the training time too short

ush commented 1 year ago

According to my experience, 1000 epochs is too much even for the dataset of 1000+ pairs and the model overfits. In my case dataset was about 1200 pairs and the model produced blurry images starting from the epoch ~750. But, there were some image defects in my dataset that could possibly impact the overall quality of the training. So, first of all check your dataset for the image defects (even 5 photos could have significant impact on the prediction quality).

zbzzz commented 1 year ago

非常感谢您的解答,请问数据集的图像缺陷指的是什么,我在测试集上生成图像效果不错,使用单张图像进行测试时才会产生模糊情况,这种情况下实际应用价值会比较小,我自己的数据集大小为7681020像素 Thank you very much for your answer. May I ask what the image defects in the dataset refer to? I generated good image results on the test set, and only when using a single image for testing can blurring occur. In this case, the actual application value will be relatively small. My own dataset size is 768 1020 pixels

ush commented 1 year ago

Image defects in my dataset was of this type: GT(737) In general, my dataset suffered from the strange "blueness" color over the whole image. This defect has appeared randomly during the training dataset creation. Images in my dataset are ~3400 X ~4600 pixels each. Anyway, some blurring can occur if you are using the pretrained model (the one that is trained on ISTD dataset), which has its own specifics. So, I suggest you to train the model on the data with your specifics, rather than use pretrained model, that would eventually give you blurring effect on the test images. This blurring effect is common for the ISTD-trained models for shadow removal (i am writing a coursework on this topic, so I can sure that it is really a common thing).

zbzzz commented 1 year ago

shadow_removal_image_001_95

This is my own dataset training and testing. When testing a single image, the image quality is particularly poor and blurry, but when testing on the test set, the image is very clear. I want to know where the problem lies. Thank you very much for your help