Closed Echolink50 closed 2 years ago
LaMa was designed for image inpainting. Technologies for video inpainting significantly differ from those for separate images, because in videos on the one hand you need temporal consistency and on the other you have more information - regions of different frames can be reused.
LaMa can be used for videos, but the quality will probably be inferior compared to designated video inpainting methods. The most straightforward way to use existing LaMa codebase to process video is:
ffmpeg -i video.mp4 video_frames/%05d.jpg
. Somehow add masks for each frame to the same folders.Note that you need to specify a mask for each separate frame. There is no functionality for object segmentation and tracking in videos in LaMa.
There is a third-party colab with CLIP-based segmentation and LaMa for video inpainting, which is based on the similar idea (twitter post and video, colab)
There are designated video completion methods, e.g. Flow-edge guided video completion.
Thank you so much for a very clear and informative answer.
I was looking to install this. I was wondering if it supports some way to do a batch of images from a sequence or even do a video? Or do I have to manual highlight the object i want removed in each image? Thanks everyone.