#9460 closed defect (invalid)
ssim only 0.47 while PSNR is 37, and skimage's result is 0.914
Reported by: | xmufzy | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avfilter |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
How to reproduce:
[Parsed_psnr_0 @ 0x13ac300] PSNR r:38.074962 g:39.999312 b:35.868513 average:37.655646 min:37.655646 max:37.655646 % ffmpeg.exe -i ./src0.png -i src1.png -lavfi ssim -f null - ffmpeg version ffmpeg version N-104375-g77970abb71-20211017 Copyright (c) 2000-2021 the FFmpeg developers N-104375-g77970abb71 (centos & ubuntu) built on ... Stream #1:0: Video: png, rgb24(pc), 460x460, 25 fps, 25 tbr, 25 tbn Stream mapping: Stream #0:0 (png) -> ssim:main Stream #1:0 (png) -> ssim:reference ssim -> Stream #0:0 (wrapped_avframe) Press [q] to stop, [?] for help Output #0, null, to 'pipe:': Metadata: encoder : Lavf59.6.100 Stream #0:0: Video: wrapped_avframe, gbrp(pc, gbr/unknown/unknown, progressive), 460x460, q=2-31, 200 kb/s, 25 fps, 25 tbn (default) Metadata: encoder : Lavc59.12.100 wrapped_avframe frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=1.45x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Attachments (2)
Change History (8)
by , 3 years ago
by , 3 years ago
comment:1 by , 3 years ago
Description: | modified (diff) |
---|---|
Summary: | ssim issue → ssim only 0.47 while PSNR is 37, and skimage's result is 0.914 |
follow-up: 3 comment:2 by , 3 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 3 years ago
Replying to Elon Musk:
The skimage converts to grayscale prior to calculations, if you do same with ssim, results is higher than skimage result.
How can I get same result with ffmpeg?
The difference between the two pictures looks very small, the value of ffmpeg's ssim can't match the result
comment:4 by , 3 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
follow-up: 6 comment:5 by , 3 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
This is not support channel.
The ssim algorithm are different, so you can not expect same results as python implementation.
skimage converts to grayscale, you can do same with ffmpeg, if you learn how to do it:
ffmpeg -i src0.png -i src1.png "[0:v]format=yuv444p[a];[1:v]format=yuv444p[b];[a][b]ssim" -f null -
Even more if you extract each R/G/B component from src0.png and src1.png with -vf extractplanes=r+g+b and give each component image to skimage you get very similar low score.
comment:6 by , 3 years ago
You're right,I try with yuv444p and it works, Thank you very much.
Replying to Elon Musk:
This is not support channel.
The ssim algorithm are different, so you can not expect same results as python implementation.
skimage converts to grayscale, you can do same with ffmpeg, if you learn how to do it:
ffmpeg -i src0.png -i src1.png "[0:v]format=yuv444p[a];[1:v]format=yuv444p[b];[a][b]ssim" -f null -
Even more if you extract each R/G/B component from src0.png and src1.png with -vf extractplanes=r+g+b and give each component image to skimage you get very similar low score.
The skimage converts to grayscale prior to calculations, if you do same with ssim, results is higher than skimage result.