Skip to content

A local-first watermark removal tool that uses LaMa neural network inpainting to seamlessly remove AI generator watermarks (Gemini sparkles, DALL-E signatures, Midjourney badges, etc.) from images.

License

Notifications You must be signed in to change notification settings

bchewy/chewremover

Repository files navigation

Chewremover

Chew through AI watermarks with neural inpainting.

A local-first watermark removal tool that uses LaMa neural network inpainting to seamlessly remove AI generator watermarks (Gemini sparkles, DALL-E signatures, Midjourney badges, etc.) from images.

Features

  • LaMa Neural Inpainting - State-of-the-art inpainting for seamless removal
  • Auto-Detection - Automatically finds watermarks in corners and text overlays
  • Manual Selection - Draw regions for precise control
  • 100% Local - Runs entirely on your machine, no data leaves your computer
  • Optional GPT Image - Use OpenAI's image editing API for difficult cases

Quick Start (Docker)

# Clone the repo
git clone https://github.com/yourusername/chewremover.git
cd chewremover

# Start with Docker Compose
docker-compose up

# Open http://localhost:3000

Local Development

Frontend (Next.js)

npm install
npm run dev
# Open http://localhost:3000

Backend (FastAPI)

cd backend
pip install -r requirements.txt
uvicorn main:app --reload --host 0.0.0.0 --port 8001

Optional Dependencies

# OCR text detection (improves text watermark detection)
pip install pytesseract
# Also install Tesseract: brew install tesseract (macOS) or apt install tesseract-ocr (Linux)

How It Works

  1. Upload - Drag and drop your image
  2. Detect - Auto-detect watermarks or draw a region manually
  3. Remove - LaMa neural network fills in the masked area seamlessly

Detection Modes

Mode Description
auto Combines corner + text detection
corners Edge detection in image corners
text OCR-based text detection
region User-drawn rectangle

Inpainting Pipeline

  1. LaMa (preferred) - Large Mask Inpainting neural network
  2. OpenCV fallback - Blended TELEA + Navier-Stokes algorithms
  3. GPT Image (optional) - OpenAI API with color matching

Environment Variables

Copy .env.local.example to .env.local and configure:

# Backend URL (for Docker setup)
BACKEND_URL=http://localhost:8001

# Optional: OpenAI API for GPT Image engine
OPENAI_API_KEY=sk-...

Backend Options

Variable Default Description
OPENAI_API_KEY - Required for GPT Image engine
OPENAI_IMAGE_MODEL gpt-image-1 Image editing model
OPENAI_COLOR_MATCH true LAB color histogram matching
OPENAI_SEAMLESS_BLEND true Poisson seamless cloning

Tech Stack

  • Frontend: Next.js 16, React 19, TailwindCSS
  • Backend: FastAPI, Python 3.11+
  • Inpainting: LaMa (simple-lama-inpainting), OpenCV
  • Containerization: Docker, Docker Compose

Project Structure

chewremover/
├── app/                    # Next.js frontend
│   ├── page.tsx           # Main UI component
│   └── api/               # API routes (proxy to backend)
├── backend/
│   ├── main.py            # FastAPI server
│   └── inpaint.py         # Detection & inpainting engine
├── public/                # Static assets
├── docker-compose.yml     # Container orchestration
└── CLAUDE.md             # AI assistant context

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE for details.

Acknowledgments

About

A local-first watermark removal tool that uses LaMa neural network inpainting to seamlessly remove AI generator watermarks (Gemini sparkles, DALL-E signatures, Midjourney badges, etc.) from images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published