This dataset contains surveillance camera footage with activity labels, person detection, and anomaly events. Perfect for security monitoring, activity recognition, and video surveillance applications.
- ID: 28
- Title: Surveillance Video Dataset
- Category: Video Data
- Difficulty: Advanced
- Technologies: MP4, AVI, OpenCV, YOLO, Video Processing
- Year: 2026
- Security Camera Footage: High-quality surveillance video recordings
- Activity Labels: Comprehensive activity annotations
- Person Detection: Pre-labeled person detection data
- Anomaly Events: Marked anomaly detection events
- Ready for Surveillance AI: Optimized for AI model training
-
Install Python dependencies:
pip install -r requirements.txt
-
Run setup script:
python setup.py
python process_video.pypython detect_persons.pypython detect_anomalies.pypython extract_frames.py --video videos/sample.mp4 --interval 30python create_sample_video.pysurveillance-video/
├── index.html # Main demo page
├── analytics_dashboard.html # Advanced analytics dashboard
├── styles.css # Main stylesheet
├── script.js # Main JavaScript
├── analytics.js # Analytics dashboard JavaScript
│
├── process_video.py # Basic video processing
├── detect_persons.py # Person detection
├── detect_anomalies.py # Anomaly detection
├── extract_frames.py # Frame extraction
│
├── api_server.py # Flask REST API server
├── batch_processor.py # Batch processing system
├── train_ml_model.py # ML model training
├── video_quality_analyzer.py # Video quality analysis
├── multi_camera_system.py # Multi-camera system
├── video_search.py # Video search engine
├── alert_system.py # Alert/notification system
│
├── videos/ # Video files directory
│ ├── sample.mp4 # Main sample video
│ ├── sample2.mp4 # Secondary sample video
│ └── video_metadata.json # Video metadata
│
├── annotations/ # Annotation files
│ ├── annotations.json # Activity annotations
│ ├── person_detections.json # Person detections
│ └── anomalies.json # Anomaly events
│
├── frames/ # Extracted frames directory
│ └── extracted_frames/ # Extracted video frames
│
├── output/ # Output files directory
├── config/ # Configuration files directory
└── models/ # Trained ML models directory
import cv2
import json
# Load video
cap = cv2.VideoCapture('videos/sample.mp4')
# Load annotations
with open('annotations/annotations.json', 'r') as f:
annotations = json.load(f)
# Process video
while cap.isOpened():
ret, frame = cap.read()
if not ret:
break
# Your processing code here
cv2.imshow('Frame', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()from ultralytics import YOLO
import cv2
# Load YOLO model
model = YOLO('yolov8n.pt')
# Process surveillance video
results = model('videos/sample.mp4')
# Display results
for result in results:
annotated_frame = result.plot()
cv2.imshow('Detection', annotated_frame)
cv2.waitKey(1)import cv2
import json
# Load anomaly events
with open('annotations/anomalies.json', 'r') as f:
anomalies = json.load(f)
# Process video with anomaly detection
cap = cv2.VideoCapture('videos/sample.mp4')
fps = cap.get(cv2.CAP_PROP_FPS)
frame_count = 0
while cap.isOpened():
ret, frame = cap.read()
if not ret:
break
current_time = frame_count / fps
# Check for anomalies at current time
for anomaly in anomalies['anomalies']:
if anomaly['start_time'] <= current_time <= anomaly['end_time']:
# Mark anomaly in frame
cv2.putText(frame, 'ANOMALY DETECTED', (10, 30),
cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255), 2)
cv2.imshow('Anomaly Detection', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
frame_count += 1
cap.release()
cv2.destroyAllWindows()File: analytics_dashboard.html
Real-time analytics dashboard with:
- Statistics cards (videos, detections, anomalies, hours)
- Interactive charts (detections over time, anomaly distribution, activity types)
- Real-time event timeline
- Video quality metrics
- Export capabilities (JSON, CSV, PDF)
Usage:
# Open in browser
open analytics_dashboard.htmlFile: api_server.py
Flask-based REST API with endpoints:
GET /api/health- Health checkGET /api/analytics- Get analytics dataGET /api/videos- List all videosGET /api/videos/<filename>- Get video infoPOST /api/process- Process a videoPOST /api/batch/process- Batch process videosPOST /api/search- Search videosGET /api/annotations/<filename>- Get annotationsGET /api/quality/<filename>- Get quality metrics
Usage:
python api_server.py
# API available at http://localhost:5000File: batch_processor.py
Advanced batch processing with:
- Parallel processing of multiple videos
- Progress tracking
- Error handling and reporting
- Support for multiple operations (detection, anomaly, frames)
- Comprehensive processing reports
Usage:
# Process all videos in directory
python batch_processor.py --directory videos --operations all --workers 4
# Process specific videos
python batch_processor.py --videos sample.mp4 sample2.mp4 --operations detection anomalyFile: train_ml_model.py
Machine learning model training for:
- Custom YOLO model fine-tuning
- Activity recognition (CNN-based)
- Anomaly detection (Autoencoder-based)
- Support for PyTorch models
Usage:
# Train all models
python train_ml_model.py --model all --epochs 20
# Train specific model
python train_ml_model.py --model yolo --epochs 50File: video_quality_analyzer.py
Comprehensive video quality analysis:
- Sharpness analysis (Laplacian variance)
- Brightness and contrast metrics
- Noise estimation
- Color balance analysis
- Frame stability (optical flow)
- Overall quality scoring
Usage:
# Analyze single video
python video_quality_analyzer.py videos/sample.mp4 --output output/quality_report.json
# Batch analyze all videos
python video_quality_analyzer.py videos --batch --output output/quality_report.jsonFile: multi_camera_system.py
Multi-camera surveillance system:
- Support for multiple camera feeds
- Synchronized processing
- Camera grid view
- Unified analytics
- Parallel processing
Usage:
# Create sample config
python multi_camera_system.py --create-config
# Process all cameras
python multi_camera_system.py --config config/cameras.json --process all
# Create synchronized grid view
python multi_camera_system.py --config config/cameras.json --grid --sync 10.0File: video_search.py
Advanced search and filtering:
- Text-based search
- Metadata filtering
- Timestamp-based search
- Event type filtering
- Activity type filtering
- Duration and resolution filters
Usage:
# Search videos
python video_search.py --query "sample" --event-type anomaly
# Filter by timestamp
python video_search.py --video sample.mp4 --timestamp 10.5
# Complex search
python video_search.py --query "sample" --min-duration 10 --max-duration 20 --event-type detectionFile: alert_system.py
Real-time alert and notification system:
- Anomaly detection alerts
- Person count threshold alerts
- Video quality alerts
- Multiple notification channels (console, file, email)
- Alert management and reporting
Usage:
# Create config
python alert_system.py --create-config
# Check all alerts
python alert_system.py --check-all
# Generate report
python alert_system.py --check-all --report{
"video_id": "sample.mp4",
"activities": [
{
"id": 1,
"type": "walking",
"start_time": 0.0,
"end_time": 5.2,
"person_id": 1
}
]
}{
"video_id": "sample.mp4",
"detections": [
{
"frame": 0,
"timestamp": 0.0,
"persons": [
{
"id": 1,
"bbox": [100, 150, 200, 300],
"confidence": 0.95
}
]
}
]
}{
"video_id": "sample.mp4",
"anomalies": [
{
"id": 1,
"type": "unusual_movement",
"start_time": 10.5,
"end_time": 12.3,
"description": "Rapid movement detected"
}
]
}Run the Python script to create synthetic sample videos:
python create_sample_video.pyThis will create:
videos/sample.mp4- Basic surveillance video with moving objectvideos/sample2.mp4- Video with multiple objects and anomaly events
- Place your surveillance video files in the
videos/directory - Name them
sample.mp4andsample2.mp4 - Ensure they are in MP4 format
- Recommended: 640x480 or 1920x1080 resolution, 30 fps
- Format: MP4 (H.264 codec recommended)
- Resolution: 640x480 or higher
- Frame Rate: 30 fps
- Duration: 10-15 seconds for samples
pip install -r requirements.txtCore Dependencies:
- opencv-python>=4.8.0
- numpy>=1.24.0
- ultralytics>=8.0.0
- Pillow>=10.0.0
Advanced Features:
- flask>=2.3.0
- flask-cors>=4.0.0
- torch>=2.0.0 (for ML training)
- torchvision>=0.15.0 (for ML training)
config.py- General project configurationconfig/alert_config.json- Alert system configuration (create withpython alert_system.py --create-config)config/cameras.json- Multi-camera configuration (create withpython multi_camera_system.py --create-config)
All processing results are saved to the output/ directory:
batch_report_*.json- Batch processing reportsquality_report.json- Quality analysis resultsmulti_camera_report.json- Multi-camera analyticssearch_results.json- Search resultsalert_report.json- Alert reportsalerts_*.json- Daily alert logs
Run the verification script to check project status:
python verify_project.pyThis will verify:
- All required directories exist
- All required files are present
- Python dependencies are installed
- Project structure is complete
Visit the demo page at index.html to see the dataset in action.
Download the complete dataset: surveillance-video.zip
This dataset is provided for research and educational purposes. See LICENSE file for details.
- Author: Molla Samser
- Website: https://rskworld.in/
- Email: help@rskworld.in
- Phone: +91 93305 39277
- Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
Created by Molla Samser - rskworld.in