Repository Analysis

wiltodelta/remove-ai-watermarks

AI watermark remover. CLI and Python library to strip visible and invisible AI watermarks (Gemini / Nano Banana sparkle, SynthID) and provenance metadata (C2PA, EXIF, IPTC) from images.

46.0 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of wiltodelta/remove-ai-watermarks, a Python project with 4,017 GitHub stars. SynthScan v2.0 examined 26,129 lines of code across 104 source files, recording 900 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 46.0 places this repository in the Strong AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

46.0
Adjusted Score
46.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
4.0K
Stars
Python
Language
26.1K
Lines of Code
104
Files
900
Pattern Hits
2026-07-14
Scan Date
0.21
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 22MEDIUM 84LOW 794

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 900 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers585 hits · 580 pts
SeverityFileLineSnippetContext
LOWtests/test_gemini_engine.py26 def test_small_image_gets_small_watermark(self):CODE
LOWtests/test_gemini_engine.py29 def test_large_image_gets_large_watermark(self):CODE
LOWtests/test_gemini_engine.py32 def test_boundary_image_stays_small(self):CODE
LOWtests/test_gemini_engine.py40 def test_config_small_returns_correct_values(self):CODE
LOWtests/test_gemini_engine.py46 def test_config_large_returns_correct_values(self):CODE
LOWtests/test_gemini_engine.py52 def test_position_calculation(self):CODE
LOWtests/test_gemini_engine.py65 def test_pure_black_gives_zero_alpha(self):CODE
LOWtests/test_gemini_engine.py71 def test_pure_white_gives_one_alpha(self):CODE
LOWtests/test_gemini_engine.py99 def test_engine_loads_alpha_maps(self):CODE
LOWtests/test_gemini_engine.py105 def test_detect_on_grayscale_does_not_crash(self):CODE
LOWtests/test_gemini_engine.py140 def test_footprint_mask_covers_detected_sparkle(self):CODE
LOWtests/test_gemini_engine.py149 def test_fill_lowers_confidence(self):CODE
LOWtests/test_gemini_engine.py159 def test_footprint_mask_bgra_input(self):CODE
LOWtests/test_gemini_engine.py177 def test_detect_returns_result_object(self, tmp_image_path):CODE
LOWtests/test_gemini_engine.py183 def test_detect_empty_image_returns_no_detection(self):CODE
LOWtests/test_gemini_engine.py189 def test_detect_none_image_returns_no_detection(self):CODE
LOWtests/test_gemini_engine.py193 def test_detect_random_image_low_confidence(self, tmp_image_path):CODE
LOWtests/test_gemini_engine.py239 def test_bright_core_has_high_margin(self):CODE
LOWtests/test_gemini_engine.py245 def test_flat_region_has_low_margin(self):CODE
LOWtests/test_gemini_engine.py255 def test_strong_sparkle_not_demoted(self):CODE
LOWtests/test_gemini_engine.py261 def test_strong_sparkle_on_white_kept(self):CODE
LOWtests/test_gemini_engine.py205 def test_returns_float_in_range_for_real_image(self, tmp_image_path):CODE
LOWtests/test_gemini_engine.py210 def test_returns_none_for_unreadable_file(self, tmp_path):CODE
LOWtests/test_gemini_engine.py273 def test_low_margin_blurred_blob_is_demoted(self):CODE
LOWtests/test_gemini_engine.py295 def test_bright_white_blurred_sparkle_rescued(self):CODE
LOWtests/test_gemini_engine.py319 def test_bright_colored_blob_still_demoted(self):CODE
LOWtests/test_gemini_engine.py379 def test_small_corner_sparkle_is_detected_and_localized(self):CODE
LOWtests/test_gemini_engine.py387 def test_size_weighted_search_alone_traps_on_the_decoy(self):CODE
LOWtests/test_gemini_engine.py410 def test_no_promotion_on_clean_flat_image(self):CODE
LOWtests/test_gemini_engine.py415 def test_low_gradient_decoy_loses_to_high_gradient_corner_sparkle(self, monkeypatch):CODE
LOWtests/test_pill_engine.py46 def test_detects_composited_pill(self) -> None:CODE
LOWtests/test_pill_engine.py51 def test_clean_frame_does_not_fire(self) -> None:CODE
LOWtests/test_pill_engine.py71 def test_footprint_mask_top_left_geometry(self) -> None:CODE
LOWtests/test_pill_engine.py88 def test_textured_frame_is_not_flat(self) -> None:CODE
LOWtests/test_pill_engine.py96 def test_pill_registered_top_left(self) -> None:CODE
LOWtests/test_pill_engine.py101 def test_pill_mask_is_top_left_via_registry(self) -> None:CODE
LOWtests/test_pill_engine.py133 def test_pill_kept_with_metadata_on_flat_footprint(self, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_pill_engine.py139 def test_pill_dropped_with_metadata_on_textured_footprint(self, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_pill_engine.py145 def test_pill_kept_via_wordmark_ignores_texture(self, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_pill_engine.py152 def test_pill_kept_via_assume_ai_on_flat_footprint(self, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_pill_engine.py158 def test_pill_dropped_via_assume_ai_on_textured_footprint(self, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_pill_engine.py164 def test_pill_dropped_without_metadata_or_wordmark(self, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_pill_engine.py169 def test_pill_dropped_on_doubao_even_with_metadata(self, monkeypatch: pytest.MonkeyPatch) -> None:CODE
LOWtests/test_pill_engine.py181def test_detect_bgra_no_crash() -> None:CODE
LOWtests/test_synthid_pixel_probe.py39 def test_flat_image_has_zero_carrier(self):CODE
LOWtests/test_synthid_pixel_probe.py44 def test_carrier_is_unit_norm(self):CODE
LOWtests/test_synthid_pixel_probe.py52 def test_ncc_mismatched_shape_is_zero(self):CODE
LOWtests/test_synthid_pixel_probe.py59 def test_shared_carrier_correlates_high(self):CODE
LOWtests/test_synthid_pixel_probe.py64 def test_random_fills_near_zero(self):CODE
LOWtests/test_synthid_pixel_probe.py69 def test_random_baseline_near_zero(self):CODE
LOWtests/test_synthid_pixel_probe.py74 def test_removed_carrier_collapses_correlation(self):CODE
LOWtests/test_synthid_pixel_probe.py94 def test_consistency_command_runs(self, tmp_path: Path):CODE
LOWtests/test_synthid_pixel_probe.py101 def test_consistency_needs_two_images(self, tmp_path: Path):CODE
LOWtests/test_img2img_runner.py33 def test_mps_error_reloads_on_cpu_and_retries(self, monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_img2img_runner.py54 def test_happy_path_returns_original_device_without_reload(self, monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_img2img_runner.py74 def test_non_mps_runtime_error_propagates(self, monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_img2img_runner.py92 def test_mps_error_on_non_mps_device_propagates(self, monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_img2img_runner.py113 def test_returns_first_image_from_pipeline_result(self):CODE
LOWtests/test_img2img_runner.py121 def test_typeerror_on_callback_retries_without_callback(self):CODE
LOWtests/test_jimeng_engine.py44 def test_box_anchored_bottom_right(self):CODE
525 more matches not shown…
Decorative Section Separators68 hits · 234 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_gemini_engine.py20# ── WatermarkSize / config helpers ──────────────────────────────────COMMENT
MEDIUMtests/test_gemini_engine.py59# ── Alpha map ───────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_gemini_engine.py89# ── GeminiEngine ────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_gemini_engine.py113# ── Removal: localize -> fill ───────────────────────────────────────COMMENT
MEDIUMtests/test_gemini_engine.py167# ── Detection ───────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_noai.py42# ── Constants ───────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_noai.py76# ── Extractor ───────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_noai.py337# ── ISOBMFF (AVIF / HEIF / JPEG-XL container stripping) ──────────────COMMENT
MEDIUMtests/test_noai.py113# ── Cleaner ─────────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_noai.py132# ── C2PA ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_noai.py232# ── CBOR text extraction (parser internals) ─────────────────────────COMMENT
MEDIUMtests/test_metadata.py32# ── Key detection ───────────────────────────────────────────────────COMMENT
MEDIUMtests/test_metadata.py60# ── has_ai_metadata / get_ai_metadata ───────────────────────────────COMMENT
MEDIUMtests/test_metadata.py480# ── SynthID-source detection (metadata proxy) ────────────────────────COMMENT
MEDIUMtests/test_metadata.py545# ── remove_ai_metadata ──────────────────────────────────────────────COMMENT
MEDIUMtests/test_doubao_engine.py58# ── Detection: alpha-template NCC ───────────────────────────────────COMMENT
MEDIUMtests/test_doubao_engine.py126# ── Alpha asset + footprint mask + localize -> fill removal ─────────COMMENT
MEDIUMtests/test_identify.py353# ── Local diffusion parameters (Stable Diffusion / ComfyUI) ─────────COMMENT
MEDIUMtests/test_identify.py459# ── Visible-sparkle fallback (mocked detector) ──────────────────────COMMENT
MEDIUMtests/test_identify.py635# ── Caveats and serialization ───────────────────────────────────────COMMENT
MEDIUMtests/test_identify.py36# ── Pure attribution logic (no file IO) ─────────────────────────────COMMENT
MEDIUMtests/test_identify.py262# ── End-to-end verdicts on real fixtures ────────────────────────────COMMENT
MEDIUMtests/test_identify.py387# ── China TC260 AIGC label as a PNG text chunk (Doubao) ─────────────COMMENT
MEDIUMtests/test_identify.py414# ── HuggingFace-hosted job marker (medium confidence) ───────────────COMMENT
MEDIUMtests/test_identify.py836# ── Open invisible watermark (SD/SDXL/FLUX) integration ─────────────COMMENT
MEDIUMtests/test_identify.py903# ── Integrity clashes (contradictions between independent signals) ──────COMMENT
MEDIUMtests/test_platform.py29# ── Device detection ────────────────────────────────────────────────COMMENT
MEDIUMtests/test_platform.py109# ── Model profiles ──────────────────────────────────────────────────COMMENT
MEDIUMtests/test_platform.py388# ── Format utilities ────────────────────────────────────────────────COMMENT
MEDIUMtests/test_platform.py426# ── Availability checks ────────────────────────────────────────────COMMENT
MEDIUMtests/test_platform.py450# ── Platform-specific path handling ─────────────────────────────────COMMENT
MEDIUMscripts/fidelity_metrics.py70# ── helpers ──────────────────────────────────────────────────────────COMMENT
MEDIUMscripts/fidelity_metrics.py92# ── text: PaddleOCR (PP-OCRv6) ───────────────────────────────────────COMMENT
MEDIUMscripts/fidelity_metrics.py173# ── face: detection + ArcFace + texture ──────────────────────────────COMMENT
MEDIUMscripts/fidelity_metrics.py245# ── whole image: LPIPS / SSIM / PSNR ─────────────────────────────────COMMENT
MEDIUMscripts/fidelity_metrics.py276# ── reporting ────────────────────────────────────────────────────────COMMENT
MEDIUMscripts/fidelity_metrics.py287# ── CLI ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/metadata.py28# ── Known AI metadata keys ──────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/gemini_engine.py283 # ── Detection ────────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/gemini_engine.py409 # ── Fusion ───────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/gemini_engine.py535 # ── Removal ──────────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py545 # ── C2PA Content Credentials ────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py608 # ── SynthID metadata proxy ──────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py666 # ── Local diffusion parameters (Stable Diffusion / ComfyUI) ──────COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py685 # ── xAI / Grok EXIF signature scheme (no C2PA/SynthID/IPTC) ──────COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py696 # ── HuggingFace-hosted job marker (hf-job-id PNG text chunk) ─────COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py708 # ── Samsung Galaxy AI editing marker (genAIType) ─────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py724 # ── Open invisible watermark (SD / SDXL / FLUX, dwtDct) ──────────COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py743 # ── Verdict so far (metadata + embedded watermark) ──────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/humanizer.py90# ── Adaptive polish (target the input's detail level; spare text) ──────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/_text_mark_engine.py173 # ── Templates (delegate to the asset-keyed module cache) ────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/_text_mark_engine.py184 # ── Locate ──────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/_text_mark_engine.py200 # ── Mask ────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/_text_mark_engine.py244 # ── Detect ──────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/_text_mark_engine.py292 # ── Inpaint footprint (for the inpaint-fallback removal path) ────────COMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_remover.py424 # ── Preload ──────────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_remover.py435 # ── Pipeline loading ─────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_remover.py613 # ── Core removal ─────────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_remover.py796 # ── Img2img runner ───────────────────────────────────────────────COMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_remover.py834 # ── ControlNet runner ────────────────────────────────────────────COMMENT
8 more matches not shown…
Synthetic Comment Markers11 hits · 85 pts
SeverityFileLineSnippetContext
HIGHREADME.md117Google embeds **SynthID** into every image generated by Gemini / Nano Banana. Other AI services use StableSignature, TreCODE
HIGHREADME.md376# regenerate regardless when you know the image is AI-generated.COMMENT
HIGHREADME.md410# Metadata-stripped screenshot you know is AI-generated: relax detection to recover aCOMMENT
HIGHtests/test_noai.py315 assert "synthid_watermark" not in info # procedural, not AI-generatedCODE
HIGHtests/test_metadata.py1639 # verdict must stay 'unknown', not 'AI-generated'.COMMENT
HIGHtests/test_identify.py1065 # TC260 AIGC label) -- a genuine camera capture is not AI-generated, soCOMMENT
HIGHdata/samples/openai-images-2/README.md3Reference image generated by OpenAI's ChatGPT Images 2.0 (`gpt-image-2`, launched 2026-04-21). Kept in the repo so the CCODE
HIGHsrc/remove_ai_watermarks/metadata.py526# without proving the whole image is AI-generated. Scoped to the Samsung editorCOMMENT
HIGHsrc/remove_ai_watermarks/noai/c2pa.py388 # vendor (Google/OpenAI) on AI-generated content implies an invisibleCOMMENT
HIGHsrc/remove_ai_watermarks/noai/constants.py16# AI-generated image metadata keys (Stable Diffusion, ComfyUI, Midjourney, etc.)COMMENT
HIGHsrc/remove_ai_watermarks/noai/constants.py177 # Canva Magic Media signs AI-generated images as "Canva" with a genericCOMMENT
Excessive Try-Catch Wrapping60 hits · 69 pts
SeverityFileLineSnippetContext
LOWtests/test_pill_engine.py20 except Exception:CODE
MEDIUMtests/test_pill_engine.py16def _font_ok() -> bool:CODE
LOWtests/test_image_io.py120 except Exception:CODE
LOWtests/test_image_io.py167 except Exception:CODE
LOWscripts/synthid_corpus.py97 except Exception: # sips missing/odd output; dims stay unknownCODE
LOWscripts/synthid_corpus.py109 except Exception as exc: # unknown/user formats can raise non-OSError; see CLAUDE.mdCODE
LOWscripts/visible_removal_audit.py103 except Exception as exc:CODE
LOWscripts/metadata_removal_audit.py72 except Exception:CODE
LOWscripts/metadata_removal_audit.py100 except Exception as exc:CODE
LOWscripts/metadata_removal_audit.py110 except Exception as exc:CODE
LOWscripts/metadata_removal_audit.py118 except Exception as exc:CODE
LOWscripts/metadata_removal_audit.py140 except Exception: # noqa: S112 -- skip an unreadable identify JSON, not security-relevantCODE
LOWscripts/corpus_gap_scan.py157 except Exception as exc:CODE
LOWscripts/controlnet_sweep.py279 except Exception as exc:CODE
LOWsrc/remove_ai_watermarks/metadata.py325 except Exception as exc:CODE
LOWsrc/remove_ai_watermarks/metadata.py404 except Exception as exc:CODE
LOWsrc/remove_ai_watermarks/metadata.py508 except Exception as exc:CODE
LOWsrc/remove_ai_watermarks/metadata.py682 except Exception as exc: # unopenable format / malformed EXIFCODE
LOWsrc/remove_ai_watermarks/metadata.py690 except Exception as exc:CODE
LOWsrc/remove_ai_watermarks/metadata.py738 except Exception as exc: # unopenable format / malformed EXIFCODE
LOWsrc/remove_ai_watermarks/metadata.py861 except Exception as exc:CODE
LOWsrc/remove_ai_watermarks/metadata.py1052 except Exception:CODE
LOWsrc/remove_ai_watermarks/metadata.py1170 except Exception:CODE
LOWsrc/remove_ai_watermarks/image_io.py76 except Exception:CODE
LOWsrc/remove_ai_watermarks/image_io.py88 except Exception:CODE
LOWsrc/remove_ai_watermarks/image_io.py171 except Exception:CODE
LOWsrc/remove_ai_watermarks/invisible_watermark.py98 except Exception as exc: # decode can fail on tiny imagesCODE
LOWsrc/remove_ai_watermarks/invisible_watermark.py106 except Exception as exc:CODE
LOWsrc/remove_ai_watermarks/invisible_engine.py155 except Exception as e: # never let an optional upscaler break removalCODE
LOWsrc/remove_ai_watermarks/trustmark_detector.py99 except Exception as exc: # model download / decode failure / unreadable imageCODE
MEDIUMsrc/remove_ai_watermarks/cli.py132 console.print(f"Error: File not found: {path}")CODE
MEDIUMsrc/remove_ai_watermarks/cli.py618 console.print(f"Error: Failed to read image: {source}")CODE
LOWsrc/remove_ai_watermarks/cli.py652 except Exception as e:CODE
MEDIUMsrc/remove_ai_watermarks/cli.py719 console.print(f"Error: Failed to read image: {source}")CODE
LOWsrc/remove_ai_watermarks/cli.py742 except Exception as e:CODE
MEDIUMsrc/remove_ai_watermarks/cli.py1123 console.print(f"Error: Failed to read image: {source}")CODE
LOWsrc/remove_ai_watermarks/cli.py1212 except Exception as e:CODE
MEDIUMsrc/remove_ai_watermarks/cli.py1222 console.print(f"Error: Failed to read intermediate file: {tmp_path}")CODE
LOWsrc/remove_ai_watermarks/cli.py1538 except Exception as e:CODE
LOWsrc/remove_ai_watermarks/upscaler.py122 except Exception as e: # GPU OOM / unsupported op: fall back to CPUCODE
LOWsrc/remove_ai_watermarks/identify.py436 except Exception as exc: # cv2/engine assets missingCODE
LOWsrc/remove_ai_watermarks/identify.py467 except Exception as exc: # cv2/engine assets missingCODE
LOWsrc/remove_ai_watermarks/identify.py478 except Exception as exc: # one engine failing must not break identifyCODE
LOWsrc/remove_ai_watermarks/identify.py769 except Exception as exc: # cv2 missing - detectors fall back / no-opCODE
LOWsrc/remove_ai_watermarks/identify.py848 except Exception: # unreadable / detector error -> do not skip the removalCODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py168 except Exception: # noqa: S110CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py223 except Exception:CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py523 except Exception as exc:CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py776 except Exception:CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py960 except Exception as e:CODE
LOWsrc/remove_ai_watermarks/noai/watermark_profiles.py154 except Exception: # metadata unreadable -> treat as unknown vendorCODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py98 except Exception as exc: # malformed manifest, unsupported container, etc.CODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py106 except Exception as exc: # pragma: no cover - reader opened but json() failedCODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py161 except Exception:CODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py281 except Exception:CODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py483 except Exception:CODE
LOWsrc/remove_ai_watermarks/noai/extractor.py39 except Exception:CODE
LOWsrc/remove_ai_watermarks/noai/isobmff.py275 except Exception:CODE
LOWsrc/remove_ai_watermarks/noai/progress.py104 except Exception as error: # pragma: no cover - passthroughCODE
MEDIUMsrc/remove_ai_watermarks/noai/progress.py101def worker() -> None:CODE
Unused Imports72 hits · 67 pts
SeverityFileLineSnippetContext
LOWtests/test_gemini_engine.py3CODE
LOWtests/test_pill_engine.py4CODE
LOWtests/conftest.py3CODE
LOWtests/test_synthid_pixel_probe.py9CODE
LOWtests/test_img2img_runner.py10CODE
LOWtests/test_jimeng_engine.py8CODE
LOWtests/test_security_clamp.py17CODE
LOWtests/test_trustmark_detector.py9CODE
LOWtests/test_synthid_corpus.py3CODE
LOWtests/test_tiling.py9CODE
LOWtests/test_noai.py4CODE
LOWtests/test_fidelity_matching.py12CODE
LOWtests/test_watermark_registry.py3CODE
LOWtests/test_invisible_watermark.py8CODE
LOWtests/test_region_eraser.py3CODE
LOWtests/test_metadata.py3CODE
LOWtests/test_image_io.py3CODE
LOWtests/test_invisible_engine.py3CODE
LOWtests/test_doubao_engine.py3CODE
LOWtests/test_identify.py7CODE
LOWtests/test_optional_deps.py3CODE
LOWtests/test_platform.py7CODE
LOWtests/test_samsung_engine.py9CODE
LOWtests/test_api.py4CODE
LOWtests/test_text_mark_memory.py9CODE
LOWtests/test_cli.py3CODE
LOWtests/test_inpaint_fallback.py9CODE
LOWtests/test_upscaler.py8CODE
LOWscripts/_plain_console.py10CODE
LOWscripts/invisible_quality_audit.py20CODE
LOWscripts/synthid_pixel_probe.py26CODE
LOWscripts/synthid_corpus.py16CODE
LOWscripts/visible_removal_audit.py25CODE
LOWscripts/render_pill_silhouette.py19CODE
LOWscripts/visible_alpha_solve.py37CODE
LOWscripts/metadata_removal_audit.py21CODE
LOWscripts/fidelity_metrics.py54CODE
LOWscripts/corpus_gap_scan.py25CODE
LOWscripts/controlnet_sweep.py32CODE
LOWscripts/qwen_scrub_prototype.py38CODE
LOWsrc/remove_ai_watermarks/jimeng_engine.py22CODE
LOWsrc/remove_ai_watermarks/samsung_engine.py26CODE
LOWsrc/remove_ai_watermarks/metadata.py9CODE
LOWsrc/remove_ai_watermarks/gemini_engine.py21CODE
LOWsrc/remove_ai_watermarks/image_io.py22CODE
LOWsrc/remove_ai_watermarks/invisible_watermark.py26CODE
LOWsrc/remove_ai_watermarks/pill_engine.py21CODE
LOWsrc/remove_ai_watermarks/invisible_engine.py14CODE
LOWsrc/remove_ai_watermarks/region_eraser.py30CODE
LOWsrc/remove_ai_watermarks/__init__.py33CODE
LOWsrc/remove_ai_watermarks/__init__.py33CODE
LOWsrc/remove_ai_watermarks/watermark_registry.py27CODE
LOWsrc/remove_ai_watermarks/api.py17CODE
LOWsrc/remove_ai_watermarks/trustmark_detector.py22CODE
LOWsrc/remove_ai_watermarks/cli.py9CODE
LOWsrc/remove_ai_watermarks/upscaler.py22CODE
LOWsrc/remove_ai_watermarks/doubao_engine.py21CODE
LOWsrc/remove_ai_watermarks/identify.py20CODE
LOWsrc/remove_ai_watermarks/_text_mark_engine.py25CODE
LOWsrc/remove_ai_watermarks/optional_deps.py12CODE
12 more matches not shown…
Cross-File Repetition9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHtests/test_jimeng_engine.py0a bright blob is not the glyph shape -> low correlation, not detected.STRING
HIGHtests/test_doubao_engine.py0a bright blob is not the glyph shape -> low correlation, not detected.STRING
HIGHtests/test_samsung_engine.py0a bright blob is not the glyph shape -> low correlation, not detected.STRING
HIGHtests/test_jimeng_engine.py0the glyph silhouette correlates with itself, not with a filled block.STRING
HIGHtests/test_doubao_engine.py0the glyph silhouette correlates with itself, not with a filled block.STRING
HIGHtests/test_samsung_engine.py0the glyph silhouette correlates with itself, not with a filled block.STRING
HIGHtests/test_jimeng_engine.py0footprint_mask must not crash on degenerate sizes or non-3-channel inputs.STRING
HIGHtests/test_doubao_engine.py0footprint_mask must not crash on degenerate sizes or non-3-channel inputs.STRING
HIGHtests/test_samsung_engine.py0footprint_mask must not crash on degenerate sizes or non-3-channel inputs.STRING
Over-Commented Block38 hits · 38 pts
SeverityFileLineSnippetContext
LOWpyproject.toml61 # primary, spec-tracking manifest parser for the identify/metadata path; theCOMMENT
LOWpyproject.toml81 "diffusers>=0.38.0",COMMENT
LOWpyproject.toml121# Lightweight inpaint backend -- MI-GAN via onnxruntime (andraniksargsyan/migan,COMMENT
LOWREADME.md321COMMENT
LOWREADME.md341# If no known visible mark is found, it writes no output and exits 2 (not 0),COMMENT
LOWREADME.md361# to regenerate in overlapping feather-blended tiles at native resolution (lossless).COMMENT
LOWmaintain.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/fidelity_metrics.py1# /// scriptCOMMENT
LOWscripts/qwen_scrub_prototype.py1# /// scriptCOMMENT
LOWsrc/remove_ai_watermarks/metadata.py101# (Meta / Instagram / MidJourney) use ``trainedAlgorithmicMedia``. Including the bareCOMMENT
LOWsrc/remove_ai_watermarks/metadata.py421 return _parse(html.unescape(body.decode("utf-8", "replace")), require_tc260_field=False)COMMENT
LOWsrc/remove_ai_watermarks/metadata.py1141 # box walker can't reach these, so strip container metadata losslessly viaCOMMENT
LOWsrc/remove_ai_watermarks/gemini_engine.py141 """COMMENT
LOWsrc/remove_ai_watermarks/gemini_engine.py161 # Bright-background content false positives (2026-06-26 landing-page FPs: a snow+skyCOMMENT
LOWsrc/remove_ai_watermarks/gemini_engine.py181 # grad gate discards is the CORE COLOR: a real Gemini sparkle core is near-WHITECOMMENT
LOWsrc/remove_ai_watermarks/gemini_engine.py201 # real-photo corner match (~0.78 across native + downscaled real photos) and aCOMMENT
LOWsrc/remove_ai_watermarks/pill_engine.py41# Geometry (fractions of image WIDTH unless noted); top-left corner.COMMENT
LOWsrc/remove_ai_watermarks/watermark_registry.py41COMMENT
LOWsrc/remove_ai_watermarks/watermark_registry.py221# bottom-right text -- a real Doubao mark scores ~0.40-0.42 as a gemini match,COMMENT
LOWsrc/remove_ai_watermarks/cli.py1361 # visible-processed `out_path` whose C2PA is already gone.COMMENT
LOWsrc/remove_ai_watermarks/identify.py61COMMENT
LOWsrc/remove_ai_watermarks/identify.py141 is_ai_generated: bool | None # True / False is never asserted; None = unknownCOMMENT
LOWsrc/remove_ai_watermarks/identify.py181 """COMMENT
LOWsrc/remove_ai_watermarks/identify.py221 return platformCOMMENT
LOWsrc/remove_ai_watermarks/identify.py321 return NoneCOMMENT
LOWsrc/remove_ai_watermarks/identify.py561 # trainedAlgorithmicMedia, so the registered generator name is the only signal.COMMENT
LOWsrc/remove_ai_watermarks/_text_mark_engine.py41COMMENT
LOWsrc/remove_ai_watermarks/noai/watermark_profiles.py41COMMENT
LOWsrc/remove_ai_watermarks/noai/watermark_profiles.py61# guess, which was speculative and never oracle-checked at that resolution.COMMENT
LOWsrc/remove_ai_watermarks/noai/watermark_profiles.py81# this is a MARGIN argument for `sdxl`, not a fresh certification -- there is no localCOMMENT
LOWsrc/remove_ai_watermarks/noai/c2pa.py361 c2pa_info["actions"] = ", ".join(actions)COMMENT
LOWsrc/remove_ai_watermarks/noai/constants.py101 needle: str | NoneCOMMENT
LOWsrc/remove_ai_watermarks/noai/constants.py121 C2paAiVendor(b"OpenAI", "OpenAI", "OpenAI (ChatGPT / gpt-image / DALL-E / Sora)", "OpenAI", synthid=True),COMMENT
LOWsrc/remove_ai_watermarks/noai/constants.py141 # JSON and the raw caBX bytes alike); it normalizes to the same "ByteDance"COMMENT
LOWsrc/remove_ai_watermarks/noai/constants.py161 # Engine output, NO digitalSourceType assertion -- so the generator name is theCOMMENT
LOWsrc/remove_ai_watermarks/noai/constants.py181 C2paAiVendor(b"Canva", "Canva", "Canva (Magic Media)", "Canva"),COMMENT
LOWsrc/remove_ai_watermarks/noai/constants.py201# Both are excluded to avoid false-positive AI attribution; re-evaluate onlyCOMMENT
LOWsrc/remove_ai_watermarks/noai/constants.py221# our API include both C2PA metadata and SynthID watermarks." OpenAI alsoCOMMENT
AI Slop Vocabulary9 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_noai.py299 assert "OpenAI" in info["issuer"] # issuer byte-search still robustCODE
MEDIUMtests/test_platform.py320 # more-robust watermark, so it is higher.COMMENT
MEDIUMtests/test_platform.py369 # The more-robust watermark wins -> safer (higher) strength.COMMENT
MEDIUMsrc/remove_ai_watermarks/identify.py190# on real samples), and more robust than parsing the claim generator (whichCOMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_remover.py771 # The single, robust stripper (byte-level: lossless for JPEG, handlesCOMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_profiles.py18# oracle floors (2026-06-20): OpenAI **0.10** (seed-robust -- clean on seeds 0-4) andCOMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_profiles.py65# tracks the Google (more robust watermark) value -> 0.15, still safe-by-default and theCOMMENT
MEDIUMsrc/remove_ai_watermarks/noai/watermark_profiles.py95# SDXL ladder above: OpenAI 0.10 (seed-robust), Gemini 0.25 (HIGHER than controlnet'sCOMMENT
MEDIUMsrc/remove_ai_watermarks/noai/__init__.py29 # Re-export the single, robust stripper (byte-level, lossless-for-JPEG, allCOMMENT
Deep Nesting23 hits · 21 pts
SeverityFileLineSnippetContext
LOWscripts/synthid_corpus.py77CODE
LOWscripts/visible_removal_audit.py69CODE
LOWscripts/metadata_removal_audit.py174CODE
LOWscripts/fidelity_metrics.py134CODE
LOWscripts/fidelity_metrics.py322CODE
LOWscripts/controlnet_sweep.py225CODE
LOWsrc/remove_ai_watermarks/metadata.py212CODE
LOWsrc/remove_ai_watermarks/metadata.py306CODE
LOWsrc/remove_ai_watermarks/metadata.py635CODE
LOWsrc/remove_ai_watermarks/metadata.py833CODE
LOWsrc/remove_ai_watermarks/metadata.py1079CODE
LOWsrc/remove_ai_watermarks/invisible_engine.py159CODE
LOWsrc/remove_ai_watermarks/watermark_registry.py248CODE
LOWsrc/remove_ai_watermarks/cli.py1264CODE
LOWsrc/remove_ai_watermarks/cli.py1441CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py173CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py186CODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py111CODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py242CODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py433CODE
LOWsrc/remove_ai_watermarks/noai/extractor.py122CODE
LOWsrc/remove_ai_watermarks/noai/isobmff.py92CODE
LOWsrc/remove_ai_watermarks/noai/isobmff.py238CODE
Modern Structural Boilerplate19 hits · 19 pts
SeverityFileLineSnippetContext
LOWsrc/remove_ai_watermarks/metadata.py21logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/gemini_engine.py40logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/invisible_watermark.py34logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/invisible_engine.py37logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/region_eraser.py41logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/__init__.py30__all__ = ["__version__", "remove_visible", "visible_provenance"]CODE
LOWsrc/remove_ai_watermarks/watermark_registry.py38logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/trustmark_detector.py31logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/cli.py111def _setup_logging(verbose: bool) -> None:CODE
LOWsrc/remove_ai_watermarks/upscaler.py32logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/identify.py60logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/_text_mark_engine.py40logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py54logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py417 def _set_progress(self, message: str) -> None:CODE
LOWsrc/remove_ai_watermarks/noai/c2pa.py44logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/noai/__init__.py23__all__ = ["WatermarkRemover", "remove_ai_metadata", "remove_watermark"]CODE
LOWsrc/remove_ai_watermarks/noai/isobmff.py36logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/noai/tiling.py27logger = logging.getLogger(__name__)CODE
LOWsrc/remove_ai_watermarks/noai/img2img_runner.py20logger = logging.getLogger(__name__)CODE
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHsrc/remove_ai_watermarks/noai/watermark_remover.py630Remove watermark from an image using regeneration attack. Args: image_path: Path to the watermarkedSTRING
HIGHsrc/remove_ai_watermarks/noai/progress.py77Execute *task* in a background thread while showing a progress animation. The animation renders two lines to ``sys.STRING
AI Structural Patterns3 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/remove_ai_watermarks/invisible_engine.py159CODE
LOWsrc/remove_ai_watermarks/cli.py1264CODE
LOWsrc/remove_ai_watermarks/noai/watermark_remover.py615CODE
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_metadata.py843 assert xai_signature(_grok_jpeg(tmp_path, artist="John Doe")) is FalseCODE