Saccade

io.github.Tavrinv0.2.1更新於 Oct 6, 2026

Perceptual visual regression, image evidence inspection and bounded decision proposals.

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理檢視感知影像差異報告與有界的視覺回歸證據。

功能
Saccade 量測影像擷取畫面之間的感知差異,在量測區域中定位差異,並依你宣告的門檻與政策進行檢查。它會寫出離線 HTML 報告與帶版本的 JSON;本機 MCP 伺服器讀取已註冊的擷取根目錄,並把報告寫到另一個輸出根目錄。它的工具無法核准基準,助理只能檢視有界結果並依循記錄下來的後續動作。相關命令列流程還涵蓋比較、OCR 文字差異、影像檢查、媒體分析與效能證據。
適用情境
當編碼助理需要對照基準驗證視覺變更、檢視 CI 視覺回歸輸出,或在不使用基準的情況下檢查影像證據時,值得加入。它適合已經能產生成對擷取畫面,並希望由助理讀取報告而非自行執行比較的團隊。
執行需求
以本機程序透過 stdio 執行,使用 Cargo 安裝,需要 Rust 1.89 或更新版本。需要已註冊的擷取根目錄與另一個輸出根目錄。預設比較不需要供應商帳號或 GPU;選用功能會帶入固定版本的模型產物、ONNX Runtime、系統函式庫,或外部 ffmpeg 與 ffprobe。未宣告任何驗證、環境變數或標頭。
安裝前請注意
此伺服器會讀取擷取根目錄並把報告寫入輸出根目錄,因此請只指向你願意曝露的目錄。它的工具無法核准基準,只有人工可以。選用的 AI 供應商功能需主動開啟,並要求明確授權、專用憑證檔案以及呼叫或花費上限;部分輔助與路由功能仍屬實驗性且未經驗證。感知層面的通過並不能證明正確性,也不能證明差異不可見。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Saccade,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[CI] [crates.io] [docs.rs] [License] [MSRV] MCP Registry: io.github.Tavrin/saccade

saccade

saccade is a visual and performance evidence tool for humans, CI and AI agents. It measures perceptual differences, locates them in measured regions (with optional advisory observations), and checks them against the thresholds and policies you declare. It writes offline HTML reports and versioned JSON. Performance conclusions require comparable captures, timing provenance and repeat evidence. Only a human can approve a baseline.

[Report with image differences and numbered hotspots]

Quickstart

sh
saccade demo --out saccade-demosaccade view saccade-demo

The demo exits 1 on purpose: it contains changed and missing captures. Open saccade-demo/report/index.html to see the result. The quickstart walkthrough has copyable examples for comparison, exact identity, configuration, evidence export and local review.

Use cases

Visual verification for coding agents

The local MCP server reads registered capture roots and writes reports under a separate output root. Its tools cannot approve baselines. Agents can inspect bounded results and follow recorded next actions.

sh
saccade mcp --root captures --out-root agent-reportssaccade compare captures/before captures/after --out agent-reports/change --json

See the agent guide and MCP and plugin setup.

CI visual regression

The local Playwright package provides toMatchSaccade and capture stabilization. A sweep groups page pairs and records capture failures as failures.

sh
node integrations/playwright/sweep.cjs sweep.json captures capture-options.jsonsaccade sweep compare sweep.json --captures captures/captures.json --out sweep-report --json

See the Playwright matcher, sweep and CI integration. Sweep needs the optional products feature.

Render and engine evidence

Declared spatial policies distinguish texture_noise_only from systematic_shift. Required-effect checks can fail on an empty footprint; capture layers restrict measurement scope and fixed-camera sequences measure temporal stability. Supply the policies and capture provenance with your inputs.

sh
saccade compare before after --config render-evidence.toml --out render-report --jsonsaccade experiment sequence before-frames after-frames --fixed-camera --out temporal-report --json

See rendering evidence and engine capture ingestion.

Image delivery tuning

Audit served formats and search declared encodings for a perceptual target. Local and URL-template adapters record bytes and content types and do not modify originals.

sh
saccade imgtune audit --urls images.txt --accept 'image/avif,image/webp,image/*' --out audit.json --jsonsaccade imgtune search tuning.json --out tuning-report.json --json

See image tuning. Enable products, plus imgtune-avif for AVIF.

Media analysis records

A media record keeps status and provenance for metadata, quality, fingerprints and optional model sections. Disabled or failed sections are recorded as such. The Python package and local HTTP API use the same analysis path.

sh
saccade analyze-media image.jpg --profile cpu-lite --output-size 1200x800 --jsonsaccade keyframes video.mp4 --out frames --json

See media analysis, Python and HTTP API. Python wheels are built in CI and are not on PyPI yet.

Single-image provenance and integrity

Inspect C2PA credentials, metadata and compression-history indicators without a baseline. Heuristics have stated limits and do not establish a real/fake verdict. GPS disclosure is opt-in; C2PA validation needs credentials.

sh
saccade inspect-image received.jpg --output-size 1600x900 --out inspection --jsonsaccade inspect-image received.png --hash-index hashes/saccade-hash.v1.json --out indexed-inspection --json

See single-image inspection.

General comparison

Pick registration, hashes, embedding similarity/search, OCR text differences, no-reference quality or document rasterization to fit the question. Model workflows require supplied pinned artifacts and the relevant features.

sh
saccade compare before.png after.png --align similarity --out aligned-report --jsonsaccade text before.png after.png --out text-report --jsonsaccade assess image.jpg --out quality-report --json

See choosing a comparison, registration, hashing, embeddings and search, OCR, quality and documents.

Performance evidence

Compare supplied timing sidecars using paired statistics and uncertainty intervals, or locate changes in a sequence. Saccade does not run the benchmark; missing or rejected provenance cannot qualify a speedup.

sh
saccade compare before after --out perf-report --jsonsaccade history onset --store history --json

See paired statistics, change points and identity/performance.

Install

Install with Rust 1.89 or newer:

sh
cargo install saccade --version 0.2.1 --lockedsaccade doctor --json

To build this checkout, use cargo install --locked --path crates/saccade. Release archives include checksums, licences and third-party notices. See release instructions.

Cargo featuresDefault?Purpose and requirements
compression, parallel, graphicsYesFLIP, compression scores, graphics and temporal measurements; CPU processing.
ai, evaluationYesProvider review adapters and evaluation; calls require explicit authorization and budgets.
workbench, mcpYesLocal report browsing and bounded agent tools.
assistNoExperimental explain, mask audit, visible-condition checks and batch advice.
productsNoSweep, image tuning, design-source and notifier adapters. Browser captures separately need Node.js and Playwright.
imgtune-avifNoAVIF encoding/decoding; system dav1d >=1.3.0 development library and pkg-config.
semantic-regions, embeddings, local-modelsNoPinned CPU model artifacts and dynamically loaded ONNX Runtime 1.22 (API 22). Runtime/model pulls are explicit provisioning operations; analysis never downloads them.
ocr, ocr-providerNoLocal PP-OCRv5 Latin with pinned models/runtime; separately opt-in hosted document OCR with spend/egress controls.
documents, credentialsNoSVG/PDF rasterization and offline C2PA validation.
media-httpNoBounded URL inputs for media analysis; network fetches require an explicit URL input.
local-vlm, vision-providersNoConfigured local/hosted vision adapters; observations remain advice.
geometry, dense-motion, prechecks, schemaNoMesh measurements, dense motion, experimental safety/accessibility checks and schema generation.

Video extraction invokes external ffmpeg and ffprobe; neither is bundled. See model/runtime provisioning and AVIF prerequisites. Default comparisons need no provider account or GPU. Add optional features with cargo install ... --features products,ocr, for example.

Metrics and algorithms

Each qualification covers only the recorded contract and evidence. A passing score does not prove correctness or that a difference is invisible.

Metric or algorithmQualification status and scope
Native decoded-sample identityExact equality contract; covers only supplied, complete pairs.
NVIDIA FLIP / HDR-FLIPReference-backed implementation; viewing conditions and HDR mapping must be declared.
SSIMULACRA2 / Butteraugli 0.9.3Reference checks recorded; perceptual targets are user policy. See implementation evidence.
ColorVideoVDP, numerical buffers, motion and mesh distancesDeclared display/unit/frame/camera contracts; fixture checks do not qualify a consumer renderer.
Registration; aHash/dHash/pHash; FAST/oriented-BRIEF matchingGenerated-fixture validation; match confidence is uncalibrated.
Embedding similarity and image/text retrievalPinned model/export provenance; retrieval calibration remains unqualified.
PP-OCRv5 Latin and positional text diffGenerated strict and typographic contracts reviewed; font-specific failures remain.
Blur, noise, blockiness, banding, clipping and forensic indicatorsDescriptive, content-dependent heuristics; no authenticity qualification.
Spatial classes, effect occupancy, layers and temporal tilesConstructed/fixture contracts; no general renderer or physical-effect qualification.
Paired Hodges–Lehmann estimates, bootstrap and change pointsConstructed statistical checks; actual timing requires independent qualified runs.
Safety/accessibility prechecksExperimental checks; no certification or formal compliance.
AI assist, Jev support and routing (Jev is a decision model from TypeSafe), blind-order handlingUnqualified in this release; experimental.
LPIPS, DISTS, MUSIQ; TrustMark payload decodingDeferred / unavailable; neural-only TrustMark inference does not decode payloads.

AI layer

AI observations are advisory. They cannot approve baselines, create exclusions, override deterministic failures, establish equality or qualify timing. Providers are opt-in, with source-root egress authorization, dedicated credential files and call/spend caps; image text and provider output are data, never instructions.

The release qualification attempt with a $15 cap stopped at the prerequisite check, before any provider request or spend. No frozen corpus with an observed immutable Gemini revision or exact-source heavy receipt was supplied. Explain, mask audit, visible-condition checks, blind orders, Jev support, deterministic cascade routing and optional Jev evidence routing all remain unqualified. Assist commands still require --experimental; Jev routing stays off by default. See assist workflows, qualification policy and the release guide.

Known limitations

  • OCR can misread œ in large serif text and omit dashes with some sans fonts; omitted characters and missing spaces before € remain errors.
  • Retrieval scores lack qualified calibration. Model/runtime smokes establish execution, not production accuracy or export parity.
  • GI occupancy uses supplied masks/layers as a proxy; it does not prove physical illumination, causality or correct rendering.
  • LPIPS, DISTS and MUSIQ remain deferred; TrustMark payload decoding is unavailable.
  • Captures define the evidence scope. Equal images do not establish application correctness, and perceptual passes do not establish native sample identity.
  • Performance conclusions need matched workload, clocks, warmup and repeat noise. Missing checks remain unknown; human approval records do not authenticate an operator.

Documentation and integrations

9 reproducible cases with commands, expected exits and measured output. Pages gallery.

License

MIT OR Apache-2.0, at your option. FLIP uses the BSD-3-Clause flip-rs port. See third-party notices; release archives also include generated dependency notices.

MCP Registry ownership: mcp-name: io.github.Tavrin/saccade

來源:README.md,提交 54ee1c3

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.2.1最新Oct 6, 2026