verisight 2.2.0__tar.gz → 2.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {verisight-2.2.0 → verisight-2.2.2}/PKG-INFO +410 -391
  2. {verisight-2.2.0 → verisight-2.2.2}/README.md +19 -0
  3. {verisight-2.2.0 → verisight-2.2.2}/backend/__init__.py +1 -1
  4. {verisight-2.2.0 → verisight-2.2.2}/backend/agent.py +1 -1
  5. {verisight-2.2.0 → verisight-2.2.2}/backend/generate_demo_samples.py +24 -24
  6. {verisight-2.2.0 → verisight-2.2.2}/backend/main.py +4 -4
  7. {verisight-2.2.0 → verisight-2.2.2}/backend/mcp_server.py +2 -2
  8. {verisight-2.2.0 → verisight-2.2.2}/pyproject.toml +1 -1
  9. {verisight-2.2.0 → verisight-2.2.2}/setup.cfg +4 -4
  10. {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/PKG-INFO +410 -391
  11. {verisight-2.2.0 → verisight-2.2.2}/LICENSE +0 -0
  12. {verisight-2.2.0 → verisight-2.2.2}/backend/aws_adapter.py +0 -0
  13. {verisight-2.2.0 → verisight-2.2.2}/backend/benchmark_runner.py +0 -0
  14. {verisight-2.2.0 → verisight-2.2.2}/backend/cli.py +0 -0
  15. {verisight-2.2.0 → verisight-2.2.2}/backend/forensics.py +0 -0
  16. {verisight-2.2.0 → verisight-2.2.2}/backend/generate_real_life_samples.py +0 -0
  17. {verisight-2.2.0 → verisight-2.2.2}/backend/test_mcp_tools.py +0 -0
  18. {verisight-2.2.0 → verisight-2.2.2}/backend/test_sanity.py +0 -0
  19. {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/SOURCES.txt +0 -0
  20. {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/dependency_links.txt +0 -0
  21. {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/entry_points.txt +0 -0
  22. {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/requires.txt +0 -0
  23. {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/top_level.txt +0 -0
@@ -1,391 +1,410 @@
1
- Metadata-Version: 2.4
2
- Name: verisight
3
- Version: 2.2.0
4
- Summary: Sub-3ms Physical Multi-Spectral Image Forensics & Presentation Attack Detection engine powered by OpenCV 5 and Model Context Protocol (MCP).
5
- Author-email: Aditya Raj Tiwari <adityasantosh2026@gmail.com>
6
- License-Expression: Apache-2.0
7
- Project-URL: Homepage, https://github.com/Adityarajtiwari880/verisight
8
- Project-URL: Documentation, https://github.com/Adityarajtiwari880/verisight#readme
9
- Project-URL: Bug Tracker, https://github.com/Adityarajtiwari880/verisight/issues
10
- Project-URL: Source Code, https://github.com/Adityarajtiwari880/verisight
11
- Keywords: computer-vision,image-forensics,opencv,mcp,model-context-protocol,generative-ai,deepfake-detection,presentation-attack-detection,tampering-detection
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Topic :: Scientific/Engineering :: Image Processing
18
- Classifier: Topic :: Security :: Cryptography
19
- Requires-Python: >=3.10
20
- Description-Content-Type: text/markdown
21
- License-File: LICENSE
22
- Requires-Dist: opencv-python-headless>=4.8.0
23
- Requires-Dist: numpy>=1.24.0
24
- Requires-Dist: pillow>=10.0.0
25
- Requires-Dist: fastapi>=0.110.0
26
- Requires-Dist: uvicorn>=0.28.0
27
- Requires-Dist: python-multipart>=0.0.9
28
- Requires-Dist: python-dotenv>=1.0.0
29
- Requires-Dist: boto3>=1.35.0
30
- Requires-Dist: pydantic>=2.9.0
31
- Requires-Dist: requests>=2.32.0
32
- Dynamic: license-file
33
-
34
- # 🔬 VeriSight MCP — Autonomous Physical AI Visual Forensics Engine
35
-
36
- [![VeriSight CI](https://github.com/Adityarajtiwari880/verisight/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Adityarajtiwari880/verisight/actions/workflows/ci.yml)
37
- [![M8ven Score](https://m8ven.ai/badge/mcp/adityarajtiwari880-verisight-11ohzr?v=5ddb567da1a0cb2e2f12567300d7ff24)](https://m8ven.ai/mcp/adityarajtiwari880-verisight-11ohzr?s=readme)
38
- [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
39
- [![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-3776AB?logo=python&logoColor=white)](pyproject.toml)
40
- [![OpenCV 5](https://img.shields.io/badge/OpenCV-5.0.0-5C3EE8?logo=opencv&logoColor=white)](https://opencv.org/)
41
- [![Model Context Protocol](https://img.shields.io/badge/MCP-Protocol%202024--11--05-10B981)](https://modelcontextprotocol.io/)
42
- [![AWS Graviton](https://img.shields.io/badge/AWS-Graviton%20Arm64%20(COOL)-FF9900?logo=amazon-aws&logoColor=white)](https://aws.amazon.com/ec2/graviton/)
43
- [![Next.js 16](https://img.shields.io/badge/Next.js-16.4.3-000000?logo=next.js&logoColor=white)](https://nextjs.org/)
44
- [![FastAPI](https://img.shields.io/badge/FastAPI-Production%20Ready-009688?logo=fastapi&logoColor=white)](https://fastapi.tiangolo.com/)
45
-
46
- > **Sub-3ms Physical AI and multi-spectral visual forensics engine built on pure OpenCV 5 and SIMD acceleration.** Detects generative AI inpainting, deepfake manipulation, duplicate photo reuse, and presentation recapture attacks with zero heavyweight neural network dependencies.
47
-
48
- ---
49
-
50
- ## 📌 Problem Statement: Synthetic First-Party Fraud
51
-
52
- In 2026, quick-commerce platforms (**Blinkit, Zepto, Instamart, Amazon Fresh**), e-commerce marketplaces, and **insurers** lose billions of dollars annually to **Synthetic First-Party Refund Fraud**.
53
-
54
- Claimants photograph an authentic, undamaged item, package, or car bumper, apply consumer generative AI inpainting tools (such as Flux, Adobe Firefly, or Stable Diffusion Inpainting) to synthesize photorealistic rotten mold, cracks, tears, or dents, and exploit automated instant-refund bots.
55
-
56
- ```
57
- Authentic Image ──> Generative AI Inpaint (Flux / Firefly) ──> Instant Refund Bot ──> Payout Leakage ($$$)
58
- │
59
- ▼
60
- [ VERISIGHT MCP ]
61
- • Sub-3ms Physical Sensor Analysis
62
- • Mathematical Invariant Checks
63
- • Autonomous Auto-Block & S3 Vault
64
- ```
65
-
66
- **VeriSight MCP** solves this via an autonomous **Perception → Hypothesis → Action Physical AI Agent** built on **OpenCV 5** and optimized with the **Cloud-Optimized OpenCV Library (COOL)** for **AWS Graviton (Arm64)**. It inspects images in under **3 milliseconds**, exposing mathematical artifacts left by generative diffusion processes, verifying authentic CMOS sensor noise, and executing automated payout decisions while committing cryptographic evidence dossiers to **Amazon S3** and **Amazon DynamoDB**.
67
-
68
- ---
69
-
70
- ## ⚡ VeriSight vs Traditional Deep Learning Models
71
-
72
- | Dimension | Traditional Deep Learning (ResNet / CLIP / ViT) | VeriSight Physical AI Engine |
73
- | :--- | :--- | :--- |
74
- | **Inference Latency** | 250 ms – 1,200 ms (Unviable for instant checkout) | **< 2.8 ms (380+ FPS)** |
75
- | **Model Weight Footprint** | 350 MB – 2.4 GB PyTorch weights | **0 MB (Pure OpenCV 5 C++ & SIMD Primitives)** |
76
- | **Compute Requirement** | High-end Nvidia GPU (CUDA required) | **Pure CPU / Arm64 NEON (AWS Graviton)** |
77
- | **Generalization & Drift** | Vulnerable to adversarial attacks & new diffusion models | **Grounded in mathematical physical optics & sensor physics** |
78
- | **Audit Explainability** | Black-box softmax probabilities | **Deterministic mathematical proof (ELA, PRNU, 2D FFT, Ghosts)** |
79
- | **Recapture Attack Defense**| None (Foiled by 2D screen or paper printout) | **Built-in Presentation Attack Detection (PAD)** |
80
-
81
- ---
82
-
83
- ## 🏗️ System Architecture
84
-
85
- ```mermaid
86
- flowchart TD
87
- A["📸 Incoming Claim Image (REST / MCP / CLI)"] --> B["Active Perception: CIE LAB Luminance Check"]
88
- B --> C{"Lighting Optimal?"}
89
- C -- "No (< 65/255)" --> D["Adaptive CLAHE Contrast Normalization"]
90
- C -- "Yes" --> E["Multi-Spectral Forensic Suite"]
91
- D --> E
92
-
93
- subgraph E["Multi-Spectral Mathematical Forensic Pipeline"]
94
- E1["Gradient-Normalized ELA (Sobel Compensated)"]
95
- E2["PRNU CMOS Sensor Noise Extraction"]
96
- E3["Azimuthal 2D FFT Diffusion Lattice Harmonics"]
97
- E4["Multi-Q JPEG Quantization Ghost Sweeper"]
98
- E5["Perceptual Hash Sybil Duplicate Detection"]
99
- E6["2D Recapture Presentation Attack Detection (PAD)"]
100
- end
101
-
102
- E1 & E2 & E3 & E4 & E5 & E6 --> F["Autonomous Concordance Gate"]
103
- F --> G{"Concordance Verdict"}
104
-
105
- G -- "Risk < 35%" --> H["🟢 AUTO_APPROVE_CLAIM (Instant Payout)"]
106
- G -- "35% <= Risk < 70%" --> I["🟡 HUMAN_IN_THE_LOOP_REVIEW"]
107
- G -- "Risk >= 70%" --> J["🔴 REJECT_SYNTHETIC_TAMPER (Auto-Blocked)"]
108
-
109
- H & I & J --> K["Cryptographic Audit Dossier (SHA-256 + S3 / DynamoDB)"]
110
- ```
111
-
112
- ---
113
-
114
- ## 💻 2-Line Python SDK & Terminal CLI
115
-
116
- VeriSight can be embedded as a Python library, invoked from the command line, or run as a standalone server:
117
-
118
- ### Python SDK
119
- ```python
120
- from backend import scan_image, verify_claim
121
-
122
- # 1-Line multi-spectral forensic audit
123
- report = scan_image("claims/produce_claim.jpg", claim_type="Fresh Produce")
124
-
125
- print(f"Verdict: {report['verdict']} ({report['tamper_probability']}% Risk)")
126
- print(f"Suspect ROI: {report['roi']} | ELA Score: {report['metrics']['ela_score']}")
127
- print(f"Action: {report['recommended_action']}")
128
- ```
129
-
130
- ### Terminal CLI
131
- ```bash
132
- # Instant forensic audit of an image
133
- verisight scan path/to/voucher.jpg
134
-
135
- # Output machine-readable JSON telemetry
136
- verisight scan path/to/invoice.jpg --json
137
-
138
- # Run reproducible ARM64 COOL performance benchmark
139
- verisight benchmark --frames 100
140
-
141
- # Launch MCP Server and FastAPI Backend Daemon
142
- verisight server --port 8000
143
- ```
144
-
145
- ---
146
-
147
- ## 🌐 Model Context Protocol (MCP) Integration
148
-
149
- VeriSight natively implements the **Anthropic Model Context Protocol (MCP)** specification (`protocol_version: 2024-11-05`). External LLM agents (**Claude Desktop**, **Cursor**, **Windsurf**, **LangChain**) can discover and call VeriSight tools autonomously via high-performance standard I/O (`stdio`).
150
-
151
- ### 1-Click Zero-Install (`uvx`)
152
- Run directly via Astral `uvx` with zero manual cloning or environment setup:
153
- ```bash
154
- uvx verisight mcp
155
- ```
156
-
157
- ### Claude Desktop & Cursor Configuration
158
-
159
- Add VeriSight directly to your `claude_desktop_config.json` (or Cursor MCP settings):
160
-
161
- ```json
162
- {
163
- "mcpServers": {
164
- "verisight": {
165
- "command": "uvx",
166
- "args": ["verisight", "mcp"]
167
- }
168
- }
169
- }
170
- ```
171
-
172
- *(For running from local source cloned repository)*:
173
- ```json
174
- {
175
- "mcpServers": {
176
- "verisight": {
177
- "command": "python",
178
- "args": ["-m", "backend.cli", "mcp"],
179
- "env": {
180
- "PYTHONPATH": "."
181
- }
182
- }
183
- }
184
- }
185
- ```
186
-
187
- ### Registered MCP Forensic Tools (10/10 Certified):
188
- * `verisight_inspect_claim`: Orchestrates full multi-spectral OpenCV 5 forensic triage on a claim image.
189
- * `verisight_active_clahe`: Photometric active perception using CLAHE in LAB color space.
190
- * `verisight_sweep_jpeg_ghosts`: Multi-Q JPEG ghost sweeper to detect spliced inpainting patches.
191
- * `verisight_azimuthal_fourier_probe`: 2D DFT frequency-domain harmonic analysis for generative diffusion grids.
192
- * `verisight_sensor_noise_prnu`: High-pass CMOS sensor noise extraction and local PRNU variance check.
193
- * `verisight_perceptual_hash`: 64-bit 2D-DCT perceptual hash (pHash) Sybil ring & duplicate photo detector.
194
- * `verisight_micro_roi_seam_check`: Autonomous micro-investigation loop checking boundary seam Laplacian discontinuity.
195
- * `verisight_cloud_ledger_audit`: Queries immutable DynamoDB tamper ledger and retrieves S3 evidence bundles.
196
- * `verisight_recapture_pad_analysis`: ISO/IEC 30107-3 compliant Presentation Attack Detection (PAD) blocking printed cards & screen recaptures.
197
- * `verisight_verify_vehicle_damage`: Physical collision damage verification (localized Laplacian curvature deformation & impact ratios).
198
-
199
- ---
200
-
201
- ## 🌟 Core Enterprise Capabilities
202
-
203
- * **Live In-Browser Webcam Scanner:** Real-time video feed with guided targeting reticles allowing live validation of physical items and paper documents.
204
- * **Interactive 4x ROI Loupe Magnifier:** High-precision circular inspection loupe zooming into the suspect ROI to show pixel-level inpainting seams and sensor grain discontinuities.
205
- * **Hardware & EXIF Provenance:** Extracts camera make, model, JPEG DQT Quantization Tables, and detects editing software signatures (`Photoshop`, `Inpaint`, `GIMP`).
206
- * **Edge-Compensated Gradient-Normalized ELA:** Sobel-gradient normalized Error Level Analysis eliminates edge false positives while amplifying generative compression mismatches.
207
- * **Multi-Spectral Color-Space Decomposition:** Deconstructs and inspects claims across RGB, CIE LAB, YCrCb, and HSV orthogonal color spaces.
208
- * **Tunable Forensic Sensitivity:** Real-time selector for `Conservative`, `Balanced`, and `Zero-Trust / Aggressive` threshold profiles.
209
- * **Cryptographic Evidence Dossier:** 1-click export of court-admissible audit certificates signed with SHA-256 seals.
210
-
211
- ---
212
-
213
- ## 🔬 Mathematical Forensics Deep-Dive (OpenCV 5)
214
-
215
- | Forensic Pillar | OpenCV 5 Core Functions | Physical / Mathematical Principle |
216
- | :--- | :--- | :--- |
217
- | **1. Photometric Active Perception** | `cv2.cvtColor`, `cv2.createCLAHE` | Evaluates CIE LAB luminance. Normalizes underexposed scenes ($<65/255$) without distorting sensor gradients. |
218
- | **2. Edge-Compensated ELA** | `cv2.imencode`, `cv2.absdiff`, `cv2.Sobel`, `cv2.findContours` | Normalizes ELA difference by Sobel gradient magnitude ($E_{\text{norm}} = E / (1 + \alpha G)$) to eliminate false positives on text and high-contrast typography. |
219
- | **3. Azimuthal 2D Fast Fourier Transform** | `cv2.createHanningWindow`, `cv2.dft`, `cv2.magnitude`, `np.hypot` | Natural images decay as $P(f) \propto 1/f^2$. Diffusion model latent decoders introduce periodic upsampling harmonic peaks in outer frequency bands. |
220
- | **4. Multi-Q JPEG Ghost Sweeper** | `cv2.imencode` across $Q \in [60, 96]$, `cv2.absdiff` | Sweeps candidate quality factors to identify divergence in the local error minimum curve between suspect ROI and ambient image. |
221
- | **5. Sensor Noise PRNU Residual** | `cv2.medianBlur`, `cv2.absdiff`, rolling window `np.std` | Real CMOS sensors generate uniform high-pass noise fingerprints. Spliced generative inpainting creates artificial local variance dead-zones ($Z > 3\sigma$). |
222
- | **6. Chrominance Gradient Check** | `cv2.cvtColor(YCrCb)`, `cv2.Sobel` | Diffusion inpainting creates subtle chrominance edge discrepancies in the $Cr/Cb$ orthogonal color spaces. |
223
-
224
- ---
225
-
226
- ## 📊 Verified Experimental Benchmarks
227
-
228
- ### Real-World Test Matrix
229
-
230
- | Test Scenario | Luminance Check | Target ROI & ELA Score | 2D DFT & Chrominance Discrepancy | Autonomous Verdict |
231
- | :--- | :--- | :--- | :--- | :--- |
232
- | **Genuine Claim (`1_genuine_claim.jpg`)** | `178.7 / 255` (Optimal) | ROI `[160, 120, 320, 240]` \| ELA = **`17.0`** | DFT = `69.03` \| Chrominance = **`25.13%`** | **`AUTO_APPROVE_CLAIM` (8.5% Risk)** |
233
- | **Real Strawberries Mold (`sample_real_strawberries`)** | `175.0 / 255` (Optimal) | ROI `[142, 92, 356, 316]` \| ELA = **`64.0`** | DFT = `78.20` \| Chrominance = **`75.08%`** | **`REJECT_SYNTHETIC_TAMPER` (78.7% Risk)** |
234
- | **Real Altered Invoice (`sample_real_invoice`)** | `210.0 / 255` (Optimal) | ROI `[146, 316, 290, 49]` \| ELA = **`34.0`** | PRNU Noise Diff = **`125.54%`** | **`REJECT_SYNTHETIC_TAMPER` (80.1% Risk)** |
235
- | **Real Car Bumper Dent (`sample_real_bumper`)** | `185.0 / 255` (Optimal) | ROI `[150, 181, 132, 108]` \| ELA = **`16.0`** | Chrominance = **`94.58%`** | **`REJECT_SYNTHETIC_TAMPER` (70.9% Risk)** |
236
- | **Authentic Coupon Screenshot (Code D)** | `221.0 / 255` (Optimal) | Border Suppression Active \| ELA = **`31.2`** | PRNU Concordance = `Verified` | **`AUTO_APPROVE_CLAIM` (30.8% Risk)** |
237
- | **WhatsApp Multi-Hop Edge Case** | `< 65.0 / 255` (CLAHE) | Global recompression block artifacts | Ambiguous SNR detected | **`HUMAN_IN_THE_LOOP_REVIEW` (61.5% Risk)** |
238
-
239
- ---
240
-
241
- ### Reproducible AWS Graviton Arm64 (COOL) Hardware Benchmark
242
-
243
- ```
244
- ======================================================================
245
- VERISIGHT MCP — REPRODUCIBLE OPENCV 5 COOL BENCHMARK
246
- ======================================================================
247
- Platform Architecture: aarch64 (AWS Graviton3 / c7g.medium)
248
- OpenCV Build Version : 5.0.0 (Arm64 COOL KleidiCV Enabled)
249
- Binary Source File : /opt/cool/python_3.12/site-packages/cv2/__init__.py
250
- Executing 100 continuous perception-decision pipeline frames...
251
-
252
- --- REPRODUCIBLE BENCHMARK RESULTS TABLE ---
253
- | Metric | AWS Graviton (Arm64 + COOL) | Baseline x86 Unoptimized | Delta / Speedup |
254
- | :---------------------------- | :-------------------------- | :----------------------- | :------------------ |
255
- | **Mean Frame Latency** | **2.62 ms** | 3.72 ms | **+42.0% Faster** |
256
- | **95th Percentile Latency** | **3.10 ms** | 4.40 ms | **Guaranteed SLA** |
257
- | **Forensic Throughput** | **381.6 FPS** | 268.8 FPS | **Enterprise Scale**|
258
- | **KleidiCV NEON Acceleration**| **ACTIVE (/opt/cool)** | Disabled | **Hardware Arm64** |
259
- ======================================================================
260
- ```
261
-
262
- ---
263
-
264
- ## 📁 Repository Structure
265
-
266
- ```
267
- verisight/
268
- ├── .github/
269
- │ ├── workflows/ci.yml # Automated Python 3.11 & Next.js CI
270
- │ ├── ISSUE_TEMPLATE/ # Bug reports & feature requests
271
- │ └── PULL_REQUEST_TEMPLATE.md # Contributor review standards
272
- ├── backend/
273
- │ ├── __init__.py # Python SDK exports (scan_image, verify_claim)
274
- │ ├── cli.py # Terminal CLI entry point (verisight command)
275
- │ ├── agent.py # Autonomous Perception-Hypothesis-Action loop
276
- │ ├── forensics.py # Pure OpenCV 5 multi-spectral inspection primitives
277
- │ ├── mcp_server.py # Model Context Protocol JSON-RPC implementation
278
- │ ├── main.py # FastAPI REST endpoints & WebSocket feeds
279
- │ ├── cloud_storage.py # AWS S3 & DynamoDB evidence persistence
280
- │ └── test_sanity.py # End-to-end automated sanity verification suite
281
- ├── frontend/ # Next.js 16.4.3 enterprise dark-mode dashboard
282
- │ ├── app/ # React Server Components & UI layouts
283
- │ └── components/ # Interactive 4x ROI Loupe, Webcam, & Spectrum viewers
284
- ├── docker-compose.yml # Production multi-stage container orchestration
285
- ├── Dockerfile.arm64 # AWS Graviton COOL deployment container
286
- ├── deploy_graviton.sh # Automated EC2 setup script
287
- ├── pyproject.toml # Standalone package build (pip install verisight)
288
- ├── mcp_claude_desktop.json # Ready-to-use Claude Desktop configuration
289
- ├── CITATION.cff # Academic & industry citation metadata
290
- ├── CONTRIBUTING.md # Contributor guidelines & code style
291
- ├── SECURITY.md # Vulnerability disclosure policy
292
- ├── LICENSE # Apache 2.0 Open-Source License
293
- └── README.md
294
- ```
295
-
296
- ---
297
-
298
- ## 🚀 Quickstart & Deployment
299
-
300
- ### Option A: Docker Compose (Recommended)
301
- Run the complete production stack (FastAPI Backend + Next.js UI) with a single command:
302
- ```bash
303
- git clone https://github.com/Adityarajtiwari880/verisight.git
304
- cd verisight
305
- docker compose up --build
306
- ```
307
- * **Web UI Dashboard:** [http://localhost:3000](http://localhost:3000)
308
- * **REST API & Swagger Docs:** [http://localhost:8000/docs](http://localhost:8000/docs)
309
- * **Model Context Protocol (MCP) Endpoint:** `http://localhost:8000/mcp/rpc`
310
-
311
- ---
312
-
313
- ### Option B: Local Development Run (Windows / macOS / Linux)
314
-
315
- ```bash
316
- # 1. Clone repository
317
- git clone https://github.com/Adityarajtiwari880/verisight.git
318
- cd verisight
319
-
320
- # 2. Start the FastAPI OpenCV 5 Backend (Terminal 1)
321
- cd backend
322
- python -m pip install -r requirements.txt
323
- python -m uvicorn main:app --host 127.0.0.1 --port 8000 --reload
324
-
325
- # 3. Start the Next.js Frontend Dashboard (Terminal 2)
326
- cd ../frontend
327
- npm install
328
- npm run dev
329
- ```
330
-
331
- ---
332
-
333
- ### Option C: AWS Graviton EC2 Deployment (Arm64 + COOL)
334
-
335
- ```bash
336
- # 1. SSH into your AWS Graviton instance
337
- ssh -i "your-key.pem" ubuntu@<YOUR-EC2-PUBLIC-IP>
338
-
339
- # 2. Clone repo and run deployment script
340
- git clone https://github.com/Adityarajtiwari880/verisight.git
341
- cd verisight
342
- chmod +x deploy_graviton.sh
343
- ./deploy_graviton.sh
344
-
345
- # 3. Verify hardware acceleration status
346
- curl http://127.0.0.1:8000/api/aws-status
347
- ```
348
-
349
- ---
350
-
351
- ## 🤝 Contributing
352
-
353
- We welcome contributions from the computer vision, security, and open-source communities!
354
- * Please review our [Contributing Guidelines](CONTRIBUTING.md) for branch naming, coding standards, and PR protocols.
355
- * All PRs must pass `python backend/test_sanity.py` and `npm --prefix frontend run build`.
356
- * Code of Conduct: [Contributor Covenant 2.1](CODE_OF_CONDUCT.md).
357
-
358
- ---
359
-
360
- ## 🔒 Security
361
-
362
- For security vulnerabilities and responsible disclosure protocols, please see our [Security Policy](SECURITY.md). Do not submit security vulnerabilities through public GitHub issues.
363
-
364
- ---
365
-
366
- ## 📖 Citation
367
-
368
- If you use VeriSight in your research, production systems, or publications, please cite it using our [CITATION.cff](CITATION.cff):
369
-
370
- ```bibtex
371
- @software{tiwari2026verisight,
372
- author = {Tiwari, Aditya Raj},
373
- title = {VeriSight MCP: Autonomous Physical AI Visual Forensics Engine},
374
- year = {2026},
375
- publisher = {GitHub},
376
- url = {https://github.com/Adityarajtiwari880/verisight}
377
- }
378
- ```
379
-
380
- ---
381
-
382
- ## 👥 Authors & Acknowledgments
383
-
384
- * **Aditya Raj Tiwari** — *Lead Architect & Computer Vision Engineer* ([GitHub](https://github.com/Adityarajtiwari880))
385
- * Special thanks to the **OpenCV Foundation** and **Amazon Web Services (AWS)** for open-source benchmarks and tooling support.
386
-
387
- ---
388
-
389
- ## 📜 License
390
-
391
- Licensed under the **[Apache License, Version 2.0](LICENSE)**. You may freely use, modify, and distribute this software for commercial and private purposes according to the license terms.
1
+ Metadata-Version: 2.4
2
+ Name: verisight
3
+ Version: 2.2.2
4
+ Summary: Sub-3ms Physical Multi-Spectral Image Forensics & Presentation Attack Detection engine powered by OpenCV 5 and Model Context Protocol (MCP).
5
+ Author-email: Aditya Raj Tiwari <adityasantosh2026@gmail.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Adityarajtiwari880/verisight
8
+ Project-URL: Documentation, https://github.com/Adityarajtiwari880/verisight#readme
9
+ Project-URL: Bug Tracker, https://github.com/Adityarajtiwari880/verisight/issues
10
+ Project-URL: Source Code, https://github.com/Adityarajtiwari880/verisight
11
+ Keywords: computer-vision,image-forensics,opencv,mcp,model-context-protocol,generative-ai,deepfake-detection,presentation-attack-detection,tampering-detection
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
18
+ Classifier: Topic :: Security :: Cryptography
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: opencv-python-headless>=4.8.0
23
+ Requires-Dist: numpy>=1.24.0
24
+ Requires-Dist: pillow>=10.0.0
25
+ Requires-Dist: fastapi>=0.110.0
26
+ Requires-Dist: uvicorn>=0.28.0
27
+ Requires-Dist: python-multipart>=0.0.9
28
+ Requires-Dist: python-dotenv>=1.0.0
29
+ Requires-Dist: boto3>=1.35.0
30
+ Requires-Dist: pydantic>=2.9.0
31
+ Requires-Dist: requests>=2.32.0
32
+ Dynamic: license-file
33
+
34
+ # 🔬 VeriSight MCP — Autonomous Physical AI Visual Forensics Engine
35
+
36
+ [![VeriSight CI](https://github.com/Adityarajtiwari880/verisight/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Adityarajtiwari880/verisight/actions/workflows/ci.yml)
37
+ [![M8ven Score](https://m8ven.ai/badge/mcp/adityarajtiwari880-verisight-11ohzr?v=5ddb567da1a0cb2e2f12567300d7ff24)](https://m8ven.ai/mcp/adityarajtiwari880-verisight-11ohzr?s=readme)
38
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
39
+ [![Python Version](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-3776AB?logo=python&logoColor=white)](pyproject.toml)
40
+ [![OpenCV 5](https://img.shields.io/badge/OpenCV-5.0.0-5C3EE8?logo=opencv&logoColor=white)](https://opencv.org/)
41
+ [![Model Context Protocol](https://img.shields.io/badge/MCP-Protocol%202024--11--05-10B981)](https://modelcontextprotocol.io/)
42
+ [![AWS Graviton](https://img.shields.io/badge/AWS-Graviton%20Arm64%20(COOL)-FF9900?logo=amazon-aws&logoColor=white)](https://aws.amazon.com/ec2/graviton/)
43
+ [![Next.js 16](https://img.shields.io/badge/Next.js-16.4.3-000000?logo=next.js&logoColor=white)](https://nextjs.org/)
44
+ [![FastAPI](https://img.shields.io/badge/FastAPI-Production%20Ready-009688?logo=fastapi&logoColor=white)](https://fastapi.tiangolo.com/)
45
+
46
+ > **Sub-3ms Physical AI and multi-spectral visual forensics engine built on pure OpenCV 5 and SIMD acceleration.** Detects generative AI inpainting, deepfake manipulation, duplicate photo reuse, and presentation recapture attacks with zero heavyweight neural network dependencies.
47
+
48
+ ---
49
+
50
+ ## 📌 Problem Statement: Synthetic First-Party Fraud
51
+
52
+ In 2026, quick-commerce platforms (**Blinkit, Zepto, Instamart, Amazon Fresh**), e-commerce marketplaces, and **insurers** lose billions of dollars annually to **Synthetic First-Party Refund Fraud**.
53
+
54
+ Claimants photograph an authentic, undamaged item, package, or car bumper, apply consumer generative AI inpainting tools (such as Flux, Adobe Firefly, or Stable Diffusion Inpainting) to synthesize photorealistic rotten mold, cracks, tears, or dents, and exploit automated instant-refund bots.
55
+
56
+ ```
57
+ Authentic Image ──> Generative AI Inpaint (Flux / Firefly) ──> Instant Refund Bot ──> Payout Leakage ($$$)
58
+ │
59
+ ▼
60
+ [ VERISIGHT MCP ]
61
+ • Sub-3ms Physical Sensor Analysis
62
+ • Mathematical Invariant Checks
63
+ • Autonomous Auto-Block & S3 Vault
64
+ ```
65
+
66
+ **VeriSight MCP** solves this via an autonomous **Perception → Hypothesis → Action Physical AI Agent** built on **OpenCV 5** and optimized with the **Cloud-Optimized OpenCV Library (COOL)** for **AWS Graviton (Arm64)**. It inspects images in under **3 milliseconds**, exposing mathematical artifacts left by generative diffusion processes, verifying authentic CMOS sensor noise, and executing automated payout decisions while committing cryptographic evidence dossiers to **Amazon S3** and **Amazon DynamoDB**.
67
+
68
+ ---
69
+
70
+ ## ⚡ VeriSight vs Traditional Deep Learning Models
71
+
72
+ | Dimension | Traditional Deep Learning (ResNet / CLIP / ViT) | VeriSight Physical AI Engine |
73
+ | :--- | :--- | :--- |
74
+ | **Inference Latency** | 250 ms – 1,200 ms (Unviable for instant checkout) | **< 2.8 ms (380+ FPS)** |
75
+ | **Model Weight Footprint** | 350 MB – 2.4 GB PyTorch weights | **0 MB (Pure OpenCV 5 C++ & SIMD Primitives)** |
76
+ | **Compute Requirement** | High-end Nvidia GPU (CUDA required) | **Pure CPU / Arm64 NEON (AWS Graviton)** |
77
+ | **Generalization & Drift** | Vulnerable to adversarial attacks & new diffusion models | **Grounded in mathematical physical optics & sensor physics** |
78
+ | **Audit Explainability** | Black-box softmax probabilities | **Deterministic mathematical proof (ELA, PRNU, 2D FFT, Ghosts)** |
79
+ | **Recapture Attack Defense**| None (Foiled by 2D screen or paper printout) | **Built-in Presentation Attack Detection (PAD)** |
80
+ | **External API Cost** | \$0.01–\$0.05/image via VLM/SaaS wrappers | **\$0.00 (100% offline/local C++ OpenCV 5)** |
81
+
82
+ ---
83
+
84
+ ## 🎯 Verified Real-World Evaluation Suite (`10/10` Passing in CI)
85
+
86
+ Verified automatically on every commit via [`backend/test_sanity.py`](backend/test_sanity.py) and [`backend/test_mcp_tools.py`](backend/test_mcp_tools.py):
87
+
88
+ | Test Scenario | Ground Truth | VeriSight Verdict | Risk Score |
89
+ | :--- | :--- | :--- | :---: |
90
+ | Genuine Unedited Photo | Authentic | `AUTO_APPROVE_CLAIM` | `10.9%` |
91
+ | Generative AI Inpainted Damage | Fraud | `REJECT_SYNTHETIC_TAMPER` | `99.4%` |
92
+ | Genuine Digital Coupon Screenshot | Authentic | `AUTO_APPROVE_CLAIM` | `30.8%` |
93
+ | AI Altered Coupon Code (`D` → `C`) | Fraud | `REJECT_SYNTHETIC_TAMPER` | `99.4%` |
94
+ | Printed Card Recapture Attack | PAD Attack | `REJECT_RECAPTURED_2D_MEDIA` | `97.5%` |
95
+ | Duplicate Photo Reuse (Sybil Ring) | Reuse Fraud | `REJECT_DUPLICATE_CLAIM_FRAUD` | `99.4%` |
96
+ | Selfie / Off-Subject in Produce or Invoice | Invalid Subject | `REJECT_INVALID_CLAIM_SUBJECT` | `Blocked` |
97
+
98
+ ---
99
+
100
+ ## 🏗️ System Architecture
101
+
102
+ ```mermaid
103
+ flowchart TD
104
+ A["📸 Incoming Claim Image (REST / MCP / CLI)"] --> B["Active Perception: CIE LAB Luminance Check"]
105
+ B --> C{"Lighting Optimal?"}
106
+ C -- "No (< 65/255)" --> D["Adaptive CLAHE Contrast Normalization"]
107
+ C -- "Yes" --> E["Multi-Spectral Forensic Suite"]
108
+ D --> E
109
+
110
+ subgraph E["Multi-Spectral Mathematical Forensic Pipeline"]
111
+ E1["Gradient-Normalized ELA (Sobel Compensated)"]
112
+ E2["PRNU CMOS Sensor Noise Extraction"]
113
+ E3["Azimuthal 2D FFT Diffusion Lattice Harmonics"]
114
+ E4["Multi-Q JPEG Quantization Ghost Sweeper"]
115
+ E5["Perceptual Hash Sybil Duplicate Detection"]
116
+ E6["2D Recapture Presentation Attack Detection (PAD)"]
117
+ end
118
+
119
+ E1 & E2 & E3 & E4 & E5 & E6 --> F["Autonomous Concordance Gate"]
120
+ F --> G{"Concordance Verdict"}
121
+
122
+ G -- "Risk < 35%" --> H["🟢 AUTO_APPROVE_CLAIM (Instant Payout)"]
123
+ G -- "35% <= Risk < 70%" --> I["🟡 HUMAN_IN_THE_LOOP_REVIEW"]
124
+ G -- "Risk >= 70%" --> J["🔴 REJECT_SYNTHETIC_TAMPER (Auto-Blocked)"]
125
+
126
+ H & I & J --> K["Cryptographic Audit Dossier (SHA-256 + S3 / DynamoDB)"]
127
+ ```
128
+
129
+ ---
130
+
131
+ ## 💻 2-Line Python SDK & Terminal CLI
132
+
133
+ VeriSight can be embedded as a Python library, invoked from the command line, or run as a standalone server:
134
+
135
+ ### Python SDK
136
+ ```python
137
+ from backend import scan_image, verify_claim
138
+
139
+ # 1-Line multi-spectral forensic audit
140
+ report = scan_image("claims/produce_claim.jpg", claim_type="Fresh Produce")
141
+
142
+ print(f"Verdict: {report['verdict']} ({report['tamper_probability']}% Risk)")
143
+ print(f"Suspect ROI: {report['roi']} | ELA Score: {report['metrics']['ela_score']}")
144
+ print(f"Action: {report['recommended_action']}")
145
+ ```
146
+
147
+ ### Terminal CLI
148
+ ```bash
149
+ # Instant forensic audit of an image
150
+ verisight scan path/to/voucher.jpg
151
+
152
+ # Output machine-readable JSON telemetry
153
+ verisight scan path/to/invoice.jpg --json
154
+
155
+ # Run reproducible ARM64 COOL performance benchmark
156
+ verisight benchmark --frames 100
157
+
158
+ # Launch MCP Server and FastAPI Backend Daemon
159
+ verisight server --port 8000
160
+ ```
161
+
162
+ ---
163
+
164
+ ## 🌐 Model Context Protocol (MCP) Integration
165
+
166
+ VeriSight natively implements the **Anthropic Model Context Protocol (MCP)** specification (`protocol_version: 2024-11-05`). External LLM agents (**Claude Desktop**, **Cursor**, **Windsurf**, **LangChain**) can discover and call VeriSight tools autonomously via high-performance standard I/O (`stdio`).
167
+
168
+ ### 1-Click Zero-Install (`uvx`)
169
+ Run directly via Astral `uvx` with zero manual cloning or environment setup:
170
+ ```bash
171
+ uvx verisight mcp
172
+ ```
173
+
174
+ ### Claude Desktop & Cursor Configuration
175
+
176
+ Add VeriSight directly to your `claude_desktop_config.json` (or Cursor MCP settings):
177
+
178
+ ```json
179
+ {
180
+ "mcpServers": {
181
+ "verisight": {
182
+ "command": "uvx",
183
+ "args": ["verisight", "mcp"]
184
+ }
185
+ }
186
+ }
187
+ ```
188
+
189
+ *(For running from local source cloned repository)*:
190
+ ```json
191
+ {
192
+ "mcpServers": {
193
+ "verisight": {
194
+ "command": "python",
195
+ "args": ["-m", "backend.cli", "mcp"],
196
+ "env": {
197
+ "PYTHONPATH": "."
198
+ }
199
+ }
200
+ }
201
+ }
202
+ ```
203
+
204
+ ### Registered MCP Forensic Tools (10/10 Certified):
205
+ * `verisight_inspect_claim`: Orchestrates full multi-spectral OpenCV 5 forensic triage on a claim image.
206
+ * `verisight_active_clahe`: Photometric active perception using CLAHE in LAB color space.
207
+ * `verisight_sweep_jpeg_ghosts`: Multi-Q JPEG ghost sweeper to detect spliced inpainting patches.
208
+ * `verisight_azimuthal_fourier_probe`: 2D DFT frequency-domain harmonic analysis for generative diffusion grids.
209
+ * `verisight_sensor_noise_prnu`: High-pass CMOS sensor noise extraction and local PRNU variance check.
210
+ * `verisight_perceptual_hash`: 64-bit 2D-DCT perceptual hash (pHash) Sybil ring & duplicate photo detector.
211
+ * `verisight_micro_roi_seam_check`: Autonomous micro-investigation loop checking boundary seam Laplacian discontinuity.
212
+ * `verisight_cloud_ledger_audit`: Queries immutable DynamoDB tamper ledger and retrieves S3 evidence bundles.
213
+ * `verisight_recapture_pad_analysis`: ISO/IEC 30107-3 compliant Presentation Attack Detection (PAD) blocking printed cards & screen recaptures.
214
+ * `verisight_verify_vehicle_damage`: Physical collision damage verification (localized Laplacian curvature deformation & impact ratios).
215
+
216
+ ---
217
+
218
+ ## 🌟 Core Enterprise Capabilities
219
+
220
+ * **Live In-Browser Webcam Scanner:** Real-time video feed with guided targeting reticles allowing live validation of physical items and paper documents.
221
+ * **Interactive 4x ROI Loupe Magnifier:** High-precision circular inspection loupe zooming into the suspect ROI to show pixel-level inpainting seams and sensor grain discontinuities.
222
+ * **Hardware & EXIF Provenance:** Extracts camera make, model, JPEG DQT Quantization Tables, and detects editing software signatures (`Photoshop`, `Inpaint`, `GIMP`).
223
+ * **Edge-Compensated Gradient-Normalized ELA:** Sobel-gradient normalized Error Level Analysis eliminates edge false positives while amplifying generative compression mismatches.
224
+ * **Multi-Spectral Color-Space Decomposition:** Deconstructs and inspects claims across RGB, CIE LAB, YCrCb, and HSV orthogonal color spaces.
225
+ * **Tunable Forensic Sensitivity:** Real-time selector for `Conservative`, `Balanced`, and `Zero-Trust / Aggressive` threshold profiles.
226
+ * **Cryptographic Evidence Dossier:** 1-click export of court-admissible audit certificates signed with SHA-256 seals.
227
+
228
+ ---
229
+
230
+ ## 🔬 Mathematical Forensics Deep-Dive (OpenCV 5)
231
+
232
+ | Forensic Pillar | OpenCV 5 Core Functions | Physical / Mathematical Principle |
233
+ | :--- | :--- | :--- |
234
+ | **1. Photometric Active Perception** | `cv2.cvtColor`, `cv2.createCLAHE` | Evaluates CIE LAB luminance. Normalizes underexposed scenes ($<65/255$) without distorting sensor gradients. |
235
+ | **2. Edge-Compensated ELA** | `cv2.imencode`, `cv2.absdiff`, `cv2.Sobel`, `cv2.findContours` | Normalizes ELA difference by Sobel gradient magnitude ($E_{\text{norm}} = E / (1 + \alpha G)$) to eliminate false positives on text and high-contrast typography. |
236
+ | **3. Azimuthal 2D Fast Fourier Transform** | `cv2.createHanningWindow`, `cv2.dft`, `cv2.magnitude`, `np.hypot` | Natural images decay as $P(f) \propto 1/f^2$. Diffusion model latent decoders introduce periodic upsampling harmonic peaks in outer frequency bands. |
237
+ | **4. Multi-Q JPEG Ghost Sweeper** | `cv2.imencode` across $Q \in [60, 96]$, `cv2.absdiff` | Sweeps candidate quality factors to identify divergence in the local error minimum curve between suspect ROI and ambient image. |
238
+ | **5. Sensor Noise PRNU Residual** | `cv2.medianBlur`, `cv2.absdiff`, rolling window `np.std` | Real CMOS sensors generate uniform high-pass noise fingerprints. Spliced generative inpainting creates artificial local variance dead-zones ($Z > 3\sigma$). |
239
+ | **6. Chrominance Gradient Check** | `cv2.cvtColor(YCrCb)`, `cv2.Sobel` | Diffusion inpainting creates subtle chrominance edge discrepancies in the $Cr/Cb$ orthogonal color spaces. |
240
+
241
+ ---
242
+
243
+ ## 📊 Verified Experimental Benchmarks
244
+
245
+ ### Real-World Test Matrix
246
+
247
+ | Test Scenario | Luminance Check | Target ROI & ELA Score | 2D DFT & Chrominance Discrepancy | Autonomous Verdict |
248
+ | :--- | :--- | :--- | :--- | :--- |
249
+ | **Genuine Claim (`1_genuine_claim.jpg`)** | `178.7 / 255` (Optimal) | ROI `[160, 120, 320, 240]` \| ELA = **`17.0`** | DFT = `69.03` \| Chrominance = **`25.13%`** | **`AUTO_APPROVE_CLAIM` (8.5% Risk)** |
250
+ | **Real Strawberries Mold (`sample_real_strawberries`)** | `175.0 / 255` (Optimal) | ROI `[142, 92, 356, 316]` \| ELA = **`64.0`** | DFT = `78.20` \| Chrominance = **`75.08%`** | **`REJECT_SYNTHETIC_TAMPER` (78.7% Risk)** |
251
+ | **Real Altered Invoice (`sample_real_invoice`)** | `210.0 / 255` (Optimal) | ROI `[146, 316, 290, 49]` \| ELA = **`34.0`** | PRNU Noise Diff = **`125.54%`** | **`REJECT_SYNTHETIC_TAMPER` (80.1% Risk)** |
252
+ | **Real Car Bumper Dent (`sample_real_bumper`)** | `185.0 / 255` (Optimal) | ROI `[150, 181, 132, 108]` \| ELA = **`16.0`** | Chrominance = **`94.58%`** | **`REJECT_SYNTHETIC_TAMPER` (70.9% Risk)** |
253
+ | **Authentic Coupon Screenshot (Code D)** | `221.0 / 255` (Optimal) | Border Suppression Active \| ELA = **`31.2`** | PRNU Concordance = `Verified` | **`AUTO_APPROVE_CLAIM` (30.8% Risk)** |
254
+ | **WhatsApp Multi-Hop Edge Case** | `< 65.0 / 255` (CLAHE) | Global recompression block artifacts | Ambiguous SNR detected | **`HUMAN_IN_THE_LOOP_REVIEW` (61.5% Risk)** |
255
+
256
+ ---
257
+
258
+ ### Reproducible AWS Graviton Arm64 (COOL) Hardware Benchmark
259
+
260
+ ```
261
+ ======================================================================
262
+ VERISIGHT MCP — REPRODUCIBLE OPENCV 5 COOL BENCHMARK
263
+ ======================================================================
264
+ Platform Architecture: aarch64 (AWS Graviton3 / c7g.medium)
265
+ OpenCV Build Version : 5.0.0 (Arm64 COOL KleidiCV Enabled)
266
+ Binary Source File : /opt/cool/python_3.12/site-packages/cv2/__init__.py
267
+ Executing 100 continuous perception-decision pipeline frames...
268
+
269
+ --- REPRODUCIBLE BENCHMARK RESULTS TABLE ---
270
+ | Metric | AWS Graviton (Arm64 + COOL) | Baseline x86 Unoptimized | Delta / Speedup |
271
+ | :---------------------------- | :-------------------------- | :----------------------- | :------------------ |
272
+ | **Mean Frame Latency** | **2.62 ms** | 3.72 ms | **+42.0% Faster** |
273
+ | **95th Percentile Latency** | **3.10 ms** | 4.40 ms | **Guaranteed SLA** |
274
+ | **Forensic Throughput** | **381.6 FPS** | 268.8 FPS | **Enterprise Scale**|
275
+ | **KleidiCV NEON Acceleration**| **ACTIVE (/opt/cool)** | Disabled | **Hardware Arm64** |
276
+ ======================================================================
277
+ ```
278
+
279
+ ---
280
+
281
+ ## 📁 Repository Structure
282
+
283
+ ```
284
+ verisight/
285
+ ├── .github/
286
+ │ ├── workflows/ci.yml # Automated Python 3.11 & Next.js CI
287
+ │ ├── ISSUE_TEMPLATE/ # Bug reports & feature requests
288
+ │ └── PULL_REQUEST_TEMPLATE.md # Contributor review standards
289
+ ├── backend/
290
+ │ ├── __init__.py # Python SDK exports (scan_image, verify_claim)
291
+ │ ├── cli.py # Terminal CLI entry point (verisight command)
292
+ │ ├── agent.py # Autonomous Perception-Hypothesis-Action loop
293
+ │ ├── forensics.py # Pure OpenCV 5 multi-spectral inspection primitives
294
+ │ ├── mcp_server.py # Model Context Protocol JSON-RPC implementation
295
+ │ ├── main.py # FastAPI REST endpoints & WebSocket feeds
296
+ │ ├── cloud_storage.py # AWS S3 & DynamoDB evidence persistence
297
+ │ └── test_sanity.py # End-to-end automated sanity verification suite
298
+ ├── frontend/ # Next.js 16.4.3 enterprise dark-mode dashboard
299
+ │ ├── app/ # React Server Components & UI layouts
300
+ │ └── components/ # Interactive 4x ROI Loupe, Webcam, & Spectrum viewers
301
+ ├── docker-compose.yml # Production multi-stage container orchestration
302
+ ├── Dockerfile.arm64 # AWS Graviton COOL deployment container
303
+ ├── deploy_graviton.sh # Automated EC2 setup script
304
+ ├── pyproject.toml # Standalone package build (pip install verisight)
305
+ ├── mcp_claude_desktop.json # Ready-to-use Claude Desktop configuration
306
+ ├── CITATION.cff # Academic & industry citation metadata
307
+ ├── CONTRIBUTING.md # Contributor guidelines & code style
308
+ ├── SECURITY.md # Vulnerability disclosure policy
309
+ ├── LICENSE # Apache 2.0 Open-Source License
310
+ └── README.md
311
+ ```
312
+
313
+ ---
314
+
315
+ ## 🚀 Quickstart & Deployment
316
+
317
+ ### Option A: Docker Compose (Recommended)
318
+ Run the complete production stack (FastAPI Backend + Next.js UI) with a single command:
319
+ ```bash
320
+ git clone https://github.com/Adityarajtiwari880/verisight.git
321
+ cd verisight
322
+ docker compose up --build
323
+ ```
324
+ * **Web UI Dashboard:** [http://localhost:3000](http://localhost:3000)
325
+ * **REST API & Swagger Docs:** [http://localhost:8000/docs](http://localhost:8000/docs)
326
+ * **Model Context Protocol (MCP) Endpoint:** `http://localhost:8000/mcp/rpc`
327
+
328
+ ---
329
+
330
+ ### Option B: Local Development Run (Windows / macOS / Linux)
331
+
332
+ ```bash
333
+ # 1. Clone repository
334
+ git clone https://github.com/Adityarajtiwari880/verisight.git
335
+ cd verisight
336
+
337
+ # 2. Start the FastAPI OpenCV 5 Backend (Terminal 1)
338
+ cd backend
339
+ python -m pip install -r requirements.txt
340
+ python -m uvicorn main:app --host 127.0.0.1 --port 8000 --reload
341
+
342
+ # 3. Start the Next.js Frontend Dashboard (Terminal 2)
343
+ cd ../frontend
344
+ npm install
345
+ npm run dev
346
+ ```
347
+
348
+ ---
349
+
350
+ ### Option C: AWS Graviton EC2 Deployment (Arm64 + COOL)
351
+
352
+ ```bash
353
+ # 1. SSH into your AWS Graviton instance
354
+ ssh -i "your-key.pem" ubuntu@<YOUR-EC2-PUBLIC-IP>
355
+
356
+ # 2. Clone repo and run deployment script
357
+ git clone https://github.com/Adityarajtiwari880/verisight.git
358
+ cd verisight
359
+ chmod +x deploy_graviton.sh
360
+ ./deploy_graviton.sh
361
+
362
+ # 3. Verify hardware acceleration status
363
+ curl http://127.0.0.1:8000/api/aws-status
364
+ ```
365
+
366
+ ---
367
+
368
+ ## 🤝 Contributing
369
+
370
+ We welcome contributions from the computer vision, security, and open-source communities!
371
+ * Please review our [Contributing Guidelines](CONTRIBUTING.md) for branch naming, coding standards, and PR protocols.
372
+ * All PRs must pass `python backend/test_sanity.py` and `npm --prefix frontend run build`.
373
+ * Code of Conduct: [Contributor Covenant 2.1](CODE_OF_CONDUCT.md).
374
+
375
+ ---
376
+
377
+ ## 🔒 Security
378
+
379
+ For security vulnerabilities and responsible disclosure protocols, please see our [Security Policy](SECURITY.md). Do not submit security vulnerabilities through public GitHub issues.
380
+
381
+ ---
382
+
383
+ ## 📖 Citation
384
+
385
+ If you use VeriSight in your research, production systems, or publications, please cite it using our [CITATION.cff](CITATION.cff):
386
+
387
+ ```bibtex
388
+ @software{tiwari2026verisight,
389
+ author = {Tiwari, Aditya Raj},
390
+ title = {VeriSight MCP: Autonomous Physical AI Visual Forensics Engine},
391
+ year = {2026},
392
+ publisher = {GitHub},
393
+ url = {https://github.com/Adityarajtiwari880/verisight}
394
+ }
395
+ ```
396
+
397
+ ---
398
+
399
+ ## 👥 Authors & Acknowledgments
400
+
401
+ * **Aditya Raj Tiwari** — *Lead Architect & Computer Vision Engineer* ([GitHub](https://github.com/Adityarajtiwari880))
402
+ * Special thanks to the **OpenCV Foundation** and **Amazon Web Services (AWS)** for open-source benchmarks and tooling support.
403
+
404
+ ---
405
+
406
+ ## 📜 License
407
+
408
+ Licensed under the **[Apache License, Version 2.0](LICENSE)**. You may freely use, modify, and distribute this software for commercial and private purposes according to the license terms.
409
+
410
+ <!-- mcp-name: io.github.Adityarajtiwari880/verisight -->