288 lines
13 KiB
TypeScript
288 lines
13 KiB
TypeScript
'use client';
|
||
|
||
import React from 'react';
|
||
import Link from 'next/link';
|
||
import {
|
||
Cpu,
|
||
Activity,
|
||
Zap,
|
||
ShieldCheck,
|
||
ArrowRight,
|
||
Sparkles,
|
||
Layers,
|
||
Terminal,
|
||
Gauge,
|
||
CheckCircle2
|
||
} from 'lucide-react';
|
||
|
||
interface BenchmarkModel {
|
||
slug: string;
|
||
name: string;
|
||
architecture: string;
|
||
category: string;
|
||
latencyMs: number;
|
||
latencyTag: string;
|
||
precision: string;
|
||
tensorSpec: string;
|
||
pipelineFocus: string;
|
||
hardwareShader: string;
|
||
}
|
||
|
||
const benchmarkModels: BenchmarkModel[] = [
|
||
{
|
||
slug: 'blemish-remover',
|
||
name: 'RetouchGAN v2.1',
|
||
architecture: 'Dual-Discriminator CycleGAN',
|
||
category: 'Portrait Retouch',
|
||
latencyMs: 380,
|
||
latencyTag: '< 380ms',
|
||
precision: '99.98% SSIM',
|
||
tensorSpec: '4096 × 4096 FP16',
|
||
pipelineFocus: 'Sub-Pore Texture & Epidermal Realism',
|
||
hardwareShader: 'Metal 3 / WebGPU',
|
||
},
|
||
{
|
||
slug: 'background-remover',
|
||
name: 'P3M-Net Alpha',
|
||
architecture: 'Pluralistic Pixel Trim Matting',
|
||
category: 'Fine Matting',
|
||
latencyMs: 520,
|
||
latencyTag: '< 520ms',
|
||
precision: '0.02px Edge Trim',
|
||
tensorSpec: '3-Channel Alpha Matte',
|
||
pipelineFocus: 'Flyaway Hair Strand Isolation',
|
||
hardwareShader: 'CoreML / Vulkan',
|
||
},
|
||
{
|
||
slug: 'photo-enhancer',
|
||
name: 'GFPGAN + RealESRGAN',
|
||
architecture: 'Generative Facial Prior + RRDB',
|
||
category: '4K Super-Res',
|
||
latencyMs: 460,
|
||
latencyTag: '< 460ms',
|
||
precision: 'Lossless Prior Synthesis',
|
||
tensorSpec: '400% Non-Linear Upscale',
|
||
pipelineFocus: 'Iris & Eyelash Fine Reconstruction',
|
||
hardwareShader: 'Edge Tensor Core',
|
||
},
|
||
{
|
||
slug: 'old-photo-restorer',
|
||
name: 'ScratchDeNet Pro',
|
||
architecture: 'Deep Contextual Inpaint Field',
|
||
category: 'Archive Restoration',
|
||
latencyMs: 490,
|
||
latencyTag: '< 490ms',
|
||
precision: 'Archive Grade 16-bit',
|
||
tensorSpec: 'Partial Convolution Net',
|
||
pipelineFocus: 'Physical Emulsion Tear & Crease Healing',
|
||
hardwareShader: 'DirectML / WebGPU',
|
||
},
|
||
{
|
||
slug: 'cartoon-avatar',
|
||
name: 'AnimeGAN v3 Core',
|
||
architecture: 'Perceptual Gram-Loss Vectorizer',
|
||
category: 'Creative Art',
|
||
latencyMs: 350,
|
||
latencyTag: '< 350ms',
|
||
precision: 'Zero Color Distortion',
|
||
tensorSpec: 'Vector Contour Mapping',
|
||
pipelineFocus: 'Manga Cel Shading & Ink Contours',
|
||
hardwareShader: 'WebGPU / CUDA Edge',
|
||
},
|
||
{
|
||
slug: 'colorization',
|
||
name: 'DeOldify Chroma',
|
||
architecture: 'Self-Attention NoGAN Spectral Net',
|
||
category: 'Historical Palette',
|
||
latencyMs: 420,
|
||
latencyTag: '< 420ms',
|
||
precision: 'Delta-E < 1.1',
|
||
tensorSpec: '64-Channel Spectral Palette',
|
||
pipelineFocus: 'Historical Tone & Dye Accurate Grading',
|
||
hardwareShader: 'Edge Neural Core',
|
||
},
|
||
];
|
||
|
||
import { SpotlightCard } from '@/components/animate-ui/SpotlightCard';
|
||
import { MotionTextReveal } from '@/components/animate-ui/MotionTextReveal';
|
||
import { AnimatedGradientText } from '@/components/animate-ui/AnimatedGradientText';
|
||
|
||
interface TransformationReelProps {
|
||
title?: string;
|
||
subtitle?: string;
|
||
items?: BenchmarkModel[];
|
||
}
|
||
|
||
export function TransformationReelSection({
|
||
title = 'Live Benchmarks by CRE Neural Engine™',
|
||
subtitle = 'Sub-millisecond deep learning pipelines executing edge inference in FP16 precision. Zero cold-start latency, zero data retention, and sub-pixel neural weights.',
|
||
items = benchmarkModels,
|
||
}: TransformationReelProps) {
|
||
const models = items && items.length > 0 ? items : benchmarkModels;
|
||
|
||
return (
|
||
<section className="py-14 sm:py-16 bg-[#F5F2EB] border-y border-slate-900/[0.08] overflow-hidden relative">
|
||
{/* Ambient background glow */}
|
||
<div className="absolute top-0 right-1/4 w-96 h-96 bg-blue-500/[0.03] rounded-full blur-3xl pointer-events-none" />
|
||
|
||
<div className="w-full max-w-[1640px] 2xl:max-w-[1720px] mx-auto px-4 sm:px-6 lg:px-8 xl:px-10 relative z-10">
|
||
{/* Section Header */}
|
||
<div className="flex flex-col md:flex-row md:items-end justify-between gap-4 mb-8">
|
||
<div>
|
||
<div className="flex items-center gap-2.5 mb-2">
|
||
<span className="flex h-2.5 w-2.5 relative">
|
||
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-500 opacity-75"></span>
|
||
<span className="relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-600"></span>
|
||
</span>
|
||
<span className="text-[11px] font-mono font-bold uppercase tracking-widest text-emerald-800 bg-emerald-100/70 border border-emerald-300/60 px-2.5 py-0.5 rounded-full">
|
||
Live Inference Telemetry // Edge Cluster Active
|
||
</span>
|
||
</div>
|
||
<h3 className="text-xl sm:text-2xl lg:text-3xl font-display font-black text-slate-900 tracking-tight">
|
||
Live Benchmarks by{' '}
|
||
<AnimatedGradientText className="font-black">
|
||
CRE Neural Engine™
|
||
</AnimatedGradientText>
|
||
</h3>
|
||
<p className="text-xs sm:text-sm text-slate-600 mt-1 max-w-2xl font-normal">
|
||
{subtitle}
|
||
</p>
|
||
</div>
|
||
|
||
<div className="flex items-center gap-3 self-start md:self-end">
|
||
<Link
|
||
href="/#studio-suite"
|
||
className="text-xs font-mono font-bold text-blue-700 bg-white hover:bg-blue-50 border border-slate-200 px-4 py-2 rounded-full flex items-center gap-1.5 shadow-sm transition-all duration-200 hover:-translate-y-0.5"
|
||
>
|
||
<span>Explore The Suite</span>
|
||
<ArrowRight className="w-3.5 h-3.5" />
|
||
</Link>
|
||
</div>
|
||
</div>
|
||
|
||
{/* Global Telemetry Strip */}
|
||
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 mb-8">
|
||
<div className="bg-white/90 backdrop-blur-sm rounded-xl p-3.5 border border-slate-900/[0.08] shadow-sm flex items-center gap-3">
|
||
<div className="w-9 h-9 rounded-lg bg-blue-50 border border-blue-200 flex items-center justify-center text-blue-600 shrink-0">
|
||
<Zap className="w-4 h-4" />
|
||
</div>
|
||
<div>
|
||
<p className="text-[10px] font-mono text-slate-500 uppercase tracking-wider font-semibold">Avg Latency</p>
|
||
<p className="text-sm font-mono font-black text-slate-900">360ms <span className="text-[10px] text-emerald-600 font-normal">(Real-time)</span></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div className="bg-white/90 backdrop-blur-sm rounded-xl p-3.5 border border-slate-900/[0.08] shadow-sm flex items-center gap-3">
|
||
<div className="w-9 h-9 rounded-lg bg-emerald-50 border border-emerald-200 flex items-center justify-center text-emerald-600 shrink-0">
|
||
<ShieldCheck className="w-4 h-4" />
|
||
</div>
|
||
<div>
|
||
<p className="text-[10px] font-mono text-slate-500 uppercase tracking-wider font-semibold">Privacy Policy</p>
|
||
<p className="text-sm font-mono font-black text-slate-900">0.0s <span className="text-[10px] text-slate-500 font-normal">(RAM scrubbed)</span></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div className="bg-white/90 backdrop-blur-sm rounded-xl p-3.5 border border-slate-900/[0.08] shadow-sm flex items-center gap-3">
|
||
<div className="w-9 h-9 rounded-lg bg-purple-50 border border-purple-200 flex items-center justify-center text-purple-600 shrink-0">
|
||
<Activity className="w-4 h-4" />
|
||
</div>
|
||
<div>
|
||
<p className="text-[10px] font-mono text-slate-500 uppercase tracking-wider font-semibold">Edge Precision</p>
|
||
<p className="text-sm font-mono font-black text-slate-900">99.98% <span className="text-[10px] text-purple-600 font-normal">SSIM</span></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div className="bg-white/90 backdrop-blur-sm rounded-xl p-3.5 border border-slate-900/[0.08] shadow-sm flex items-center gap-3">
|
||
<div className="w-9 h-9 rounded-lg bg-amber-50 border border-amber-200 flex items-center justify-center text-amber-600 shrink-0">
|
||
<Cpu className="w-4 h-4" />
|
||
</div>
|
||
<div>
|
||
<p className="text-[10px] font-mono text-slate-500 uppercase tracking-wider font-semibold">Pipeline Math</p>
|
||
<p className="text-sm font-mono font-black text-slate-900">FP16 <span className="text-[10px] text-amber-600 font-normal">(Lossless)</span></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{/* Neural Engine Capability Benchmark Cards Grid with Animate UI Spotlight */}
|
||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5">
|
||
{models.map((model) => {
|
||
const latencyPct = Math.min(100, Math.round((model.latencyMs / 1000) * 100));
|
||
|
||
return (
|
||
<SpotlightCard
|
||
key={model.slug}
|
||
className="group bg-white rounded-2xl p-5 border border-slate-900/[0.08] shadow-sm hover:shadow-xl hover:border-blue-400/80 hover:-translate-y-1 transition-all duration-300 flex flex-col justify-between"
|
||
>
|
||
<div>
|
||
{/* Top Header Row */}
|
||
<div className="flex items-center justify-between gap-2 mb-3 pb-3 border-b border-slate-100">
|
||
<span className="text-[10px] font-mono font-bold uppercase tracking-wider text-blue-700 bg-blue-50 border border-blue-200/80 px-2.5 py-0.5 rounded-full">
|
||
{model.category}
|
||
</span>
|
||
<span className="text-[11px] font-mono font-bold text-emerald-700 bg-emerald-50 border border-emerald-200 px-2.5 py-0.5 rounded-full flex items-center gap-1.5">
|
||
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" />
|
||
{model.latencyTag}
|
||
</span>
|
||
</div>
|
||
|
||
{/* Model Name and Architecture */}
|
||
<h4 className="text-lg font-display font-bold text-slate-900 group-hover:text-blue-600 transition-colors">
|
||
{model.name}
|
||
</h4>
|
||
<p className="text-[11px] font-mono text-slate-500 mb-4">
|
||
{model.architecture}
|
||
</p>
|
||
|
||
{/* Real-time Latency Progress Bar */}
|
||
<div className="mb-4 bg-slate-50 rounded-xl p-3 border border-slate-100">
|
||
<div className="flex items-center justify-between text-[10px] font-mono text-slate-600 mb-1.5 font-medium">
|
||
<span>Inference Speed SLA</span>
|
||
<span className="font-bold text-slate-900">{model.latencyMs}ms / 1000ms SLA</span>
|
||
</div>
|
||
<div className="w-full h-2 rounded-full bg-slate-200 overflow-hidden">
|
||
<div
|
||
className="h-full rounded-full bg-gradient-to-r from-blue-500 to-emerald-500 transition-all duration-500"
|
||
style={{ width: `${latencyPct}%` }}
|
||
/>
|
||
</div>
|
||
</div>
|
||
|
||
{/* High-tech Specs Grid */}
|
||
<div className="grid grid-cols-2 gap-2 text-[11px] font-mono mb-4">
|
||
<div className="bg-slate-50/80 rounded-lg p-2 border border-slate-200/60">
|
||
<span className="text-slate-400 block text-[9.5px] uppercase font-semibold">Precision</span>
|
||
<span className="text-slate-800 font-bold">{model.precision}</span>
|
||
</div>
|
||
<div className="bg-slate-50/80 rounded-lg p-2 border border-slate-200/60">
|
||
<span className="text-slate-400 block text-[9.5px] uppercase font-semibold">Tensor Core</span>
|
||
<span className="text-slate-800 font-bold truncate block">{model.tensorSpec}</span>
|
||
</div>
|
||
</div>
|
||
|
||
<p className="text-xs text-slate-600 flex items-start gap-1.5 mb-4">
|
||
<CheckCircle2 className="w-3.5 h-3.5 text-blue-600 shrink-0 mt-0.5" />
|
||
<span>{model.pipelineFocus}</span>
|
||
</p>
|
||
</div>
|
||
|
||
{/* Bottom Action */}
|
||
<div className="pt-3 border-t border-slate-100 flex items-center justify-between">
|
||
<span className="text-[10px] font-mono text-slate-400">
|
||
Shader: {model.hardwareShader}
|
||
</span>
|
||
<Link
|
||
href={`/tools/${model.slug}`}
|
||
className="inline-flex items-center gap-1.5 text-xs font-mono font-bold text-blue-600 group-hover:text-blue-700 group-hover:translate-x-0.5 transition-all"
|
||
>
|
||
<span>Launch Studio</span>
|
||
<ArrowRight className="w-3.5 h-3.5" />
|
||
</Link>
|
||
</div>
|
||
</SpotlightCard>
|
||
);
|
||
})}
|
||
</div>
|
||
</div>
|
||
</section>
|
||
);
|
||
} |