/** * UAIDE — Forensic Report Generator * Produces a self-contained, print-ready HTML report blob for download. */ const VERDICT_LABEL = { authentic: 'AUTHENTIC', ai_generated: 'AI-GENERATED', suspect: 'SUSPECT / INCONCLUSIVE', }; const VERDICT_COLOR = { authentic: '#00c67a', ai_generated: '#ff4757', suspect: '#f59e0b', }; const SEV_COLOR = { critical: '#ff4757', high: '#f59e0b', medium: '#7c3aed', low: '#8896ab', }; function escapeHtml(str) { return String(str ?? '—') .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"'); } function modelBreakdownRows(models) { return models.map(m => `
Total flagged segments: ${result.timeline.flaggedSegments.length} | Clean segments: ${result.timeline.cleanSegments.length}
| Severity | Anomaly | Timestamp | Frames |
|---|
${escapeHtml(result.filename)} · Analysis ID: ${escapeHtml(result.analysisId)}
Verdict: ${verdictLabel}
${result.verdict === 'authentic' ? 'Multi-model ensemble analysis found no significant generative artifacts. Content is consistent with authentic human-captured media.' : result.verdict === 'ai_generated' ? 'Multi-model ensemble analysis detected strong generative artifacts consistent with GAN or diffusion model synthesis. Content is highly likely to be AI-generated.' : 'Multi-model ensemble analysis produced inconclusive results. The media exhibits some characteristics of synthetic generation but does not conclusively meet the threshold for either verdict. Manual expert review is advised.'}
Video preview not embedded in static report
File: ${escapeHtml(result.filename)} · ${escapeHtml(result.duration)} · ${result.totalFrames} frames
${escapeHtml(result.filename)} · ${escapeHtml(result.resolution)} · ${escapeHtml(result.filesize)}
The following forensic deep learning models were run in ensemble. Each model independently scores the likelihood of AI generation; results are weighted and fused into the final confidence score.
| Model | Score | Confidence Bar | Weight |
|---|
Gradient-weighted Class Activation Mapping (Grad-CAM) was applied to highlight spatial regions in the media that contributed most to the AI-generation classification decision.
| Region | Intensity | Level | Bounding Box |
|---|
| Severity | Type | Detail |
|---|
| Field | Value |
|---|