VideoHelp Forum


Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!


Try StreamFab Downloader and download streaming video from Youtube, Netflix, Amazon! Download free trial.


+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 47 of 47
Thread
  1. Originally Posted by VoodooFX View Post
    Originally Posted by meeshu View Post
    Another question.

    What is this "mask.bmp" ? Is this something that you have to create first before running the script? If so, how to create this mask this please?
    You can create masks with any image editor.

    Or you can try Automask arg: InpaintDelogo(mask="D:\mask.bmp", Automask=1, Loc="88,860,-870,-56")
    Back to the InPaintDeLogo script.

    Tried running this script with Automask:

    Code:
    WLibAvVideoSource("G:\Test_Video_2.mp4")
    InpaintDelogo(mask="G:\mask.bmp", Automask=1, Loc="88,860,-870,-56")
    but got an error message when the script was run:

    Image
    [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.
    Quote Quote  
  2. Originally Posted by VoodooFX View Post
    I used PhotoShop.
    I also use PhotoShop, Paint Shop and some other image editors. But would you please expand your answer to describe how exactly (step by step) the mask is created, please?
    Quote Quote  
  3. 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.
    Quote Quote  
  4. 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
    Quote Quote  
  5. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by meeshu View Post
    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.
    Code:
    InpaintDelogo( mask="D:\Testmmm.png", Loc="0,0,-0,-0", Turbo=-1, Inflate=2, Optimize1=0 )


    Image
    [Attachment 74175 - Click to enlarge]
    Quote Quote  
  6. 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".

    Image
    [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 )
    What is wrong here? Why can't AviSynth find the dll file?

    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
    Quote Quote  
  7. 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.

    Image
    [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.
    Quote Quote  
  8. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by meeshu View Post
    What do these numbers mean? Dimensions of the mask? Location of the mask? Or what?
    Location of a logo. Doesn't relate to a mask.

    Loc is similar to Crop().
    Quote Quote  
  9. 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.

    Image
    [Attachment 74242 - Click to enlarge]
    Quote Quote  
  10. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by meeshu View Post
    So, how do you interpret the numbers 88, 860, -870, -56 then?
    Those numbers are just random example you asked, not related to any video.

    Loc="0,0,-0,-0" is from real script.
    Quote Quote  
  11. Originally Posted by VoodooFX View Post
    Originally Posted by meeshu View Post
    So, how do you interpret the numbers 88, 860, -870, -56 then?
    Those numbers are just random example you asked, not related to any video.

    Loc="0,0,-0,-0" is from real script.
    Ok. That clears that up.

    Thank you.
    Quote Quote  
  12. 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.
    Quote Quote  
  13. Originally Posted by meeshu View Post

    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?
    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.
    Quote Quote  
  14. Comments noted. Thank you!
    Quote Quote  
  15. 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.
    Quote Quote  
  16. Originally Posted by meeshu View Post

    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.
    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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!