MCPcopy Create free account

hub / github.com/aloshdenny/reverse-SynthID / functions

Functions257 in github.com/aloshdenny/reverse-SynthID

↓ 61 callersMethodlog
Print message if verbose.
src/extraction/benchmark_extraction.py:79
↓ 20 callersFunction_psnr
(a: np.ndarray, b: np.ndarray)
src/extraction/synthid_bypass_v4.py:2238
↓ 14 callersMethoddetect_array
Detect SynthID watermark in a numpy array image. Uses empirically-verified carrier frequencies with per-set reference phases. The wa
src/extraction/robust_extractor.py:654
↓ 11 callersMethodsave
Save in compact format (~20 MB for typical dual-resolution codebook).
src/extraction/synthid_bypass.py:2027
↓ 9 callersMethod_rfft_to_full_sym
(H, W//2+1, C) → (H, W, C) via conjugate symmetry.
src/extraction/synthid_bypass.py:1990
↓ 7 callersMethodload
Load codebook (auto-detects format version).
src/extraction/synthid_bypass.py:2082
↓ 6 callersMethodget_profile
Best-matching profile for ``(H, W)`` and optional ``model``. Returns ``(profile, (model, H, W), exact_match)``. Prefers an exact ``(m
src/extraction/synthid_bypass_v4.py:245
↓ 6 callersMethodload_codebook
Load pre-extracted codebook. Supports .pkl files and auto-discovers .pkl when given a .npz path (common user mistake).
src/extraction/robust_extractor.py:104
↓ 5 callersFunction_try
(candidate: np.ndarray, name: str)
src/extraction/synthid_bypass_v4.py:2150
↓ 5 callersMethodextract_noise_fused
Extract noise using multiple methods and fuse results. Uses weighted median fusion for robustness against outliers.
src/extraction/robust_extractor.py:262
↓ 5 callersMethodkeys
(self)
src/extraction/synthid_bypass_v4.py:231
↓ 4 callersMethod_accumulate_fft
Return (magnitude[3], phase_unit[3]) stacks for one image.
src/extraction/synthid_bypass.py:1665
↓ 4 callersFunction_apply_post_processing
Orthogonal pixel-domain stages applied after the FFT subtraction. Each stage is independently gated: if a stage drops PSNR below ``cfg['psnr_
src/extraction/synthid_bypass_v4.py:2134
↓ 4 callersMethod_list_reference_images
Collect image files, excluding unwatermarked baselines.
src/extraction/synthid_bypass.py:1620
↓ 4 callersMethod_load_image
Load image, optionally resizing to target_shape=(H, W).
src/extraction/synthid_bypass.py:1645
↓ 4 callersFunction_ssim
Lightweight block-SSIM on luminance (mirrors v3).
src/extraction/synthid_bypass_v4.py:2247
↓ 4 callersFunction_to_uint8
(image: np.ndarray)
src/extraction/synthid_bypass_v4.py:2229
↓ 4 callersMethodextract_noise_single
Extract noise using a single denoising method.
src/extraction/robust_extractor.py:223
↓ 4 callersFunctionwavelet_denoise
Wavelet-based denoising.
src/extraction/synthid_codebook_extractor.py:28
↓ 3 callersMethod_jpeg_compress
Apply JPEG compression/decompression.
src/extraction/watermark_remover.py:193
↓ 3 callersFunction_merge_bin_lists
Union a sequence of signed-offset lists; deduplicate at native res.
src/extraction/synthid_bypass_v4.py:1961
↓ 3 callersFunction_print_bypass_result
(result, mode_str)
src/extraction/synthid_bypass.py:2188
↓ 3 callersFunction_project_bins
Proportionally project centred signed bin offsets between shapes. Filters out bins that fall outside the destination Nyquist envelope.
src/extraction/synthid_bypass_v4.py:1937
↓ 3 callersMethod_subtract_native_bins_residual
Residual-phase bin subtraction — the blog's published recipe. The correct phase of the watermark at bin ``k`` on *this* image is not
src/extraction/synthid_bypass_v4.py:1752
↓ 3 callersMethodget_profile
Best-matching profile for target (H, W). Returns (profile_dict, (prof_H, prof_W), exact_match: bool). Prefers exact resolution match,
src/extraction/synthid_bypass.py:1595
↓ 3 callersFunctionharvest_codebook_carriers
Extract the top-K consensus bins from ``profile`` as signed offsets. Returns offsets in ``(-H/2, H/2)`` × ``(-W/2, W/2)`` centred coordinates,
src/extraction/synthid_bypass_v4.py:128
↓ 3 callersFunctionscale_bins_to_shape
Project reference-shape bin offsets onto an arbitrary ``(H, W)`` shape. Returns only bins that stay within the image's Nyquist envelope and are
src/extraction/synthid_bypass_v4.py:97
↓ 3 callersFunctionvae_roundtrip
Encode-decode ``image_uint8`` through the SD-VAE; return a uint8 image. Args: image_uint8: HxWx3 RGB uint8. strength: Scales the
src/extraction/vae_regen.py:127
↓ 2 callersMethod_accumulate_color
Per-colour FFT accumulation at a fixed resolution. Returns ``(avg_magnitude, mean_phase_angle, phase_consistency, n)``.
src/extraction/synthid_bypass_v4.py:523
↓ 2 callersFunction_apply_geo_combo
CombinationWorst-style geometric attack in a single resample. Applies rotation (``deg``), centre zoom-in (fraction of linear dimension croppe
src/extraction/synthid_bypass_v4.py:1983
↓ 2 callersFunction_enforce_conjugate_symmetry
Average ``F(k)`` with ``conj(F(-k))`` so ``ifft2(F).imag ≈ 0``. Needed after modifying a handful of bins by hand — the ifft of an asymmetric
src/extraction/synthid_bypass_v4.py:2120
↓ 2 callersFunction_estimate_watermark_fft_v4
Compute the complex watermark FFT to subtract from ``image_fft``. Same shape as ``image_fft``. Zero where ``consensus_coherence < tau``.
src/extraction/synthid_bypass_v4.py:1888
↓ 2 callersFunction_gaussian_blur_multichannel
Per-channel Gaussian blur at the given ``sigma`` using cv2.
src/extraction/vae_regen.py:183
↓ 2 callersMethod_image_shape
Read image dimensions without loading full array.
src/extraction/synthid_bypass.py:1657
↓ 2 callersMethod_inject_bandpass_channel
Inject bandpass noise in a single channel.
src/extraction/synthid_bypass.py:309
↓ 2 callersMethod_print_top_carriers
(profile, ref_shape)
src/extraction/synthid_bypass.py:1857
↓ 2 callersFunction_read_csv_dicts
(path: str)
scripts/calibrate_from_feedback.py:58
↓ 2 callersMethod_rfft_to_full_anti
Anti-symmetric variant (for phase).
src/extraction/synthid_bypass.py:2002
↓ 2 callersMethod_scramble_channel
Scramble phases in a single channel.
src/extraction/synthid_bypass.py:237
↓ 2 callersFunctionanalyze_bit_plane_entropy
Analyze entropy of each bit plane - watermarks often reduce entropy in certain planes.
watermark_investigation/watermark_deep_analysis.py:26
↓ 2 callersFunctionanalyze_dct_coefficients
Analyze DCT coefficients - JPEG-based watermarks often modify DCT.
watermark_investigation/watermark_investigation.py:97
↓ 2 callersFunctionanalyze_lsb
Quick LSB analysis.
watermark_investigation/watermark_full_123k_analysis.py:24
↓ 2 callersFunctionanalyze_lsb
Quick LSB analysis.
watermark_investigation/watermark_full_analysis.py:25
↓ 2 callersFunctionanalyze_lsb_pattern
Analyze Least Significant Bit patterns - common watermark hiding technique.
watermark_investigation/watermark_investigation.py:66
↓ 2 callersFunctionanalyze_pixel_value_distribution
Analyze pixel value distribution for anomalies.
watermark_investigation/watermark_investigation.py:201
↓ 2 callersFunctionavg_hash
(img, hash_size=16)
watermark_investigation/watermark_ai_detection.py:261
↓ 2 callersMethodbypass_v2
V2 Combined Worst-Case Bypass Pipeline. Stacks transforms from 6 DIFFERENT categories to maximize the attack surface
src/extraction/synthid_bypass.py:1203
↓ 2 callersFunctioncheck_metadata_watermarks
Check EXIF and other metadata for watermark signatures.
watermark_investigation/watermark_investigation.py:166
↓ 2 callersFunctionchi_square_lsb
Chi-square test for LSB.
watermark_investigation/watermark_full_analysis.py:93
↓ 2 callersFunctionchi_square_test_lsb
Chi-square test for LSB steganography detection. High chi-square values suggest embedded data.
watermark_investigation/watermark_deep_analysis.py:48
↓ 2 callersMethodcompute_psnr
Compute Peak Signal-to-Noise Ratio.
src/extraction/synthid_bypass.py:604
↓ 2 callersMethodcompute_ssim
Compute SSIM using vectorized block-based approach (no loop).
src/extraction/synthid_bypass.py:611
↓ 2 callersMethoddetect
Detect SynthID watermark in an image file.
src/extraction/robust_extractor.py:645
↓ 2 callersFunctiondetect_synthid
Detect SynthID watermark in an image using the extracted codebook. Returns: dict with detection results
src/extraction/synthid_codebook_extractor.py:232
↓ 2 callersFunctiondhash
(img, hash_size=8)
watermark_investigation/watermark_deep_analysis.py:289
↓ 2 callersMethodestimate_watermark_fft
Estimate watermark FFT for subtraction. If *profile* / *ref_shape* are not supplied, auto-selects the best-matching profile
src/extraction/synthid_bypass.py:1877
↓ 2 callersFunctionextract_and_visualize_lsb
Extract and save LSB plane visualization.
watermark_investigation/watermark_visual_evidence.py:27
↓ 2 callersMethodjpeg_compress
Apply JPEG compression/decompression cycle.
src/extraction/synthid_bypass.py:333
↓ 2 callersMethodload
Load a V4 codebook ``.npz``. Handles both format v1 (float16/uint8, uncompressed) and the current format v2 (quantized int8/uint8, zl
src/extraction/synthid_bypass_v4.py:772
↓ 2 callersFunctionload_image
Load image safely.
watermark_investigation/extract_final_watermark.py:19
↓ 2 callersFunctionload_image
Load image safely.
watermark_investigation/watermark_full_123k_analysis.py:17
↓ 2 callersFunctionload_image
Load image safely.
watermark_investigation/watermark_full_analysis.py:18
↓ 2 callersFunctionphash
(img, size=32)
watermark_investigation/watermark_full_123k_analysis.py:80
↓ 2 callersFunctionphash
(img, size=32)
watermark_investigation/watermark_full_analysis.py:82
↓ 2 callersFunctionphash
(img, hash_size=32)
watermark_investigation/watermark_ai_detection.py:268
↓ 2 callersMethodremove
Remove SynthID watermark from image. Args: image: Input image (RGB, uint8) mode: 'light', 'balanced'
src/extraction/watermark_remover.py:230
↓ 2 callersMethodremove_file
Remove watermark from image file and save result.
src/extraction/watermark_remover.py:403
↓ 2 callersFunctionrs_analysis
RS (Regular-Singular) Analysis for LSB steganography detection. Compares regular and singular groups after flipping operations.
watermark_investigation/watermark_deep_analysis.py:85
↓ 2 callersMethodsave
Save all profiles to a compressed ``.npz``. Format v2 changes vs v1: * ``np.savez_compressed`` (zlib-9) instead of ``np.savez``.
src/extraction/synthid_bypass_v4.py:677
↓ 2 callersMethodwavelet_denoise
Wavelet-based denoising using soft thresholding.
src/extraction/robust_extractor.py:136
↓ 2 callersMethodwiener_filter
Wiener filter for optimal noise estimation.
src/extraction/robust_extractor.py:200
↓ 1 callersMethod_build_profile
( self, model: str, shape: Tuple[int, int], buckets: List[Tuple[str, Tuple[int
src/extraction/synthid_bypass_v4.py:412
↓ 1 callersMethod_collect_buckets
Return list of ``(color, (H, W))`` buckets that meet ``min_refs``.
src/extraction/synthid_bypass_v4.py:388
↓ 1 callersMethod_color_disruption
Color channel manipulation to destroy per-channel watermark coherence. SynthID embeds differently per channel (G most, then
src/extraction/synthid_bypass.py:1099
↓ 1 callersFunction_color_nudge
Small but non-trivial color/contrast nudge in HSV. Gemini's own guidance lists "extreme changes to the color balance / brightness / heavy fil
src/extraction/synthid_bypass_v4.py:2087
↓ 1 callersMethod_compute_inverted_agreement
Mean pairwise ``|cos(phase_a - phase_b)|`` across all colour pairs. If black and white are both present, their pair is weighted double
src/extraction/synthid_bypass_v4.py:585
↓ 1 callersFunction_count_images
(directory: str, cap: Optional[int] = None)
src/extraction/synthid_bypass_v4.py:2296
↓ 1 callersMethod_dir_contains_any_color
(model_root: str, colors: List[str])
src/extraction/synthid_bypass_v4.py:379
↓ 1 callersFunction_elastic_deform
Spatially-varying sub-pixel warp — the "collage fragmentation" attack. The Gemini app itself confirms (in its own user-facing error response)
src/extraction/synthid_bypass_v4.py:2015
↓ 1 callersFunction_find_res_dir
Resolve the disk path for a ``(model, color, shape)`` bucket. ``shape`` is ``(H, W)``; the on-disk folder name is ``WxH`` (Gemini's conventio
src/extraction/synthid_bypass_v4.py:2321
↓ 1 callersMethod_get_mode_params
Get parameters for each mode.
src/extraction/synthid_bypass.py:849
↓ 1 callersMethod_get_mode_params
Get parameters for each removal mode.
src/extraction/watermark_remover.py:367
↓ 1 callersFunction_list_images
(directory: str)
src/extraction/synthid_bypass_v4.py:2306
↓ 1 callersMethod_load_compact
Load format_version >= 2 (rfft + mixed precision + optional sparse).
src/extraction/synthid_bypass.py:2100
↓ 1 callersMethod_load_legacy
Load original single-resolution format.
src/extraction/synthid_bypass.py:2172
↓ 1 callersMethod_load_v1
Load v1 multi-resolution format (full-precision arrays).
src/extraction/synthid_bypass.py:2158
↓ 1 callersMethod_noise_disruption
Noise injection + denoising: replaces watermark noise with random noise. Uses both Gaussian and Poisson noise (different dis
src/extraction/synthid_bypass.py:1057
↓ 1 callersMethod_overlay_disruption
Overlay-type disruptions: artifact injection and dithering. These add structured patterns that interfere with watermark dete
src/extraction/synthid_bypass.py:1138
↓ 1 callersFunction_pad_to_multiple
Reflect-pad an HxWxC image so H, W are multiples of ``mult``. Returns the padded array and the pad amounts ``(top, bottom, left, right)`` so
src/extraction/vae_regen.py:98
↓ 1 callersFunction_parse_profile_key
Parse ``'model_name/HxW'`` → ``(model, H, W)``.
scripts/calibrate_from_feedback.py:112
↓ 1 callersFunction_parse_res_name
Parse ``'1440x720'`` → ``(H=720, W=1440)``. Dataset directory names use Gemini's ``WIDTHxHEIGHT`` convention (e.g. ``1440x720`` for a 1440-wi
src/extraction/synthid_bypass_v4.py:2275
↓ 1 callersFunction_parse_still_watermarked
``y/n`` → ``True/False``; empty/unknown → ``None``.
scripts/calibrate_from_feedback.py:63
↓ 1 callersMethod_print_top_carriers
(profile: ProfileV4, n_top: int = 10)
src/extraction/synthid_bypass_v4.py:655
↓ 1 callersMethod_quality_degradation
Quality transforms: JPEG/WebP cycling + resize cycling. Forces requantization across different codec bases (DCT vs wavelet)
src/extraction/synthid_bypass.py:1010
↓ 1 callersMethod_remove_combined_worst
Combined worst-case removal using bypass_v2 pipeline. This is the v2 approach that stacks transforms from multiple c
src/extraction/watermark_remover.py:333
↓ 1 callersMethod_resize_signature
Resize signature to match target image dimensions.
src/extraction/watermark_remover.py:179
↓ 1 callersFunction_resize_squeeze
Downsample to ``squeeze × squeeze`` area ratio, then upsample back. The Gemini app's own failure-mode list calls out "shrinking to very small
src/extraction/synthid_bypass_v4.py:2067
↓ 1 callersFunction_select_device
Pick MPS → CUDA → CPU, honoring an explicit ``prefer``.
src/extraction/vae_regen.py:37
↓ 1 callersMethod_spatial_disruption
Spatial transforms — SynthID's weakest category (52% TPR worst-case). Applies random affine + crop-resize + perspective warp
src/extraction/synthid_bypass.py:956
↓ 1 callersMethod_subtract_fft_exact
( work: np.ndarray, profile: ProfileV4, cfg: Dict[str, float], avg_luminance:
src/extraction/synthid_bypass_v4.py:1808
next →1–100 of 257, ranked by callers