uaide-backend / src /data /mockAnalysis.js
ATS-27's picture
Upload folder using huggingface_hub
af980d7 verified
// Mock analysis result for demo purposes
export const MOCK_IMAGE_RESULT = {
type: 'image',
filename: 'portrait_sample.jpg',
filesize: '2.4 MB',
resolution: '1024 × 1024 px',
format: 'JPEG',
analysisId: 'UAD-2026-031501',
processingTime: '1.84s',
verdict: 'ai_generated', // 'authentic' | 'ai_generated' | 'suspect'
confidenceScore: 94.7,
modelBreakdown: [
{ model: 'EfficientNet-B4 (GAN)', score: 96.1, weight: 0.35 },
{ model: 'Xception (Diffusion)', score: 93.8, weight: 0.30 },
{ model: 'ViT Forensic', score: 94.5, weight: 0.25 },
{ model: 'Frequency CNN', score: 93.2, weight: 0.10 },
],
gradcam: {
// Simulated heatmap regions (x%, y%, w%, h%, intensity 0–1)
regions: [
{ x: 42, y: 18, w: 24, h: 20, intensity: 0.95, label: 'Eye region' },
{ x: 38, y: 52, w: 28, h: 14, intensity: 0.82, label: 'Mouth boundary' },
{ x: 20, y: 30, w: 18, h: 28, intensity: 0.61, label: 'Left ear artifact' },
{ x: 62, y: 28, w: 16, h: 26, intensity: 0.54, label: 'Hair boundary' },
{ x: 45, y: 68, w: 22, h: 18, intensity: 0.43, label: 'Chin contour' },
],
},
artifacts: [
{ id: 1, type: 'GAN Fingerprint', severity: 'critical', detail: 'Spectral artifacts detected in mid-frequency band (8–16 kHz equivalent)' },
{ id: 2, type: 'Eye Coherence', severity: 'high', detail: 'Asymmetric iris texture inconsistency — characteristic of StyleGAN2 generator' },
{ id: 3, type: 'Skin Texture', severity: 'high', detail: 'Over-smoothed pore structure in T-zone region (forehead, nose bridge)' },
{ id: 4, type: 'Background Blend', severity: 'medium', detail: 'Boundary aliasing at hair–background transition edge' },
{ id: 5, type: 'EXIF Metadata', severity: 'low', detail: 'No camera make/model; GPS and timestamp fields absent' },
],
fft: {
peakFrequency: '14.3 Hz equiv.',
spectralAnomaly: true,
anomalyBands: ['8–16 band', '32–64 band'],
dctCoefficients: 'Elevated 2nd-order DCT peak at (0,8) — GAN noise signature',
noisePattern: 'Periodic grid artifact (16px interval) consistent with upsampling artifact',
},
metadata: {
colorSpace: 'sRGB',
bitDepth: '8-bit',
compressionRatio: '4.2:1',
iccProfile: 'None',
softwareTag: 'Not present',
cameraModel: 'Not present',
gpsData: 'Not present',
creationDate: 'Not present',
lastModified: '2026-03-15T09:44:12Z',
},
};
export const MOCK_VIDEO_RESULT = {
type: 'video',
filename: 'interview_clip.mp4',
filesize: '18.7 MB',
resolution: '1280 × 720 px',
format: 'MP4 / H.264',
duration: '00:00:23',
frameRate: '30 fps',
totalFrames: 690,
analysisId: 'UAD-2026-031502',
processingTime: '12.3s',
verdict: 'suspect',
confidenceScore: 71.2,
modelBreakdown: [
{ model: 'Temporal CNN', score: 74.1, weight: 0.40 },
{ model: 'Face Reenactment Net', score: 68.9, weight: 0.30 },
{ model: 'Audio-Visual Sync', score: 70.5, weight: 0.30 },
],
gradcam: {
regions: [
{ x: 38, y: 15, w: 28, h: 22, intensity: 0.88, label: 'Periorbital region' },
{ x: 35, y: 50, w: 32, h: 16, intensity: 0.72, label: 'Lip movement' },
{ x: 15, y: 20, w: 20, h: 35, intensity: 0.45, label: 'Jaw boundary' },
],
},
timeline: {
flaggedSegments: [
{ start: 2.1, end: 5.8, severity: 'high', reason: 'Lip-sync desynchronization', frames: [63, 64, 65, 72, 73, 74, 140, 141, 174] },
{ start: 9.4, end: 11.2, severity: 'critical', reason: 'Face swap boundary artifact', frames: [282, 283, 310, 311, 336] },
{ start: 16.0, end: 18.9, severity: 'medium', reason: 'Temporal flickering in eye region', frames: [480, 481, 510, 511, 540, 567] },
],
cleanSegments: [
{ start: 0, end: 2.1 },
{ start: 5.8, end: 9.4 },
{ start: 11.2, end: 16.0 },
{ start: 18.9, end: 23.0 },
],
},
artifacts: [
{ id: 1, type: 'Temporal Inconsistency', severity: 'critical', detail: 'Frame-to-frame coherence drop at t=9.4s–11.2s (face swap splice detected)' },
{ id: 2, type: 'Lip-Sync Offset', severity: 'high', detail: 'Audio-visual offset of 83ms detected — exceeds 40ms natural threshold' },
{ id: 3, type: 'Blinking Pattern', severity: 'medium', detail: 'Reduced blink rate (avg 4.2/min vs normal 15–20/min) consistent with reenactment' },
],
fft: {
peakFrequency: '9.7 Hz equiv.',
spectralAnomaly: true,
anomalyBands: ['4–8 band', '16–32 band'],
dctCoefficients: 'Inter-frame DCT residual spike at t=9.4s',
noisePattern: 'Temporal noise pattern inconsistency at splice boundaries',
},
metadata: {
colorSpace: 'YUV 4:2:0',
bitDepth: '8-bit',
compressionRatio: '60:1',
audioCodec: 'AAC 128kbps',
softwareTag: 'Not present',
cameraModel: 'Not present',
gpsData: 'Not present',
creationDate: 'Not present',
lastModified: '2026-03-14T22:11:04Z',
},
};