import React from 'react'; import { Flame, Search, Info, ZoomIn } from 'lucide-react'; import TestDefinition from '../ui/TestDefinition'; const API_BASE = import.meta.env.VITE_API_URL || 'http://127.0.0.1:8000'; const VisualTab = ({ result, getScoreColor, setZoomedImage, }) => { return ( <>
{/* Neural Net Result Panel */}
Neural Network Analysis
EfficientNet-B4 Spatial Processing
EfficientNet-B4 Anomaly
{(result.nn_score * 100).toFixed(1)}%

The core neural network scans the raw pixels of the image looking for deepfake artifacts like blending errors, unnatural textures, and warping.

What this score means: A score of {(result.nn_score * 100).toFixed(1)}% indicates the base neural network's raw assessment of synthetic manipulation, before any other physical or biological forensic sensors are consulted.

{/* GradCAM Visualization Panel */}
GradCAM Localization
Where the neural network is looking

Coarse Localization

{ if (result.heatmaps && result.heatmaps.length > 0) { setZoomedImage(`${API_BASE}/${result.heatmaps[0]}`); } }} > {result.heatmaps && result.heatmaps.length > 0 ? ( GradCAM Heatmap { e.target.style.display = 'none'; }} /> ) : (

Heatmap unavailable

)}
{result.heatmaps && result.heatmaps.length > 1 && (

Pixel Gradients

setZoomedImage(`${API_BASE}/${result.heatmaps[1]}`)} > Guided GradCAM Heatmap { e.target.style.display = 'none'; }} />
)}
Red/warm areas = high neural network attention.
); }; export default React.memo(VisualTab);