xinntao / ESRGAN

ECCV18 Workshops - Enhanced SRGAN. Champion PIRM Challenge on Perceptual Super-Resolution. The training codes are in BasicSR.
https://github.com/xinntao/BasicSR
Apache License 2.0
5.91k stars 1.05k forks source link

Getting blown out upscaled image with my code. ideas? #72

Open theFuzzyWarble opened 4 years ago

theFuzzyWarble commented 4 years ago

I'm new to python and teaching myself as I build this project so bear with me. https://pastebin.com/8HtjpRjJ

I'm using the test.py upscale code as a base, yet while that works.. my code generates blown out results.

I narrowed it down to when it's converted to float32/64's and transposed in numpy. But test.py does the same thing without blowing out the image.

I can correct it by forcing [line#236] the array to back C-contiguous uint8, but i'm not sure why if the test.py code doesn't need to work/view properly.

Any ideas would be great! Thanks