How journey-ad/gemini-watermark-remover works
Gemini Watermark Remover is a local image and video watermark-removal product, exposed through browser workflows, a Chrome extension, a userscript, and a Node.js CLI/SDK. The principal image workflow detects a supported Gemini watermark, selects and evaluates a removal candidate, then returns a cleaned image for preview or download. Video processing is a separate capability, while userscript session and page-integration components connect Gemini previews and native copy/download actions to processing. Some subsystem links are documented or indexed rather than shown in excerpts; uncertain links are omitted.
Main entry points: video-app.js Video interface · watermarkEngine.js Watermark engine · index.js Userscript integration · imageProcessing.js Image runtime
Components 26
Image removal
- Image runtime
src/shared/imageProcessing.js - Watermark engine
src/core/watermarkEngine.js - Size catalog
src/core/geminiSizeCatalog.js - Adaptive detection
src/core/adaptiveDetector.js - Removal pipeline
src/core/watermarkProcessor.js - Candidate selection
src/core/pipelineInitialSelection.js - Candidate quality
src/core/pipelineCandidateQuality.js - Restoration metrics
src/core/restorationMetrics.js - Embedded alpha maps
src/core/embeddedAlphaMaps.js
Video removal
- Video detection
src/video/videoWatermarkDetector.js - Video watermark catalog
src/video/videoWatermarkCatalog.js - Video cleanup backends
src/video/videoCleanupBackends.js - Video export
src/video/videoExport.js
Browser integrations
- Chrome extension
src/extension/contentMain.js - Userscript integration
src/userscript/index.js - Action context
src/userscript/actionContext.js - Session context
src/shared/imageSessionContext.js - Session store
src/shared/imageSessionStore.js - Page processing bridge
src/userscript/pageProcessBridge.js - Page runtime
src/page/pageProcessRuntime.js
Product interfaces
- Image interface
src/app.js - CLI command
src/cli/gwrRemoveCommand.js - Node SDK
src/sdk/node.js - Video interface
src/video-app.js
Other components
- User
- Gemini page
Connections 25
- User → Image interface: selects image
README.md - Image interface → Image runtime: processes image
src/app.js - Image runtime → Watermark engine: calls engine
src/shared/imageProcessing.js - Watermark engine → Removal pipeline: processes pixels
src/core/watermarkEngine.js - Watermark engine → Embedded alpha maps: loads maps
src/core/watermarkEngine.js - Adaptive detection → Size catalog: uses catalog
src/core/adaptiveDetector.js - Candidate selection → Size catalog: queries catalog
src/core/pipelineInitialSelection.js - Candidate quality → Restoration metrics: scores candidates
src/core/pipelineCandidateQuality.js - Candidate quality → Embedded alpha maps: reads maps
src/core/pipelineCandidateQuality.js - Restoration metrics → Adaptive detection: uses detection
src/core/restorationMetrics.js - User → CLI command: runs command
README.md - CLI command → Node SDK: calls SDK
src/cli/gwrRemoveCommand.js - User → Video interface: selects video
README.md - Video interface → Video watermark catalog: loads catalog
src/video-app.js - Video interface → Video detection: detects watermark
src/video/videoWatermarkDetector.js - Video interface → Video cleanup backends: cleans frames
- Video interface → Video export: exports video
src/video-app.js - Gemini page → Chrome extension: hosts integration
README.md - Gemini page → Userscript integration: hosts integration
README.md - Userscript integration → Action context: resolves actions
src/userscript/index.js - Action context → Session context: resolves session
src/userscript/actionContext.js - Session context → Session store: reads session
src/shared/imageSessionContext.js - Userscript integration → Page processing bridge: uses bridge
src/userscript/index.js - Page runtime → Page processing bridge: uses bridge
src/page/pageProcessRuntime.js - Page runtime → Image runtime: processes image
src/page/pageProcessRuntime.js