A high-performance, web-based forensic platform that protects users from digital deception (Sextortion, Romance Scams, Blackmail) by analyzing profile metadata, deepfake imagery, and conversation semantics in real-time.
OmniSafe utilizes a Late Fusion Architecture, processing multiple disparate data streams asynchronously before fusing them into a calibrated, explainable risk score.
- Visual Forensics: PyTorch liveness models detect Generative Adversarial Network (GAN) artifacts and structural anomalies in profile photos to catch synthetic identities.
- Semantic NLP: A fine-tuned DistilBERT transformer analyzes conversation context, mapping linguistic patterns to specific threat vectors (Financial Scam vs. Coercion).
- Explainable AI (XAI): SHAP (SHapley Additive exPlanations) game theory assigns mathematical risk weights to individual sub-word tokens, rendering a "glass-box" UI that highlights manipulative language.
- Deterministic Heuristics: A hardcoded regex and behavioral engine acts as a zero-day safety net, catching specific script templates, bot-farm username generation (entropy analysis), and high-risk emoji clustering.
- CPU-Optimized Inference: PyTorch models exported to ONNX C++ Runtime with INT8 Quantization, reducing model footprint from 250MB to 65MB and achieving sub-2-second end-to-end latency on standard hardware.
- Long-Context Processing: Implemented "First + Last" token chunking to preserve early psychological grooming and late-stage financial demands without exceeding transformer memory limits.
- Class Imbalance Handling: Addressed real-world threat rarity through class weighting and synthetic augmentation, achieving a Macro-F1 score of 0.89.
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Tailwind CSS, shadcn/ui, Recharts |
| Backend Core | FastAPI, Uvicorn, Pydantic, Python 3.12 |
| Machine Learning | PyTorch, ONNX Runtime, DistilBERT, SHAP |
| Computer Vision | EasyOCR (Text Extraction), GAN Liveness Models |
| State & Routing | React Context, React Router v6 |
cd frontend
npm install
npm run dev
# Runs on http://localhost:5173