Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th March 2019, 22:28   #81  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
When I try to show the clip in vsedit I get this error msg:
GREY color family cannot have RGB matrix coefficients
Code:
orig = mvf.ToRGB(orig)
muv.MDSI(clip, orig, show_maps=True)[1]
and with mvf.ToYUV( muv.MDSI(clip, orig, show_maps=True)[1] )
Resize error 1026: YUV color family cannot have RGB matrix coefficients.

How can I remove RGB matrix coefficients? Or what should I do?
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 5th March 2019, 23:05   #82  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Quote:
Originally Posted by ChaosKing View Post
Yeah show_map returns not a clip but a clip tuple https://github.com/WolframRhodium/mu...sfunc.py#L4584
I think FrameEval awlays expects a clip as return!?
So what to do ?
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 6th March 2019 at 05:05.
WorBry is offline   Reply With Quote
Old 6th March 2019, 05:21   #83  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Quote:
Originally Posted by ChaosKing View Post
When I try to show the clip in vsedit I get this error msg:
GREY color family cannot have RGB matrix coefficients
Code:
orig = mvf.ToRGB(orig)
muv.MDSI(clip, orig, show_maps=True)[1]
and with mvf.ToYUV( muv.MDSI(clip, orig, show_maps=True)[1] )
Resize error 1026: YUV color family cannot have RGB matrix coefficients.

How can I remove RGB matrix coefficients? Or what should I do?
Quote:
Originally Posted by HolyWu View Post
Code:
core.std.SetFrameProp(clip, prop='_Matrix', delete=True)
I'm confused now. Is this a way to output the maps ? What does the [1] at the end of the MDSI call line do ?
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 6th March 2019 at 05:29.
WorBry is offline   Reply With Quote
Old 6th March 2019, 09:57   #84  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by WorBry View Post
I'm confused now. Is this a way to output the maps ? What does the [1] at the end of the MDSI call line do ?
show_maps returns multiple clips
Code:
if show_maps:
        return clip1, gs_hvs, cs, gcs
Code:
muv.MDSI(clipA, clipB, show_maps=True)[0] <-- 0 means clip1
muv.MDSI(clipA, clipB, show_maps=True)[1] <-- 1 = gs_hvs, 2 = cs, 3 = gcs

OR 

clips = muv.MDSI(clipA, clipB, show_maps=True)
clip = clips[0]
gs_hvs = clips[1]
...
This works now, thx HolyWu
Code:
orig = muv.MDSI(orig, orig.grain.Add(42), show_maps=True)[2]
orig = core.std.SetFrameProp(orig, prop='_Matrix', delete=True)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 6th March 2019, 16:52   #85  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Yep, that works. Thanks.
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 7th March 2019, 00:21   #86  |  Link
Iron_Mike
Registered User
 
Join Date: Jul 2010
Posts: 132
Hi guys,

trying to run some metrics via Zopti... got a couple of questions...

(1) what is the easiest way to pass an image sequence (specifically EXR/DPX) to Zopti ?

(2) @WolframRhodium: why does muvsfunc only allow clips of the exact same format for the SSIM / GMSD metric ?

Thanks.
Iron_Mike is offline   Reply With Quote
Old 7th March 2019, 00:44   #87  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Iron_Mike View Post

(1) what is the easiest way to pass an image sequence (specifically EXR/DPX) to Zopti ?
ImageMagick .

The vapoursynth version supports many pixel formats, 10bit, 16bit, float .... all in their native format (e.g. DPX will be 10bit RGB, instead of 16bit)
http://www.vapoursynth.com/doc/plugins/imwri.html

(The avs version is very outdated, 8bit, limited format support)
poisondeathray is offline   Reply With Quote
Old 7th March 2019, 01:09   #88  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 162
Quote:
Originally Posted by Iron_Mike View Post
(2) @WolframRhodium: why does muvsfunc only allow clips of the exact same format for the SSIM / GMSD metric ?
I expect people to convert format of clips themselves. I believe that allows the program to be correct, stable and concise.
WolframRhodium is offline   Reply With Quote
Old 7th March 2019, 02:45   #89  |  Link
Iron_Mike
Registered User
 
Join Date: Jul 2010
Posts: 132
Quote:
Originally Posted by poisondeathray View Post
ImageMagick .

The vapoursynth version supports many pixel formats, 10bit, 16bit, float .... all in their native format (e.g. DPX will be 10bit RGB, instead of 16bit)
http://www.vapoursynth.com/doc/plugins/imwri.html

(The avs version is very outdated, 8bit, limited format support)
thank you, that worked.
Iron_Mike is offline   Reply With Quote
Old 7th March 2019, 02:50   #90  |  Link
Iron_Mike
Registered User
 
Join Date: Jul 2010
Posts: 132
Quote:
Originally Posted by WolframRhodium View Post
I expect people to convert format of clips themselves. I believe that allows the program to be correct, stable and concise.
trying to understand the approach here... your implementation can only compare the exact same video format ?

so if we want to compare a 16bit full RGB master with a 12/10/8 bit encode in various chroma sub sampling formats, we would convert the master to the format of the encode... ?

or how is this done correctly ?

Thanks.
Iron_Mike is offline   Reply With Quote
Old 7th March 2019, 04:54   #91  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Quote:
Originally Posted by WolframRhodium View Post
I have updated the code of MDSI. Usage:
Code:
src, gs, cs, gcs = MDSI(src, ref, show_maps=True)
You may have to normalize these maps yourself for better visualization.
The traces are very faint, but an Unsharp Mask (two passes if needs be) brings them up nicely.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 7th March 2019 at 15:47.
WorBry is offline   Reply With Quote
Old 7th March 2019, 04:56   #92  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 162
Quote:
Originally Posted by Iron_Mike View Post
your implementation can only compare the exact same video format ?
Yes.

Quote:
Originally Posted by Iron_Mike View Post
so if we want to compare a 16bit full RGB master with a 12/10/8 bit encode in various chroma sub sampling formats, we would convert the master to the format of the encode... ?
Normally it would be:
Code:
yuv420p8 = core.resize.Bicubic(rgb48, format=vs.YUV420P8, matrix_s='709')
for Blu-ray material.

But it won't work for every case, like chroma locations other than left, or different matrix specification.

Last edited by WolframRhodium; 7th March 2019 at 05:29.
WolframRhodium is offline   Reply With Quote
Old 7th March 2019, 11:54   #93  |  Link
Iron_Mike
Registered User
 
Join Date: Jul 2010
Posts: 132
Quote:
Originally Posted by WolframRhodium View Post
yuv420p8 = core.resize.Bicubic(rgb48, format=vs.YUV420P8, matrix_s='709')
thanks for that, ran some test with the resize cmd you posted and with core.fmtc... results seems to be almost identical...

now, why do you downscale the master and not upscale the encode to the masters format before comparison ?

Thanks.
Iron_Mike is offline   Reply With Quote
Old 7th March 2019, 12:44   #94  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 162
Quote:
Originally Posted by Iron_Mike View Post
now, why do you downscale the master and not upscale the encode to the masters format before comparison ?
It's just a trade-off. Downscaling is fast but inaccurate, while upscaling is accurate but slow. I'm just make a demonstration here instead of providing a high-quality conversion. (The quality of upscaling by nnedi3 is even higher, for example)
WolframRhodium is offline   Reply With Quote
Old 8th March 2019, 22:46   #95  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Quote:
Originally Posted by WorBry View Post
@ WolframRhodium,

Regarding MDSI. Is there provision in the original code for producing the Gradient Similarity (GS), Chromacity Similarity (CS) and pooled Gradient-Chromacity Similarity (GCS) maps shown in the original paper ?



https://arxiv.org/pdf/1608.07433.pdf

I've been using quality metrics to compare various 'visually lossless' intermediate codecs and I'm seeing some interesting results with MDSI that appear to be chroma-related - they don't occur when testing with greyscale images. The similarity maps would helpful in identifying the implicated image components.
Thought the results might be of interest:

https://forum.doom9.org/showthread.p...59#post1868159
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 14th March 2019, 15:53   #96  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
https://github.com/theChaosCoder/zoptilib
New parameter: showstats - show metric stats per frame (vmaf and time are not supported) - Zopti(r'results.txt', metrics=['ssim', 'gmsd', 'mdsi', 'butteraugli', 'time'], showstats=True, matrix='709')
Updated WaDIQaM (pytorch) and added WaDIQaM nr/fr (chainer), untested bcs it needs cupy and other stuff. Lots of gigabytes und modules needs to be installed first.


Now I don't like the forced heatmap in butteraugli :/
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 14th March 2019 at 16:05.
ChaosKing is offline   Reply With Quote
Old 14th March 2019, 19:37   #97  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Quote:
Originally Posted by ChaosKing View Post
https://github.com/theChaosCoder/zoptilib
New parameter: showstats - show metric stats per frame (vmaf and time are not supported) - Zopti(r'results.txt', metrics=['ssim', 'gmsd', 'mdsi', 'butteraugli', 'time'], showstats=True, matrix='709')
Very useful. Thanks for that.

Quote:
Originally Posted by ChaosKing View Post
Now I don't like the forced heatmap in butteraugli :/
Me neither.
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 14th March 2019, 20:39   #98  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Quote:
Originally Posted by ChaosKing View Post
https://github.com/theChaosCoder/zoptilib
New parameter: showstats - show metric stats per frame
Great addition. It would look cleaner if Butteraugli stats were lined with the others. So can we shorten it to... butt?
zorr is offline   Reply With Quote
Old 14th March 2019, 22:15   #99  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
done
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 19th March 2019, 10:51   #100  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
https://github.com/theChaosCoder/zoptilib
Mdsi and butteraugli no longer contaminate the clip. That means metrics=['ssim', 'gmsd', 'mdsi', 'butteraugli'] is the same as metrics=['mdsi', 'butteraugli', 'ssim', 'gmsd'] now.
This also means that you won't see the heatmap...
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.