VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Member
    Join Date
    Jan 2024
    Location
    North America
    Search Comp PM
    First time ever using InpaintDelogo, finally got it to work but now I am getting strange results for my bmp files.

    At first I tried to use Automask but it ended up giving weird results (probably because video is very short, 14 seconds) so then I quickly drew my own mask with GIMP just to test it out, I set automask to 0 and put in my own bmp and it gives this error:
    Image
    [Attachment 76276 - Click to enlarge]

    This error never appears for bmp created by automask, what is wrong?

    Here is my custom mask that doesn't work:
    Image
    [Attachment 76275 - Click to enlarge]
    Quote Quote  
  2. In the gimp bmp export options, twirl open advanced options and checkmark "24bit R8 G8 B8" when saving
    Quote Quote  
  3. Member
    Join Date
    Jan 2024
    Location
    North America
    Search Comp PM
    Thanks, the images work now, but now there is a new issue, the previous mask that I uploaded is working fine, obviously the mask doesn't really fit that well but it is doing what it is supposed to do, so I went into GIMP again and created a better fitting mask:
    Image
    [Attachment 76278 - Click to enlarge]

    And now it gives this weird results:
    Image
    [Attachment 76277 - Click to enlarge]


    Also as another side note, when the mask does work, the colors look very strange and wrong, why is this? how can i make the colors match the video better? Also it seems the bottoms of the letters do not get changed in delogopp window
    Image
    [Attachment 76279 - Click to enlarge]
    Quote Quote  
  4. Member
    Join Date
    Jan 2024
    Location
    North America
    Search Comp PM
    Okay, I figured out how to fix the mask but I'm still getting this weird color correction going on, video is purple-ish on the mask for some reason, also strange shapes on mShow=1? Does it mean anything? My main issue is the colors right now
    Image
    [Attachment 76288 - Click to enlarge]

    Image
    [Attachment 76289 - Click to enlarge]


    Here are my files for the project: https://pixeldrain.com/u/JMxk1usE
    Last edited by DaintyTurnip39; 19th Jan 2024 at 20:04.
    Quote Quote  
  5. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by DaintyTurnip39 View Post
    And now it gives this weird results:
    In "Show=1" you can see that your mask is not correct, only some dot in the middle, that's because mask in bmp is not full white.
    Btw, there is "Show=2" with more complete views of the masks and steps.

    Originally Posted by DaintyTurnip39 View Post
    when the mask does work, the colors look very strange and wrong
    This another mask you drew has obviously wrong shape.

    Originally Posted by DaintyTurnip39 View Post
    Okay, I figured out how to fix the mask but I'm still getting this weird color correction going on, video is purple-ish on the mask for some reason
    Now the basemask looks OK, but you have problems creating the deblending masks, you can see in "alpha" various artifacts, there should be only alpha of the logo in black background.
    This is because there is no suitable frames to auto built the correct deblending masks.
    You could make it manually in Photoshop, that's in theory, but you won't be able to replicate transparency at the edges, but there is option to inpaint the edges...

    In practice there are other ways:

    1. Find solid black/dark and solid white/bright frames with logo. Use with "Analyze=-4".
    2. Find at least one solid black/dark frame with logo.
    3. Get other videos in same resolution with the same logo as many as you can and chain them for analysis.
    4. Work on this 14 seconds video and edit masks in ebmp.

    Notes:
    There are no solid black/dark frames in this video. [actually no any solid frame at all]
    Those frames can be from another video with the same logo.
    "edit masks in ebmp" -> Parameters for the ebmp masks editing [but that is understandable only for the experts]
    Quote Quote  
  6. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by DaintyTurnip39 View Post
    ...also strange shapes on mShow=1? Does it mean anything?

    Image
    [Attachment 76289 - Click to enlarge]
    Looks like it shows a mask meant for "Both" mode.
    Just a bug with "mShow=1" itself, I'll check it later.
    Quote Quote  
  7. Member
    Join Date
    Jan 2024
    Location
    North America
    Search Comp PM
    You could make it manually in Photoshop, that's in theory, but you won't be able to replicate transparency at the edges, but there is option to inpaint the edges...
    What do you mean by this exactly? Do edges have different transparencies from anti-aliasing? How can you inpaint only the edges along with deblending the center?

    After fiddling with some things I can get some better colors, but the high contrast areas still look pretty bad, for example under the truck in this screenshot.
    Image
    [Attachment 76309 - Click to enlarge]


    Something interesting to note is that I found another video posted by this group where there is a point of the watermark being completely black, is it possible to extract the percent opacity assuming that the watermark is completely white and then apply that to the logo alpha?
    Image
    [Attachment 76310 - Click to enlarge]
    Quote Quote  
  8. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Those parameters are "only for the experts" for a reason. You won't go anywhere randomly adjusting them, and your questions increase by the geometrical progression...

    Your real option here - get exact same logo in the same dimensions in the black background.
    Other options are overcomplicated for you [or in general].

    Notes:
    Your posted video is re-encode.
    Even making ideal deblend mask won't guaranty ideal deblend result, because your video quality is not good.
    The basemask can be more precise.
    Quote Quote  
  9. Member
    Join Date
    Jan 2024
    Location
    North America
    Search Comp PM
    Originally Posted by VoodooFX View Post
    Your real option here - get exact same logo in the same dimensions in the black background.
    This is practically impossible, however, using the video from the last post I can figure out the opacity of the watermark or just guess some random percentages that are multiples of 5, because I doubt much effort was put into these watermarks, and then replace the "logo alpha" with my own custom mask which has everything correct. I am assuming that YAlphaExternal is the function that does this, but whenever I put in a path to a bmp it gives error:
    Code:
    "YAlphaExternal" must be a clip.
    What does it mean it must be a clip? Should I put in an ebmp? Tools other than photoshop that can modify and export as an ebmp? (I am currently using GIMP and cannot export with it.)

    Edit: I was actually able to recreate what I had in mind with some more functions, but it's still not looking that great, very lost on what to do at this point, this is essentially the thing that you were saying was my only option right?
    Image
    [Attachment 76321 - Click to enlarge]


    Originally Posted by VoodooFX View Post
    Your posted video is re-encode.
    Even making ideal deblend mask won't guaranty ideal deblend result, because your video quality is not good.
    Does this affect the transparencies enough that the watermark is no longer just a white logo with lowered transparency but slightly changed due to compression making deblend impossible?
    Last edited by DaintyTurnip39; 20th Jan 2024 at 13:39. Reason: Edit
    Quote Quote  
  10. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by DaintyTurnip39 View Post
    ...very lost on what to do at this point, this is essentially the thing that you were saying was my only option right?
    Yes.


    Originally Posted by DaintyTurnip39 View Post
    Does this affect the transparencies enough that the watermark is no longer just a white logo with lowered transparency but slightly changed due to compression making deblend impossible?
    Yes, it can.
    Quote Quote  
  11. Member
    Join Date
    Jan 2024
    Location
    North America
    Search Comp PM
    Originally Posted by VoodooFX View Post
    Originally Posted by DaintyTurnip39 View Post
    Does this affect the transparencies enough that the watermark is no longer just a white logo with lowered transparency but slightly changed due to compression making deblend impossible?
    Yes, it can.
    My original reason for trying out InpaintDelogo was to create a faster and better method of removing transparent logos because I already had a method of doing it that was pretty slow and finnicky. So I tried my older method, of using a .png of the watermark and then multiply it with the original video, and then screen with the watermark again, then merge it back with the original video with difference (I'm not really sure how it works but it usually give pretty good results after changing some of the "Blend" sliders for the merge nodes), and based on the results it rules out this compression making it impossible to deblend that I was talking about.
    Image
    [Attachment 76352 - Click to enlarge]


    Maybe my deblend settings are just bad? Do you think you can try making your own script to see if you can get better results? I have my project files linked a few posts ago. I know that I already have a pretty good watermark removal but I would love to see how you would do it so I can use this tool for future videos.
    Quote Quote  
  12. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by DaintyTurnip39 View Post
    ...and based on the results it rules out this compression making it impossible to deblend that I was talking about.
    I dunno what you do there in those nodes, but I don't see how it can "rule out" that problem.

    Originally Posted by DaintyTurnip39 View Post
    Do you think you can try making your own script to see if you can get better results? I have my project files linked a few posts ago. I know that I already have a pretty good watermark removal but I would love to see how you would do it so I can use this tool for future videos.
    This not exactly how I would do it, just the quick examples for you:

    Code:
    LWLibAvVideoSource("D:\video_2024-01-20_05-15-18.mp4")
    
    n=ImageSource("D:\comeon.bmp").Trim(0,-1).Crop(250,210,-280,-190).ConvertToY.mt_inpand
    
    InpaintDelogo(mask=n, Loc="250,210,-280,-190", Analyze=3, Mode="Deblend", Inflate=2, Optimize2=2, dPP=-5,
    \ YAlphaSolidOuts=0, YColorSolid=235, YOffsetOuts=0,
    \ YAlphaSolidIns=52, YOffsetIns=0)
    With edges inpainted:
    Code:
    LWLibAvVideoSource("D:\video_2024-01-20_05-15-18.mp4")
    
    n=ImageSource("D:\comeon.bmp").Trim(0,-1).Crop(250,210,-280,-190).ConvertToY.mt_inpand
    
    InpaintDelogo(mask=n, Loc="250,210,-280,-190", Analyze=3, Mode="Deblend", Interp=0, dPP=-5,
    \ YAlphaSolidOuts=0, YColorSolid=235, YOffsetOuts=0,
    \ YAlphaSolidIns=52, YOffsetIns=0,
    \ EdgePP=1)
    Original:
    Click image for larger version

Name:	pZ8xAK0.png
Views:	44
Size:	440.4 KB
ID:	76366

    Result from the first example:
    Click image for larger version

Name:	1Mq6vDb.png
Views:	43
Size:	422.6 KB
ID:	76367

    Result from the second example:
    Click image for larger version

Name:	5uCKYkZ.png
Views:	46
Size:	426.8 KB
ID:	76368
    Quote Quote  



Similar Threads

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