Coder Social home page Coder Social logo

Comments (20)

nihui avatar nihui commented on July 22, 2024 1

https://i.imgur.com/SFs1Ws8.gif

If you look closely and compare it, the contrast of the image seems different.
Will the issue be solved if the bug related to fp16a is fixed?

よく見比べてみると画像のコントラストが異なるようです。
fp16aに関する不具合が修正されるとこの問題は解決しますか?

yeah, I found the little difference too.
It is not because of fp16s or fp16a, but because of postprocess.
waifu2x-caffe add a small eps value to all pixels during postprocess, while waifu2x-ncnn-vulkan do not.
I may port this behavior to let the result pixel-wise identity to the caffe one.

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024 1

20190414 package updated, please try the new binary
the result is still not pixel-wise identity to the caffe output due to loss-of-precision during floating point arithmetic and fp16 storage conversion
but it is close enough I think ^^:)

from waifu2x-ncnn-vulkan.

f11894 avatar f11894 commented on July 22, 2024 1

Yes, ver 20190414 is almost the same as waif2x-caffe.
You will not notice the difference unless you compare them fairly carefully.

はい、ver 20190414ではwaif2x-caffeと殆ど変わらなくなりました。
かなり注意深く比較しない限り違いに気づくことはありません。

Ryzen 2400G

waifu2x-caffe ver 1.2.0.2
waifu2x-caffe-cui.exe -i input.png -t 0 --crop_size 128 -m scale --scale_ratio 2 --model_dir models\CUnet -p cpu -o output.png

waifu2x-ncnn-vulkan ver 20190407 and 20190408
waifu2x.exe input.png output.png -1 2

waifu2x-ncnn-vulkan ver 20190414
waifu2x.exe input.png output.png -1 2 300

PSNR(RGB) SSIM(RGB) Average time(s)
waifu2x-caffe 37.619 0.987 20.250
waifu2x-ncnn-vulkan(20190407) 34.469 0.975 8.557
waifu2x-ncnn-vulkan(20190408) 36.942 0.986 8.664
waifu2x-ncnn-vulkan(20190414) 37.334 0.986 3.641

from waifu2x-ncnn-vulkan.

Dearmw avatar Dearmw commented on July 22, 2024

Input
1

Running code waifu2x 1.jpg 2.jpg 2 2
[0 Radeon RX Vega] queueC=1 queueT=2 memU=2 memDL=0 memHV=1
[0 Radeon RX Vega] fp16s=1 fp16a=1 int8s=1 int8a=1

Output
2

from waifu2x-ncnn-vulkan.

f11894 avatar f11894 commented on July 22, 2024

In addition, Benchmark score seems to be worse than waifu2x-caffe.
Average score of 55 images.

waifu2x-caffe RGB
35.492dB

waifu2x-caffe CUnet
37.619dB

waifu2x-ncnn-vulkan CUnet
34.469dB

This is the bat file I used for benchmarking.
https://github.com/f11894/SR_benchmark

I use Google Translate because I am not good at English.

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

Input
1

Running code waifu2x 1.jpg 2.jpg 2 2
[0 Radeon RX Vega] queueC=1 queueT=2 memU=2 memDL=0 memHV=1
[0 Radeon RX Vega] fp16s=1 fp16a=1 int8s=1 int8a=1

Output
2

the incorrect output caused by fp16 arithmetic on gtx20/rtx20/vega issue is confirmed. A workaround will be applied for these gpu soon...

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

thanks for your report
will investigate ...

from waifu2x-ncnn-vulkan.

Dearmw avatar Dearmw commented on July 22, 2024

感谢您的报告
将进行调查......
Are you from Shanghai?

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

deconvolution operator produce wrong result on fp16 storage/arithmetic mode.
I will fix it soon ...

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

the underlying ncnn library get fixed in Tencent/ncnn@9643916
new binary will be rebuild and uploaded about an hour later, stay tuned ...

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

20190407 package updated, please try the new binary

from waifu2x-ncnn-vulkan.

f11894 avatar f11894 commented on July 22, 2024

There is no change in the output result using the new binary.
MD5 is also consistent with the previous.

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

There is no change in the output result using the new binary.
MD5 is also consistent with the previous.

hi, I just tried the new binary with your original image on AMD r9-m290x machine and my Intel UHD 620 laptop, the output image looks the same with caffe one.

waifu2x.exe
SHA1: 6892F871041F4DAE1BF74FF9692547317A99DFBD

from waifu2x-ncnn-vulkan.

f11894 avatar f11894 commented on July 22, 2024

I'm sorry I didn't have enough words.
MD5 is from the output PNG image, not the executable file.

When I converted the sample described in README.md, I noticed that I could not get the same result as you.
Apparently there are things that do not work well depending on the environment.
image

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

I'm sorry I didn't have enough words.
MD5 is from the output PNG image, not the executable file.

When I converted the sample described in README.md, I noticed that I could not get the same result as you.
Apparently there are things that do not work well depending on the environment.
image

another issue which affects modern gpu with fp16a capability is confirmed.
because of lack of these specific devices, I may try to figure it out with some workarounds.

from waifu2x-ncnn-vulkan.

nihui avatar nihui commented on July 22, 2024

new binary 20190408 has been uploaded with a workaround for gtx20 and vega series.
please try this new version and see if this issue still exists.

from waifu2x-ncnn-vulkan.

kalcohol avatar kalcohol commented on July 22, 2024

@nihui @f11894 @Dearmw
i tested version 20190408, it seems this issue was fixed @rtx2060 and RTX2080.

from waifu2x-ncnn-vulkan.

f11894 avatar f11894 commented on July 22, 2024

Even in my environment, I confirmed that this problem was solved.
The output result is equivalent to waifu2x-caffe.

from waifu2x-ncnn-vulkan.

f11894 avatar f11894 commented on July 22, 2024

In the case of visual inspection, I do not feel much difference, but there seems to be a little difference in the score of Benchmark.

waifu2x-caffe RGB
35.492dB

waifu2x-caffe CUnet
37.619dB

waifu2x-ncnn-vulkan(20190408) CUnet
36.942dB

from waifu2x-ncnn-vulkan.

f11894 avatar f11894 commented on July 22, 2024

https://i.imgur.com/SFs1Ws8.gif

If you look closely and compare it, the contrast of the image seems different.
Will the issue be solved if the bug related to fp16a is fixed?

よく見比べてみると画像のコントラストが異なるようです。
fp16aに関する不具合が修正されるとこの問題は解決しますか?

from waifu2x-ncnn-vulkan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.