Back to the InPaintDeLogo script.
Tried running this script with Automask:
but got an error message when the script was run:Code:WLibAvVideoSource("G:\Test_Video_2.mp4") InpaintDelogo(mask="G:\mask.bmp", Automask=1, Loc="88,860,-870,-56")
[Attachment 74157 - Click to enlarge]
So, try manually creating mask instead? When creating masks for InPaintDeLogo manually, how exactly is this done? So for this test video clip here, how to you create the appropriate mask to remove both the BBC logo and the text "Antiques Roadshow (1999)"?
Thank you.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 31 to 47 of 47
Thread
-
-
I used PhotoShop.
-
-
No one prepared to describe the process of manually creating masks for use with InPaintDeLogo?
I have some experience in using various image editors (PhotoShop, PaintShop Pro, Windows Paint, as well as a few others), but no experience in creating masks (for use in AviSynth). So I really would like some guidance on the mask making procedure. Thank you.
VoodooFX. Would you be prepared to at least upload a copy of the mask.bmp that you used on the test_video_2.mp4 clip, please? I could examine that mask.bmp image so I might get an idea of how to create masks. -
It's the same way that you do masks in photoshop/gimp/paint, etc... Use a binary mask - 100% white on 100% black . Areas in white mark the area of interest
So in any image editor, draw a 100% white box around the area of interest, on a black background -
Code:
InpaintDelogo( mask="D:\Testmmm.png", Loc="0,0,-0,-0", Turbo=-1, Inflate=2, Optimize1=0 )
[Attachment 74175 - Click to enlarge] -
Thank you very much for the comments, revised script, and the mask!
I'm beginning to understand how this all works now.
However, on running the revised script I'm getting an error message regarding "neo_fft3d".
[Attachment 74181 - Click to enlarge]
I have downloaded the file neo_FFT3D_r11.7z which contains both the 64 bit and 32 bit versions of the file neo-fft3d.dll.
The 64 bit version of neo-fft3d.dll was copied to the AviSynth plugin directory - C:\Program Files (x86)\AviSynth+\plugins64+, and also copied to the system directory - C:\Windows\System32.
The 32 bit version of neo-fft3d.dll was copied to the system directory - C:\Windows\SysWOW64.
The error message mentions loading the dll file using LoadDLL(), but I get error message that this isn't a valid AviSynth command? This command doesn't seem to work anyway.
This is the full script for running InPaintDeLogo -
Code:LWLibavVideoSource("G:Test_Video_2.mp4") InpaintDelogo( mask="G:\Testmmm.png", Loc="0,0,-0,-0", Turbo=-1, Inflate=2, Optimize1=0 )
EDIT: Never mind. I got the script to run in the end by downloading both 32 bit and 64 bit versions of the file libfftw3f-3.dll. The 32 bit version was installed within - C:\Windows\SysWOW64 directory. And the 64 bit version was installed within - C:\Windows\System32 directory.
The modified script now includes displaying the input and output videos side by side for easy comparison -
Code:LWLibavVideoSource("G:Test_Video_2.mp4") A=last InpaintDelogo( mask="G:\Testmmm.png", Loc="0,0,-0,-0", Turbo=-1, Inflate=2, Optimize1=0 ) B=last StackHorizontal(A, B)
Last edited by meeshu; 5th Oct 2023 at 04:42. Reason: Correct dll files installed, and script runs as intended
-
I'm still studying and experimenting with the sample scripts and with other test videos.
But I'm having difficulty in understanding the numbers contained within the LOC() parameter for the original script for InPaintDeLogo.
[Attachment 74239 - Click to enlarge]
What do these numbers mean? Dimensions of the mask? Location of the mask? Or what?
I don't have a copy of the original "mask.bmp" for study.
Would someone please clarify the meaning of these numbers, and how it relates to the mask and to the location/position of the logo and text to be removed form the original test_video_2.mp4 clip?
Thank you. -
Location of a logo. Doesn't relate to a mask.
Loc is similar to Crop(). -
Thanks for the reply! This has cleared up some issues.
However, assuming the Loc numbers are for left, top, right, bottom, then plotting lines at these offset number locations on a screenshot of the test_video_2, results in an area near the bottom of the screenshot, well away from the logo and text near the top of the screen!?
This is obviously not correct as the logo and text are not contained within the area defined by the offset numbers.
So, how do you interpret the numbers 88, 860, -870, -56 then?
Thank you.
[Attachment 74242 - Click to enlarge] -
-
I'm not getting good results with removing logos/texts from other test videos using InFill and InPaintDeLogo.
So, now looking at this "ProTrainer" option as mention in post #17.
What AviSynth/ProTrainer script(s) and/or other program(s) and/or other setting(s) was/were used to generate the processed output clip ( Test_Video_2_ProPainter.mp4 ) please?
Thank you. -
The instructions , prerequisite, python scripts and demos are on the ProPainter page . It's much slower than InpaintDelogo and limited by GPU memory . It's difficult to use unless you're used to python and these types of projects. They typically only support image sequences, but ProPainter one has AVI/MP4/MOV support.
There are several options, listed in the inference_propainter.py . You have to adjust them depending on your sources and hardware.
In general, for temporal inpainting, you need fairly clean sources, otherwise the noise/grain/compression artifacts contaminate the patch. For example - don't think you can use a thin logo mask only covering the letters - because in between the letters and outside of the letters are compression artifacts (zoom in and you can see them). If you had a very high quality source - then you might be able to use a thin mask. An alternative strategy would be to apply to prefilter (denoise)
You don't need avisynth - you can use any tool(s) to crop to region of interest and generate masks, and to combine/composite the inpainted regions back into the full video. -
I've had a look at the GitHub site for ProTrainer.
About the only thing I've found and understood so far is that it appears that ProPainter uses masks for logo/text removal, similar to InPaintDeLogo.
I note that at that GitHub site there is a note 2023.09.24: We remove the watermark removal demos officially to prevent the misuse of our work for unethical purposes..
I understand the reason(s) for this note. But for legitimate purposes and for beginners like myself, I would have been very helpful to have viewed the demo codes to make it easier to understand and utilize.
Frankly, at this time, I am at a loss at what to do next. Maybe I'll have to spend countless hours studying how python works!? But hopefully not, as I don't have much spare time to study anything.
Seems I'll have to shelve this ProTrainer logo/text removal option for now. -
It doesn't matter, it's the same code.
You can run the other examples of object removal, they are the same as the watermark removal . Animated masks instead of static masks, but it's essentially the same
If you can run the demo successfully, then you just change the images and paths to your videos
Similar Threads
-
I need your help in creating this type of text in videos
By shando in forum Newbie / General discussionsReplies: 0Last Post: 19th Apr 2023, 14:16 -
Removing text from a video
By magnu in forum EditingReplies: 2Last Post: 8th Feb 2023, 09:00 -
Removing announcer voice from sports videos?
By rowjekto in forum Newbie / General discussionsReplies: 1Last Post: 1st Mar 2020, 02:54 -
removing border from logo with transparent
By vanhoa in forum EditingReplies: 0Last Post: 12th Oct 2019, 10:26 -
I have a problem removing transparent logo in avisynth using "delogo"
By TeNSoR in forum Newbie / General discussionsReplies: 11Last Post: 8th Jan 2019, 17:30