Skip to content

Repository files navigation

OmniSafe: Multimodal Threat Classification Core

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.

🧠 System Architecture

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.

⚡ Key Technical Innovations

  1. 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.
  2. Long-Context Processing: Implemented "First + Last" token chunking to preserve early psychological grooming and late-stage financial demands without exceeding transformer memory limits.
  3. Class Imbalance Handling: Addressed real-world threat rarity through class weighting and synthetic augmentation, achieving a Macro-F1 score of 0.89.

🛠️ Tech Stack

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

🚀 Quick Start

Frontend

cd frontend
npm install
npm run dev
# Runs on http://localhost:5173

About

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.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages