"Turning background noise into preventive defense insight."
Designed for border surveillance and high-security perimeters where threats emerge gradually.
Traditional surveillance systems are REACTIVE:
- They alert you AFTER something bad happens
- Binary alerts: "NORMAL" or "ALARM"
- High false positive rate causes alert fatigue
- Misses gradual threats that evolve slowly
Real-world threats often emerge GRADUALLY:
- Border infiltrations happen in stages
- Insider threats develop over weeks
- Equipment fails progressively
- Crowd tension builds before incidents
DRISHTI detects threats BEFORE they become obvious.
Instead of asking "Is this instant abnormal?" (reactive), we ask:
"Is behavior gradually changing from what's normal?" (proactive)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DRISHTI PIPELINE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ๐น VIDEO โโโโโโ ๐ฌ FEATURE โโโโโโ ๐ง LSTM-VAE โ โ
โ โ INGESTION โ โ EXTRACTION โ โ TEMPORAL LEARNING โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โ 24 Behavioral Features โ โ
โ โ โข Motion Energy โ โ
โ โ โข Optical Flow โ โ
โ โ โข Scene Entropy โ โ
โ โ โข Direction Patterns โ โ
โ โ โ โ
โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ ๐ DRIFT INTELLIGENCE โ โ
โ โ โ โข Threat Deviation Index (TDI) โ โ
โ โ โ โข KL Divergence Analysis โ โ
โ โ โ โข EWMA Smoothed Scoring โ โ
โ โ โ โข Trend Detection (โ โ โ) โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ ๐ฏ RISK ZONE CLASSIFIER โ โ
โ โ โ ๐ข NORMAL โ Standard monitoring โ โ
โ โ โ ๐ก WATCH โ Increase attention โ โ
โ โ โ ๐ WARNING โ Alert response team โ โ
โ โ โ ๐ด CRITICALโ Immediate action โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ ๐ฅ๏ธ INTELLIGENCE DASHBOARD โ โ
โ โ โ โข Real-time TDI visualization โ โ
โ โ โ โข Feature attribution (XAI) โ โ
โ โ โ โข Human-in-the-loop feedback โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Feature | Description |
|---|---|
| ๐ Unsupervised Learning | Train only on normal behavior - no labeled anomalies needed |
| ๐ง LSTM-VAE Architecture | Pure NumPy implementation - temporal normality modeling |
| ๏ฟฝ Ensemble Detection | LSTM-VAE + Isolation Forest + One-Class SVM + LOF |
| ๐ Threat Deviation Index | 0-100 scale for intuitive operator understanding |
| ๐ฏ 4-Tier Risk Zones | Graduated alerts reduce fatigue (Normal โ Watch โ Warning โ Critical) |
| ๐ท๏ธ Anomaly Classification | Categorize threats (Loitering, Intrusion, Crowd, etc.) |
| ๐ 3D Latent Visualization | Visualize behavioral trajectories in latent space |
| ๐ Explainable AI (XAI) | Shows WHICH features are causing drift |
| ๐จ Incident Logging | Track, export, and analyze all alerts |
| ๐ฎ TDI Forecasting | Predict future threat levels |
| ๐ค Human-in-the-Loop | Operators provide feedback for baseline adaptation |
| ๐น Real Video Support | Works with UCSD dataset and custom surveillance footage |
- Python 3.10 or higher
- Git
# 1. Clone the repository
git clone https://github.com/YourUsername/Noise_floor_project.git
cd Noise_floor_project
# 2. Create virtual environment
python -m venv .venv
# 3. Activate virtual environment
# Windows PowerShell:
.\.venv\Scripts\Activate.ps1
# Windows CMD:
.\.venv\Scripts\activate.bat
# Linux/Mac:
source .venv/bin/activate
# 4. Install dependencies
pip install -r requirements.txt# Launch the main dashboard (RECOMMENDED)
streamlit run dashboard/app_main.pyThe dashboard opens at http://localhost:8501
| Tab | Description |
|---|---|
| ๐ Intelligence Dashboard | Main TDI display, risk zones, feature attribution, AI explanations |
| ๐ง AI Ensemble | Multi-model detection votes, 3D latent space, anomaly classification |
| ๐น Camera Grid | 6-camera surveillance view with live UCSD frames |
| ๐จ Incident Log | Full history of all alerts with export capability |
| ๐ Analytics | Session statistics, zone distribution, data export |
| Mode | Description | Use Case |
|---|---|---|
| ๐น UCSD Real Video | Processes actual surveillance footage from UCSD dataset | Production demo, validation |
| ๐ฌ Synthetic Demo | Uses generated data with controlled drift | Quick testing, concept demo |
- 0-25: ๐ข NORMAL - All good
- 25-50: ๐ก WATCH - Something's slightly off
- 50-75: ๐ WARNING - Confirmed drift, pay attention
- 75-100: ๐ด CRITICAL - Take action immediately
- โ RISING - Threat is increasing
- โ STABLE - No significant change
- โ FALLING - Returning to normal
- ๐ง Loitering - Prolonged stationary activity
โ ๏ธ Intrusion - Boundary crossing detected- ๐ฅ Crowd Formation - Unusual gathering
- ๐ Erratic Movement - Abnormal motion patterns
- ๐ฏ Coordinated Activity - Synchronized movement
- โก Speed Anomaly - Unusual velocity
- โฉ๏ธ Direction Anomaly - Unusual direction pattern
Noise_floor_project/
โโโ ๐ dashboard/
โ โโโ app_main.py # Main dashboard (USE THIS)
โ
โโโ ๐ src/
โ โโโ lstm_vae.py # LSTM-VAE temporal model
โ โโโ drift_intelligence.py # TDI computation engine
โ โโโ ensemble_detector.py # Multi-model ensemble
โ โโโ advanced_ai.py # Anomaly classification
โ โโโ risk_zones.py # 4-tier zone classifier
โ โโโ behavioral_features.py # 24 feature definitions
โ โโโ video_features.py # Real video processing
โ โโโ explainability.py # XAI attribution
โ โโโ incident_logger.py # Incident tracking
โ โโโ feedback_system.py # Human-in-the-loop
โ โโโ utils.py # Utility functions
โ
โโโ ๐ data/
โ โโโ UCSD_Anomaly_Dataset.v1p2/
โ โโโ UCSDped1/
โ โ โโโ Train/ # Normal pedestrian videos
โ โ โโโ Test/ # Contains anomalies
โ โโโ UCSDped2/
โ
โโโ ๐ incident_logs/ # Logged incidents
โโโ ๐ feedback_data/ # Operator feedback logs
โโโ ๐ baseline_data/ # Frozen baseline snapshots
โ
โโโ config.py # Configuration settings
โโโ main.py # CLI entry point
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
UCSD Train Data (Normal pedestrians)
โ Optical Flow Extraction
โ 24 Behavioral Features
โ LSTM-VAE Training
โ Ensemble Detector Fitting
โ Baseline Established โ
UCSD Test Data (Contains bikes, carts, etc.)
โ Feature Extraction
โ LSTM-VAE Inference
โ Ensemble Voting (IF, SVM, LOF)
โ Compute TDI
โ Classify Risk Zone
โ Classify Anomaly Type
โ Log Incident
โ Generate Explanation
Dashboard displays:
โ Current TDI (e.g., 67)
โ Risk Zone (๐ WARNING)
โ Trend (โ RISING)
โ Top Features causing drift
โ AI explanation
Operator can:
โ Acknowledge alert
โ Mark as false positive
โ Request investigation
โ Update baseline (human-gated)
"Defense systems manage CONFIDENCE, not panic."
"AI assists operators, it does NOT replace them."
"Baseline adaptation is human-gated."
These three principles guide every design decision:
- Graduated Risk Zones - Reduce alert fatigue with progressive warnings
- Explainable AI - Operators understand WHY alerts occur
- Human-in-the-Loop - Critical decisions remain with humans
- Baseline Protection - Prevents adversarial manipulation
Used as proxy for border surveillance footage.
| Subset | Train | Test | Anomalies |
|---|---|---|---|
| Ped1 | 34 clips | 36 clips | Bikes, skateboards, carts |
| Ped2 | 16 clips | 12 clips | Bikes, skateboards |
How we use it:
- Train folder โ Learn NORMAL pedestrian behavior
- Test folder โ Detect DRIFT when anomalies appear (labels ignored - unsupervised)
| Component | Specification |
|---|---|
| ML Model | LSTM-VAE (Pure NumPy, no TensorFlow/PyTorch) |
| Features | 24 behavioral metrics from optical flow |
| Latent Dim | 8-dimensional latent space |
| Sequence Length | 10 frames temporal window |
| Smoothing | EWMA with ฮฑ=0.15 |
| Technology Readiness | TRL-4 (Lab Validated) |
Edit config.py to customize:
# Data source
DATA_MODE = "real_video" # "synthetic" | "real_video"
# UCSD Dataset
UCSD_SUBSET = "ped1" # "ped1" or "ped2"
# Baseline protection
BASELINE_FREEZE_CONFIG = {
'learning_window': 200,
'freeze_after_learning': True,
'adaptation_learning_rate': 0.01,
}| Domain | Application |
|---|---|
| Border Security | Detect infiltration patterns at perimeter fences |
| Airport Security | Monitor crowd behavior at checkpoints |
| Critical Infrastructure | Surveillance of power plants, data centers |
| Military Installations | Base perimeter monitoring |
| Corporate Security | Campus and facility protection |
| Metric | Description |
|---|---|
| Detection Delay | Frames between actual drift start and system detection |
| False Positive Rate | Alerts during confirmed normal periods |
| Peak TDI | Maximum threat deviation observed |
| Zone Transitions | History of risk zone changes |
1. "Dataset not found"
# Ensure UCSD dataset is in correct location:
data/UCSD_Anomaly_Dataset.v1p2/UCSDped1/Train/2. "Module not found"
# Make sure virtual environment is activated
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt3. "Streamlit not starting"
pip install streamlit --upgrade
streamlit run dashboard/app_pro_v2.py- Project: DRISHTI - Defense Intelligence System
๐ก๏ธ DRISHTI - Because early warning saves lives. ๐ก๏ธ