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

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd December 2020, 14:47   #1  |  Link
PRAGMA
Registered User
 
Join Date: Jul 2019
Posts: 73
VoidWeave + VSGAN == Potential new Deinterlacing method

In pvsfunc I recently added a Class method to PDeinterlacer called VoidWeave.
https://github.com/rlaPHOENiX/pvsfun...rlacer.py#L152

It simply makes every other row on each field a 255 (#ff) RGB green. From there, it can be used with VSGAN and an inpainting model to fill the green with what the model believes should be their based on the context of the neighboring pixels.

This is a single-field deinterlacer like sangnom.

You can see an example use of this with VSMPEG
https://github.com/rlaPHOENiX/VSMPEG

Example of this being used with an in-the-works model:
https://streamable.com/2df9ig
*This is 25i->50p, Bob deinterlace*

As you can see, the Intro really struggles for whatever reason, but the actual live action scenes are really darn nice.

The problems I've encountered so far is that when using a bob tactic (every even (2nd) field) needs to be vertically aligned and to do that I opted for putting a black 1px border on the top, and remove 1px row of pixels from the bottom. It works, but it's definitely not as good as whatever way QTGMC is doing it.

As you saw in the intro, it is also clear that its doing a per-field deinterlace too, you can see clear as day vertical information being missing on some of the angled lines.

I should note, depending on how you train the model for VSGAN, can go reall quick. In the model im testing it gets 9.4 fps on my i7-8700k + 1080ti

Any advice?

Last edited by PRAGMA; 22nd December 2020 at 14:56.
PRAGMA is offline   Reply With Quote
Old 22nd December 2020, 15:04   #2  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,707
Have you tried it on problematic sources? Could this also be used for ivtc for removing (undetected) combing?

Btw. I once tried MCBob() on a "it crowd" dvd and the result was perfect.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 22nd December 2020, 19:18   #3  |  Link
PRAGMA
Registered User
 
Join Date: Jul 2019
Posts: 73
Quote:
Originally Posted by ChaosKing View Post
Have you tried it on problematic sources? Could this also be used for ivtc for removing (undetected) combing?

Btw. I once tried MCBob() on a "it crowd" dvd and the result was perfect.
I wont lie, im not familiar with the whole "combing" problems, though I see talk about it all the time, and probably even encountered it myself.

Is this what you mean by combing?

PRAGMA is offline   Reply With Quote
Old 24th December 2020, 20:08   #4  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,707
hmm this looks like 2 problems combined

Look at the buttons here: https://forum.videohelp.com/threads/...tc#post2564552

Bu basically it's this something like this:
https://i.imgur.com/ruNUl62.png

It's also often found in the mouth region in animation bcs the change in the image itself is so small that the filter can't detect it properly.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 26th December 2020, 14:20   #5  |  Link
PRAGMA
Registered User
 
Join Date: Jul 2019
Posts: 73
Quote:
Originally Posted by ChaosKing View Post
hmm this looks like 2 problems combined

Look at the buttons here: https://forum.videohelp.com/threads/...tc#post2564552

Bu basically it's this something like this:
https://i.imgur.com/ruNUl62.png

It's also often found in the mouth region in animation bcs the change in the image itself is so small that the filter can't detect it properly.
Ok I see the confusion.
So, with the image I showed, it seems it was caused by mvsfunc.ToRGB, something to do with the conversion caused the result to be very odd in edge cases (and only sometimes).

Regarding the image examples you sent on combing, this isn't going to be something related to this project (or even QTGMC unless you use Progressive mode).

With QTGMC or VoidWeave+VSGAN, it only runs on frames marked as Interlaced by the video metadata. Whereas stuff like TIVTC e.t.c tries to metrically detect a frame as interlaced, which is why you gotta fiddle with all kinds of detection settings unlike QTGMC or VoidWeave+VSGAN.

When using PSourcer and PDeinterlacer, it isn't really that difficult to manually mark a frame (that is burn-in interlacing, aka combed I guess) as interlaced, but I'm not sure how well it would actually work out.
PRAGMA is offline   Reply With Quote
Old 26th December 2020, 20:16   #6  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 251
not knowing if it is related to your issues, recently realized, that interlace content has to be converted to rgb differently than as progressive, exactly because I noticed detail problems in combing areas after conversion, it needs to be treated:
Code:
#interlaced=True?
field_based = 0
try:
    field_based = clip.get_frame(0).props['_FieldBased'] #0=progressive, 1=bottom field first, 2=top field first
except:
    pass
if field_based:
    #convert as interlaced
    clip = clip.std.SeparateFields()
#here is conversion to rgb and then:
if field_based:
    rgb = rgb.std.DoubleWeave()[::2]
this is for true interlace content and then_FieldBased would need to be always flagged, because it might be detected from source plugin or not.

With your content when actually fixing interlace artifacts, it might get more tricky to actually see what you have looking at rgb, perhaps you might never look at it, only after fixing :-)
_Al_ is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 20:36.


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