WatermarkRemover-AI Documentation

repository·main·Indexed 23 days ago

https://github.com/d-ogi/watermarkremover-ai

An AI-powered tool for detecting and removing watermarks from images and videos. It utilizes Microsoft's Florence-2 model for detection and LaMA for inpainting. The tool features both a GUI for single-file and batch processing and a CLI (remwm.py) with advanced options for detection prompts, frame skipping, and fade handling for videos. Supports multiple video formats and integrates with FFmpeg for audio preservation.

Tokens
1K
Snippets
3
Records
7
Agent score
31%

What's inside WatermarkRemover-AI

  1. Video Processing Capabilities

    main

    WatermarkRemover-AI supports several video-specific features:

    • Supported Formats: MP4, AVI, MOV, MKV, FLV, WMV, WEBM.
    • Audio Preservation: Requires FFmpeg to be installed on the system.
    • Two-pass Detection: Use --detection-skip (set to a value > 1) to speed up processing by detecting watermarks every N frames.
    • Fade Handling: For watermarks that appear or disappear gradually, use --fade-in and --fade-out to extend the mask by the specified number of seconds.
  2. Install WatermarkRemover-AI on Windows

    main

    The Windows setup uses a script to download a portable Python environment, so no system Python installation is required.

    1. Clone the repository.
    2. Run the setup.ps1 PowerShell script.
    3. Launch the application by double-clicking run.bat.
    git clone https://github.com/D-Ogi/WatermarkRemover-AI.git
    cd WatermarkRemover-AI
    .\setup.ps1
  3. Install WatermarkRemover-AI on Linux / macOS

    main

    Linux and macOS installations require Python 3.10+ to be already installed on your system.

    1. Clone the repository.
    2. Make setup.sh executable and run it.
    3. Launch the application by running ./run.sh.
    git clone https://github.com/D-Ogi/WatermarkRemover-AI.git
    cd WatermarkRemover-AI
    chmod +x setup.sh
    ./setup.sh
  4. Use WatermarkRemover-AI in CLI Mode

    main

    The CLI allows for automated processing of images and videos with various flags for fine-tuning detection and output.

    Basic Image Usage:

    python remwm.py input.png output_folder/

    Advanced Image Usage:

    python remwm.py ./images ./output --overwrite --max-bbox-percent=15 --force-format=PNG

    Video Processing (with fade handling):

    python remwm.py video.mp4 ./output --detection-skip=3 --fade-in=0.5 --fade-out=0.5

    Preview Mode (detect only):

    python remwm.py input.png --preview
    # Basic usage
    python remwm.py input.png output_folder/
    
    # With options
    python remwm.py ./images ./output --overwrite --max-bbox-percent=15 --force-format=PNG
    
    # Process video with two-pass detection
    python remwm.py video.mp4 ./output --detection-skip=3 --fade-in=0.5 --fade-out=0.5
    
    # Preview mode (detect without processing)
    python remwm.py input.png --preview
  5. Use WatermarkRemover-AI in GUI Mode

    main

    The GUI provides an intuitive interface for single-file or batch processing.

    1. Launch the app via run.bat (Windows) or ./run.sh (macOS/Linux).
    2. Select language and theme from the top-right corner.
    3. Choose between Single File or Batch mode.
    4. Set your input and output paths.
    5. Configure settings and click Start Processing.

    Settings are automatically saved for your next session.

  6. Reference CLI Options for remwm.py

    main

    The following flags are available when using the remwm.py CLI tool:

    OptionDescription
    --overwriteOverwrite existing files
    --transparentMake watermark regions transparent (images only)
    --max-bbox-percentMax detection size as % of image (default: 10)
    --force-formatForce output format (PNG, WEBP, JPG, MP4, AVI)
    --detection-promptCustom detection prompt (default: "watermark")
    --detection-skipDetect every N frames for videos (1-10, default: 1)
    --fade-inExtend mask backwards by N seconds (for fade-in watermarks)
    --fade-outExtend mask forwards by N seconds (for fade-out watermarks)
    --previewPreview detected watermarks without processing