LPX
commited on
Commit
·
9fe5b90
1
Parent(s):
b919494
- app_mcp.py +14 -10
app_mcp.py
CHANGED
@@ -18,7 +18,7 @@ from utils.minmax import preprocess as minmax_preprocess
|
|
18 |
from utils.ela import genELA as ELA
|
19 |
from utils.wavelet import wavelet_blocking_noise_estimation
|
20 |
from utils.bitplane import bit_plane_extractor
|
21 |
-
from utils.exif import exif_full_dump
|
22 |
|
23 |
from forensics.registry import register_model, MODEL_REGISTRY, ModelEntry
|
24 |
|
@@ -409,8 +409,11 @@ with gr.Blocks(css="#post-gallery { overflow: hidden !important;} .grid-wrap{ ov
|
|
409 |
fn=wavelet_blocking_noise_estimation,
|
410 |
inputs=[gr.Image(type="pil"), gr.Slider(1, 32, value=8, step=1, label="Block Size")],
|
411 |
outputs=gr.Image(type="pil"),
|
412 |
-
|
|
|
413 |
)
|
|
|
|
|
414 |
with gr.Tab("Bit Plane Values"):
|
415 |
gr.Interface(
|
416 |
fn=bit_plane_extractor,
|
@@ -421,15 +424,16 @@ with gr.Blocks(css="#post-gallery { overflow: hidden !important;} .grid-wrap{ ov
|
|
421 |
gr.Dropdown(["Disabled", "Median", "Gaussian"], label="Filter", value="Disabled")
|
422 |
],
|
423 |
outputs=gr.Image(type="pil"),
|
424 |
-
|
425 |
-
|
426 |
-
with gr.Tab("EXIF Full Dump"):
|
427 |
-
gr.Interface(
|
428 |
-
fn=exif_full_dump,
|
429 |
-
inputs=gr.Image(type="pil"),
|
430 |
-
outputs=gr.JSON(),
|
431 |
-
description="Extract all EXIF metadata from the uploaded image."
|
432 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
|
434 |
# --- MCP-Ready Launch ---
|
435 |
if __name__ == "__main__":
|
|
|
18 |
from utils.ela import genELA as ELA
|
19 |
from utils.wavelet import wavelet_blocking_noise_estimation
|
20 |
from utils.bitplane import bit_plane_extractor
|
21 |
+
# from utils.exif import exif_full_dump / currently not working
|
22 |
|
23 |
from forensics.registry import register_model, MODEL_REGISTRY, ModelEntry
|
24 |
|
|
|
409 |
fn=wavelet_blocking_noise_estimation,
|
410 |
inputs=[gr.Image(type="pil"), gr.Slider(1, 32, value=8, step=1, label="Block Size")],
|
411 |
outputs=gr.Image(type="pil"),
|
412 |
+
title="Wavelet-Based Noise Analysis",
|
413 |
+
description="Analyzes image noise patterns using wavelet decomposition. This tool helps detect compression artifacts and artificial noise patterns that may indicate image manipulation. Higher noise levels in specific regions can reveal areas of potential tampering."
|
414 |
)
|
415 |
+
|
416 |
+
|
417 |
with gr.Tab("Bit Plane Values"):
|
418 |
gr.Interface(
|
419 |
fn=bit_plane_extractor,
|
|
|
424 |
gr.Dropdown(["Disabled", "Median", "Gaussian"], label="Filter", value="Disabled")
|
425 |
],
|
426 |
outputs=gr.Image(type="pil"),
|
427 |
+
title="Bit Plane Analysis",
|
428 |
+
description="Extracts and visualizes individual bit planes from different color channels. This forensic tool helps identify hidden patterns and artifacts in image data that may indicate manipulation. Different bit planes can reveal inconsistencies in image processing or editing."
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
)
|
430 |
+
# with gr.Tab("EXIF Full Dump"):
|
431 |
+
# gr.Interface(
|
432 |
+
# fn=exif_full_dump,
|
433 |
+
# inputs=gr.Image(type="pil"),
|
434 |
+
# outputs=gr.JSON(),
|
435 |
+
# description="Extract all EXIF metadata from the uploaded image."
|
436 |
+
# )
|
437 |
|
438 |
# --- MCP-Ready Launch ---
|
439 |
if __name__ == "__main__":
|