chaofengc / PSFRGAN

PyTorch codes for "Progressive Semantic-Aware Style Transformation for Blind Face Restoration", CVPR2021
Other
370 stars 68 forks source link

can you provide me a example of degrade image, I cant get a good result as yours. here is a sample of my degrade image. #14

Closed erjihaoshi closed 3 years ago

erjihaoshi commented 3 years ago

7677 here is my degrade code: ia.Sequential([ ia.OneOf([ia.MotionBlur(k=(5,9)),ia.GaussianBlur((3.0, 5.0)),ia.MedianBlur(k=(5,9)),ia.AverageBlur(k=(5, 9))]), ia.Lambda(func_images),#降采样用pil放缩到(40,64)在放缩回来,抗锯齿resize ia.OneOf([ia.AdditiveGaussianNoise(loc=(-20,20),scale=(0,3)),ia.AdditiveLaplaceNoise(loc=(-20,20),scale=(0,3))]), ia.JpegCompression(70,90) ]) any suggestion about this

chaofengc commented 3 years ago

It looks good. But please follow the degradation equation (Eq 10) in the paper, and do not resize back in the second step.