Skip to content

This repository provides a powerful AI-driven solution for removing objects from videos using text prompts. By integrating SAM2, Florence2, and ProPainter, the model enables precise and seamless object removal. Simply describe the objects to remove (e.g., "man, car, cap, basket"), and the AI will handle the rest with high accuracy.

Notifications You must be signed in to change notification settings

muhammad-ahmed-ghani/video-inpainting

Repository files navigation

Text-Based Video Inpainting 🎥

This project combines SAM2, Florence2, and ProPainter for intelligent video object removal using text prompts. Simply describe which objects you want to remove (e.g "man, car, cap, basket"), and the AI will do the rest! 🪄

✨ Features

  • 🎯 Text-guided object removal from videos
  • 📹 Support for common video formats
  • 🔄 Adjustable scale factor for memory optimization
  • ⚡ GPU-accelerated processing
  • ⏱️ Customizable processing duration

🚀 Quick Demo

Try it now on Hugging Face Spaces:

💻 Installation:

conda create -n video-inpainting python=3.11 -y
conda activate video-inpainting
pip install -r requirements.txt

📥 Download Checkpoints

To get started with the project, you'll need to download the required pretrained models and organize them as follows:

Download the SAM2 checkpoints from here: SAM2_PRETRAINED_MODELS
🗂️ Place the downloaded files in the following directory: ./checkpoints


Download the ProPainter checkpoints from here: PROPAINTER_PRETRAINED_MODELS
🗂️ Place the downloaded files in the following directory: ./weights

🎮 Usage

Run the Gradio interface:

python app.py

🔧 System Requirements:

  • CUDA-capable GPU with 16GB+ VRAM
  • CUDA 12.1 or higher
  • 16GB+ RAM
  • Python 3.11

About

This repository provides a powerful AI-driven solution for removing objects from videos using text prompts. By integrating SAM2, Florence2, and ProPainter, the model enables precise and seamless object removal. Simply describe the objects to remove (e.g., "man, car, cap, basket"), and the AI will handle the rest with high accuracy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published