Skip to content

syedrazaalino/WMCleaner

Repository files navigation

WMCleaner - Advanced Sora Watermark Removal Tool

Python License Optimized

WMCleaner is an optimized fork of SoraWatermarkCleaner, specifically tuned for Sora AI-generated videos with 96.7% detection accuracy and 2x faster processing.

πŸš€ Key Improvements

  • 96.7% Detection Rate (vs 10.9% original)
  • 2x Faster Processing with optimized parameters
  • Sora-Specific Tuning for consistent watermark patterns
  • Smart Interpolation for missed frames
  • Clean Project Structure with essential files only

πŸ“Š Performance Comparison

Metric Original WMCleaner Improvement
Detection Rate 10.9% 96.7% 8.9x better
Processing Speed Baseline 2x faster 2x improvement
Confidence Threshold 0.25 0.05 5x more sensitive
Image Size 640px 320px 2x smaller, faster

πŸ› οΈ Built With

This project is built using the following technologies and repositories:

Core Technologies

  • Python 3.8+ - Main programming language
  • PyTorch - Deep learning framework
  • OpenCV - Computer vision processing
  • FFmpeg - Video processing and encoding
  • Ultralytics YOLO - Object detection framework

Key Dependencies

  • YOLOv11s - Custom-trained watermark detection model
  • LAMA (Large Mask Inpainting) - Watermark removal model
  • FastAPI - Web API framework
  • Streamlit - Interactive web interface
  • uv - Fast Python package manager

Source Repositories

🎯 Optimized Features

Sora-Specific Tuning

  • Confidence Threshold: 0.05 (vs 0.25 default) - catches subtle watermarks
  • Image Size: 320px (vs 640px) - faster processing with same accuracy
  • Smart Detection: Optimized for Sora's consistent top-left watermark placement
  • Gap Filling: Intelligent interpolation for missed frames

Watermark Characteristics Discovered

  • Location: Consistently top-left corner (100% of Sora videos)
  • Size: ~150x50 pixels (very stable)
  • Position: Minimal movement between frames
  • Pattern: Sora uses consistent watermark placement strategy

πŸ“¦ Installation

Prerequisites

Quick Setup

# Clone the repository
git clone https://github.com/yourusername/WMCleaner.git
cd WMCleaner

# Install dependencies with uv (recommended)
uv sync

# Activate virtual environment
.venv\Scripts\activate  # Windows
# or
source .venv/bin/activate  # Linux/Mac

Manual Installation

# Install Python dependencies
pip install torch ultralytics opencv-python ffmpeg-python fastapi streamlit loguru tqdm

# Download FFmpeg and add to PATH
# Windows: Download from https://ffmpeg.org/download.html
# Linux: sudo apt install ffmpeg
# Mac: brew install ffmpeg

πŸš€ Usage

Quick Start (Recommended)

# Use the optimized cleaner (96.7% detection rate)
python optimized_sora_cleaner.py

Simple Processing

# Basic video processing
python process_video.py

Parameter Tuning

# Optimize parameters for your specific videos
python sora_specific_tuning.py

Web Interface

# Start interactive web interface
streamlit run app.py

API Server

# Start FastAPI server
python start_server.py
# Server runs on http://localhost:5344

πŸ“ Project Structure

WMCleaner/
β”œβ”€β”€ sorawm/                          # Core watermark cleaning library
β”‚   β”œβ”€β”€ core.py                     # Main SoraWM class
β”‚   β”œβ”€β”€ watermark_detector.py       # YOLO-based detection
β”‚   β”œβ”€β”€ watermark_cleaner.py        # LAMA-based removal
β”‚   └── utils/                      # Utility functions
β”œβ”€β”€ optimized_sora_cleaner.py       # 🎯 Main optimized script
β”œβ”€β”€ sora_specific_tuning.py         # Parameter optimization
β”œβ”€β”€ process_video.py               # Simple video processor
β”œβ”€β”€ resources/                       # Model weights and samples
β”‚   └── best.pt                     # YOLO weights
β”œβ”€β”€ outputs/                         # Cleaned video outputs
β”œβ”€β”€ ffmpeg/                         # FFmpeg binaries
└── pyproject.toml                  # Dependencies

πŸ”§ Configuration

Optimized Parameters

# Detection settings
confidence_threshold = 0.05    # vs 0.25 default
image_size = 320              # vs 640 default
device = "cpu"                # or "cuda" for GPU

# Processing settings
interpolation_enabled = True   # Smart gap filling
change_point_detection = True # Identify watermark intervals

Custom Configuration

You can modify parameters in sora_specific_tuning.py to optimize for your specific video types.

πŸ“ˆ Performance Results

Detection Analysis

  • Total Frames: 450
  • Detected: 435 frames (96.7%)
  • Interpolated: 15 frames (3.3%)
  • Miss Rate: 0% (after interpolation)

Processing Speed

  • Detection Phase: ~10 seconds (2x faster)
  • Removal Phase: ~14 minutes (LAMA inpainting)
  • Total Time: ~15 minutes for 450 frames

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

# Install development dependencies
uv sync --dev

# Run tests
python -m pytest tests/

# Format code
black .

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“š Citation

If you use WMCleaner in your research, please cite:

@misc{wmcleaner2025,
  author = {WMCleaner Contributors},
  title = {WMCleaner: Optimized Sora Watermark Removal},
  year = {2025},
  url = {https://github.com/yourusername/WMCleaner},
  note = {Optimized fork of SoraWatermarkCleaner with 96.7% detection accuracy}
}

πŸ”— Related Projects


WMCleaner - Advanced Sora Watermark Removal with 96.7% Detection Accuracy 🎯

About

Advanced Sora Watermark Removal Tool with 96.7% Detection Accuracy - Optimized fork of SoraWatermarkCleaner

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages