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. |
|
|
Thread Tools | Search this Thread | Display Modes |
12th February 2022, 04:05 | #322 | Link |
Registered User
Join Date: Jan 2022
Posts: 13
|
What if I created a deblending mask and want to use it on a video where the logo is the same but shifted a little bit?
For example, here's my base mask: https://filetransfer.io/data-package/QxGcwH8N#link Here's a video I used to generate deblending mask from: https://filetransfer.io/data-package/mjjRj0qE#link Code:
InpaintDelogo( mask="C:\LogoMask596x336p.png", Loc="136,194,-136,-88", Analyze=3, FrB=120, FrW=0, FrS=1, Deep=1, Interp=0, dPP=0, Mode="Deblend") But the logo here is shifted by about 6 px down so the same deblending mask doesn't quite work... Is there a way to make it work? Or the only way is to make a deblending mask from a video where the logo is located at the exact same position? |
12th February 2022, 18:10 | #323 | Link | |
Banana User
Join Date: Sep 2008
Posts: 989
|
Quote:
2) "Analyze=3, FrB=120, FrW=0, FrS=1" <- manual frame selection doesn't work with positive Analyze. So, select proper Loc, create proper basemask and deblend masks with 1053334574 clip: Code:
InpaintDelogo( mask="C:\1053334574.bmp", Loc="114,174,-112,-68", Analyze=-3, FrB=76, FrW=227, FrS=3, Deep=1, Mode="Deblend", Automask=1, aMix=0) In 1053531500 clip the logo is shifted exactly 4 pixels up, so edit the basemask file with Photoshop and move logo up. A/C deblend masks in ebmp are not stored in full frame dimension, only Loc area, so if you keep dimensions of the Loc area the same then deblend masks fit (they are 'moving' when you change Loc). [If logo shifted by non-mod2 distance, then you would need to shift that one pixel inside ebmp] About Loc. You can use "StainlessS"s coords, they are easier to grasp when you are 'moving' area inside frame. "114,174,-112,-68" would be "114,174,370,94". So changing "114,174,370,94" -> "114,170,370,94" would move area 4 pixels up. Remember that "StainlessS"s coords in ebmp filename are converted back to "VoodooFX" coords format [actually they are "VDub" coords] A/C deblend masks ebmp file is seen and reused if filename corresponds to the parameters in use. If you don't get idea behind how ebmp file is named just by looking at it then maybe this will help: https://forum.doom9.org/showthread.p...76#post1948676 RESULTS: Code:
InpaintDelogo( mask="C:\1053334574.bmp", Loc="114,174,-112,-68", Analyze=-3, FrB=76, FrW=227, FrS=3, Deep=1, Interp=0, dPP=0, Mode="Deblend") After: Code:
InpaintDelogo( mask="C:\1053531500.bmp", Loc="114,170,370,94", Analyze=-3, FrB=76, FrW=227, FrS=3, Deep=1, Interp=0, dPP=0, Mode="Deblend") After: In 1053531500 clip the logo is damaged by compression on some frames and some remnants of logo are there, you can try "dPP" and "Interp" parameters, they are for hiding artifacts, but they have their own side effects.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 12th February 2022 at 20:56. |
|
4th April 2022, 23:21 | #324 | Link |
Banana User
Join Date: Sep 2008
Posts: 989
|
Thanks to the new feature in Masktools2 v2.2.30 by @pinterf there is no more glitches with "DynMask=4" on SD videos.
Code:
# Version 2.05 : 2022/04/04. Masktools2 v2.2.30 or later is required. # Tweaked: "DynMask=4" and positive "DynMaskUp", should be a bit faster and no more glitches. # New: "DynLocUp" [Experimental WIP parameter for tests].
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
30th April 2022, 17:11 | #325 | Link | |
Registered User
Join Date: Apr 2022
Posts: 11
|
Hi,
I can't find the correct settings to get proper subtitles with this video: https://mega.nz/file/sgMDyThQ#B0l4VO...3ZcLWmgWBQElpQ (sample) For now, my script looks like that: Quote:
Thank you for your help! |
|
30th April 2022, 17:29 | #326 | Link | |
Banana User
Join Date: Sep 2008
Posts: 989
|
Quote:
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 30th April 2022 at 17:32. |
|
1st May 2022, 09:00 | #328 | Link | |
Banana User
Join Date: Sep 2008
Posts: 989
|
Quote:
Actually, if you just want to inpaint some logo then all versions are good enough. You can download from GitHub, press "InpaintDelogo.avsi" there, then "History", you'll see different versions, a second button from the right side opens 'that' version.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 1st May 2022 at 10:20. |
|
2nd May 2022, 15:26 | #329 | Link |
Banana User
Join Date: Sep 2008
Posts: 989
|
Code:
# Version 2.10 : 2022/05/02. Added auto generation of the dynamic mask by color (aka "DynMask=5"/"DynColor"). # New: "DynColor", "DynColorTol", "DynColorInf", "Show=10". # This dynamic mask by color can pre-patch video for other "DynMask" methods. Few screens for comparisons: 1) Original 2) DynMask2 3) DynMask3 [Actually, DynMask3 could generate an accurate mask, except for the last digit, read in the link above] 4) DynMask5 5) DynMask2 pre-patched with DynMask5 6) DynMask3 pre-patched with DynMask5 7) Result of the mask from 6th row. Code:
v=LWLibAvVideoSource("D:\Pachacamac E.MP4") x=v.crop(4,990,-1380,-4) o1=v.InpaintDelogo(Loc="4,990,-1380,-4", Show=4, DynMask=2, DynTune=150) o2=v.InpaintDelogo(Loc="4,990,-1380,-4", Show=4, DynMask=3, DynTune=150, Dyn3Seq=54) o3=v.InpaintDelogo(Loc="4,990,-1380,-4", Show=4, DynMask=5, DynColor=$FFB900) o4=v.InpaintDelogo(Loc="4,990,-1380,-4", Show=4, DynMask=2, DynTune=150, DynColor=$FFB900) o5=v.InpaintDelogo(Loc="4,990,-1380,-4", Show=4, DynMask=3, DynTune=150, DynColor=$FFB900, Dyn3Seq=54) o6=v.InpaintDelogo(Loc="4,990,-1380,-4", Show=0, DynMask=3, DynTune=150, DynColor=$FFB900, Dyn3Seq=54, DynInflate=2).crop(4,990,-1380,-4) Stackvertical( \ x, \ o1.ConvertToYV12().AddBorders(0,2,0,0,$F0F080), \ o2.ConvertToYV12().AddBorders(0,2,0,0,$F0F080), \ o3.ConvertToYV12().AddBorders(0,2,0,0,$F0F080), \ o4.ConvertToYV12().AddBorders(0,2,0,0,$F0F080), \ o5.ConvertToYV12().AddBorders(0,2,0,0,$F0F080), \ o6.ConvertToYV12().AddBorders(0,2,0,0,$F0F080)) @Guilbert, I didn't forgot you. I'll check your video today.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
2nd May 2022, 22:53 | #331 | Link | |
Banana User
Join Date: Sep 2008
Posts: 989
|
Quote:
But I see problems at other places [I got full video in PM]. About your parameters: DynMask4H is only for DynMask=4, so it does nothing here. DynMaskUp was meant for HD videos and DynMask=4, for SD videos or small subs use DynLocUp. Halo around subs is too faint to make it useful, later I'll check if anything can be done about it. By looking at sequence you shared, I came up with these parameters [dunno if it's worse or better at other places, let me know how it's]: Code:
InpaintDelogo(Loc="300,560,-300,-50", Show=4, DynMask=3, DynTune=190, Dyn3Seq=25, KillBlobs=5, KillNoise=5, RePass=1, DynLocUp=2) If mask has many artifacts then you can: Lower CorrTh, to ~0.65 - 0.75 [would be less wrong splits] Lower SubTune, to 200 - 220. Lower SubMinDur [so wrong splits would be extracted] Use SubSuspect. EDIT: I tried VSF for comparison, sadly it fails, so no incentive to do better, maybe ~perfect mask is not possible from these subs... On your sample sequence (38265 - 38861) VSF fails a lot, where InpaintDelogo has no problems. One extracted sub for example: VSF: InpaintDelogo : On where I spotted "problems at other places" (6752 - 7269) both fails a lot. One extracted sub for example: VSF: InpaintDelogo :
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 5th May 2022 at 12:12. |
|
4th May 2022, 04:00 | #332 | Link | |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
Then, based on your tips further up the page, I decided to try to get the "Both" Mode going as the logo wasn't completely opaque. And ... it worked! No sign at all of the logo any longer. I'm very pleased and have you to thank for it, VoodooFX. |
|
4th May 2022, 06:33 | #333 | Link | |
Banana User
Join Date: Sep 2008
Posts: 989
|
Quote:
So it wasn't AvS+ issue? Why didn't you ask for help then? For not Inpaint mode you definitely want to use latest version, other modes progressed a lot. You should use Deblend for non-opaque logos, Both is meant for other things and can have unpredictable side effects if you use it instead of Deblend. Post issues you had, full avs script, frame sample from video and we'll solve it.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
|
5th May 2022, 22:41 | #335 | Link | |
Banana User
Join Date: Sep 2008
Posts: 989
|
Quote:
KillBlobs and RePass: new tcanny stuff: And in general there are less bad splits and less some other artifacts with tcanny. EDIT: Need to investigate what Dogway's masks are doing... Maybe someone knows magic already how to isolate letters inside this halo precisely [from the sample below]?
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 5th May 2022 at 23:06. |
|
7th May 2022, 16:41 | #336 | Link |
Banana User
Join Date: Sep 2008
Posts: 989
|
Masking with "new tcanny stuff": 204 FPS
Masking with KillBlobs/RePass: 91 FPS Dunno when I'll have time to release a new version, so here is the mask: https://we.tl/t-MjgKuwhWWn Used Dyn3Seq=24, [I checked and found shortest sub is 24 frames] Took ~7 mins to encode the mask, and ~3 mins to extract images with: SubsMask2Img(ImgDir="D:\test", SubMinDur=6, SubSuspect=23)
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
8th May 2022, 13:17 | #337 | Link |
Registered User
Join Date: Apr 2022
Posts: 11
|
Wow, that's a nice improvement!
I use these parameters for this show, now: Code:
InpaintDelogo(Loc="300,560,-300,-50", Show=4, DynMask=3, DynTune=190, Dyn3Seq=24, KillBlobs=5, KillNoise=5, RePass=1, DynLocUp=2, CorrTh=0.75, SubTune=220) |
14th May 2022, 22:53 | #338 | Link |
Banana User
Join Date: Sep 2008
Posts: 989
|
Code:
# Version 2.12 : 2022/05/14. Added generation of the dynamic mask by gradient magnitude map (aka "DynMask=7"/"DynTEdge"). # New: "DynTEdge", "DynTEdgeThY", "DynTEdgeInf", "DynTuneInf", Show=10, Show=11. # vsTEdgeMask plugin is required. # Version 2.11 : 2022/05/13. Rewrite: "DynColor" ~30%-300% faster. New: "DynMask=6/"DynTune". Removed: "Show=10". I used these parameters to get the mask in my previous post: InpaintDelogo(Loc="300,560,-300,-50", Show=4, DynMask=3, Dyn3Seq=24, DynTune=190, DynTEdge=1, DynTEdgeThY=20, DynTEdgeInf=2, DynLocUp=2)
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
21st May 2022, 14:12 | #339 | Link |
Banana User
Join Date: Sep 2008
Posts: 989
|
Improved subs extraction: ~90% reduction of non-sub images.
Code:
# Version 2.13 : 2022/05/21. SubsMask2Img: Added average luma check to catch non-sub images. # New: "SubMinLuma", "SubSusLuma". # Renamed: "SubSuspect" to "SubSusDur".
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
23rd May 2022, 02:11 | #340 | Link | |
Banana User
Join Date: Sep 2008
Posts: 989
|
Code:
# Version 2.14 : 2022/05/22. SubsMask2Img: New option to extract raw non-binarized images. # Enabled by "Extract=2" in InpaintDelogo() or "Raw" in SubsMask2Img(). # New: "Raw", "RawAvr". For example averaged raw sub image: Not averaged raw sub image: The feature request: Quote:
Sub image: https://i.imgur.com/goxj4KB.png Sub image: https://i.imgur.com/u3nzosV.png [not raw, just to check how it's better than Tesseract] Note: Google Cloud Vision OCR should be something similar to Baidu OCR.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 30th May 2022 at 06:02. |
|
Tags |
delogo, hardsubs, ocr, remove, watermark |
Thread Tools | Search this Thread |
Display Modes | |
|
|