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.
- {verisight-2.2.0 → verisight-2.2.2}/PKG-INFO +410 -391
- {verisight-2.2.0 → verisight-2.2.2}/README.md +19 -0
- {verisight-2.2.0 → verisight-2.2.2}/backend/__init__.py +1 -1
- {verisight-2.2.0 → verisight-2.2.2}/backend/agent.py +1 -1
- {verisight-2.2.0 → verisight-2.2.2}/backend/generate_demo_samples.py +24 -24
- {verisight-2.2.0 → verisight-2.2.2}/backend/main.py +4 -4
- {verisight-2.2.0 → verisight-2.2.2}/backend/mcp_server.py +2 -2
- {verisight-2.2.0 → verisight-2.2.2}/pyproject.toml +1 -1
- {verisight-2.2.0 → verisight-2.2.2}/setup.cfg +4 -4
- {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/PKG-INFO +410 -391
- {verisight-2.2.0 → verisight-2.2.2}/LICENSE +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/backend/aws_adapter.py +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/backend/benchmark_runner.py +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/backend/cli.py +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/backend/forensics.py +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/backend/generate_real_life_samples.py +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/backend/test_mcp_tools.py +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/backend/test_sanity.py +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/SOURCES.txt +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/dependency_links.txt +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/entry_points.txt +0 -0
- {verisight-2.2.0 → verisight-2.2.2}/verisight.egg-info/requires.txt +0 -0
- {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.
|
|
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
|
-
[](https://github.com/Adityarajtiwari880/verisight/actions/workflows/ci.yml)
|
|
37
|
-
[](https://m8ven.ai/mcp/adityarajtiwari880-verisight-11ohzr?s=readme)
|
|
38
|
-
[](LICENSE)
|
|
39
|
-
[](pyproject.toml)
|
|
40
|
-
[](https://opencv.org/)
|
|
41
|
-
[](https://modelcontextprotocol.io/)
|
|
42
|
-
[-FF9900?logo=amazon-aws&logoColor=white)](https://aws.amazon.com/ec2/graviton/)
|
|
43
|
-
[](https://nextjs.org/)
|
|
44
|
-
[](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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
*
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
|
233
|
-
|
|
|
234
|
-
| **
|
|
235
|
-
| **
|
|
236
|
-
| **
|
|
237
|
-
| **
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
|
254
|
-
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
├──
|
|
286
|
-
├──
|
|
287
|
-
├──
|
|
288
|
-
|
|
289
|
-
├──
|
|
290
|
-
├──
|
|
291
|
-
├──
|
|
292
|
-
├──
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
cd
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
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
|
+
[](https://github.com/Adityarajtiwari880/verisight/actions/workflows/ci.yml)
|
|
37
|
+
[](https://m8ven.ai/mcp/adityarajtiwari880-verisight-11ohzr?s=readme)
|
|
38
|
+
[](LICENSE)
|
|
39
|
+
[](pyproject.toml)
|
|
40
|
+
[](https://opencv.org/)
|
|
41
|
+
[](https://modelcontextprotocol.io/)
|
|
42
|
+
[-FF9900?logo=amazon-aws&logoColor=white)](https://aws.amazon.com/ec2/graviton/)
|
|
43
|
+
[](https://nextjs.org/)
|
|
44
|
+
[](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 -->
|