// src/components/GradCamViewer.jsx export default function GradCamViewer({ gradcamImage, filename }) { const hasImage = gradcamImage && gradcamImage.length > 0; return (

Grad-CAM Heatmap

Gradient-weighted Class Activation Mapping — highlights regions influencing the deepfake decision

{hasImage ? ( Grad-CAM saliency heatmap highlighting manipulated facial regions ) : (

{filename === 'demo_video.mp4' ? 'Grad-CAM heatmap is generated from real video frames. Run the backend with an actual video file to see facial manipulation highlighting.' : 'No heatmap data returned by the server. The backend may not have Grad-CAM enabled.'}

{/* Placeholder visual illustration */}
)}
{/* Legend */} {hasImage && (
High activation (suspicious)
Medium activation
Low activation
)} {!hasImage && (

Heatmaps available when backend returns gradcam_image in response

)}
); }