EdgeVision-Guard is a monitoring system using computer vision and deep learning to detect human falls and anomalies in real-time. The platform uses a privacy-preserving approach based on skeleton keypoints, making it suitable for healthcare facilities, workplace safety monitoring, and smart living environments.
-
Model Optimization Techniques
- INT8 quantization reduces model size by 75% without significant accuracy loss
- TensorRT acceleration for NVIDIA platforms increases throughput by 3x
- ARM-optimized inference for Raspberry Pi and Jetson Nano devices
- Support for hardware acceleration (CUDA, OpenVINO, CoreML)
-
Production Performance Metrics
Deployment Target Latency Throughput Power Consumption Cloud (GPU) 12ms 83 FPS N/A Cloud (CPU) 45ms 22 FPS N/A Jetson Nano 78ms 12 FPS 5W Raspberry Pi 4 126ms 8 FPS 3.2W -
Model Accuracy Benchmarks
Metric UP-Fall Dataset URFall Dataset Real-World Validation Precision 0.94 0.92 0.91 Recall 0.91 0.89 0.88 F1 Score 0.92 0.90 0.89 ROC-AUC 0.97 0.95 0.94 False Positive Rate 0.04 0.05 0.06 False Negative Rate 0.09 0.11 0.12
# Clone the repository
git clone https://github.com/muhkartal/EdgeVision-Guard.git
cd EdgeVision-Guard
# Configure environment variables
cp .env.example .env
# Edit .env with your configuration
# Deploy with Docker Compose
docker-compose up -d# Install Helm chart
helm repo add edgevision-guard https://charts.yourdomain.com/
helm repo update
# Deploy EdgeVision-Guard
helm install edgevision-guard edgevision-guard/edgevision-guard \
--namespace monitoring \
--create-namespace \
--set ingress.enabled=true \
--set persistence.enabled=true \
--values custom-values.yaml# Deploy to edge device
./scripts/deploy-edge.sh --target <device-ip> --username <user> --key <ssh-key>
# Or use the edge-specific Docker Compose
docker-compose -f docker-compose.edge.yml up -d
# Install as systemd service
sudo cp deployment/edgevision-guard.service /etc/systemd/system/
sudo systemctl enable edgevision-guard.service
sudo systemctl start edgevision-guard.service# Download and preprocess datasets
python src/data_ingest.py --dataset up-fall --output data/up-fall
python src/data_ingest.py --dataset ur-fall --output data/ur-fall
python src/data_ingest.py --generate-keypoints --dataset up-fall --dataset ur-fall
# Train with dataset
python src/train.py --epochs 100 --batch-size 64 --device cuda --output-dir models/
# Fine-tune on custom data
python src/train.py --transfer-learning --base-model models/fall_detector.pth \
--custom-data path/to/custom/data --epochs 20
# Export to production-ready ONNX format
python src/onnx_export.py --model-path models/fall_detector.pth \
--output models/fall_detector.onnx --quantize --benchmark
# Configure webhook notifications to your security system
WEBHOOK_URL = "https://your-security-system.com/api/events"
WEBHOOK_AUTH = {"Authorization": "Bearer your-api-token"}
# In your .env file
ALERT_WEBHOOK_URL=https://your-security-system.com/api/events
ALERT_WEBHOOK_AUTH_HEADER=Bearer your-api-token# Configure HL7 FHIR integration
FHIR_SERVER = "https://fhir.hospital.org/api/fhir/r4"
FHIR_AUTH = {"Authorization": "Bearer your-fhir-token"}
# In your .env file
FHIR_ENABLED=true
FHIR_SERVER_URL=https://fhir.hospital.org/api/fhir/r4
FHIR_AUTH_HEADER=Bearer your-fhir-token# Prometheus metrics configuration
METRICS_ENABLED=true
METRICS_PORT=9090
# Grafana dashboard provisioning
GRAFANA_API_KEY=your-grafana-api-key
GRAFANA_URL=https://grafana.yourdomain.comEdgeVision-Guard exposes Prometheus metrics at /metrics for monitoring:
| Metric | Description |
|---|---|
edgevision_inference_requests_total |
Total number of inference requests |
edgevision_inference_latency_seconds |
Histogram of inference latencies |
edgevision_anomaly_detections_total |
Total number of anomalies detected |
edgevision_false_positive_rate |
Estimated false positive rate |
edgevision_model_version |
Current model version in use |
# Backup configuration and models
./scripts/backup.sh --output backup.tar.gz
# Restore from backup
./scripts/restore.sh --input backup.tar.gz# List available models
./scripts/model-manager.sh list
# Register new model
./scripts/model-manager.sh register --model-path models/new_model.onnx --version 1.2.0
# Switch active model
./scripts/model-manager.sh activate --version 1.2.0# Create development environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -r requirements-dev.txt
# Install pre-commit hooks
pre-commit install# Run linting
ruff check .
# Run tests with coverage
pytest tests/ --cov=src/ --cov-report=html
# Format code
black .# Create custom model architecture
python src/model.py --custom-architecture config/custom_model.yaml
# Hyperparameter tuning
python src/hyperopt.py --config config/hyperparameter_space.yamlEdgeVision-Guard/
├─ README.md # This file
├─ requirements.txt # Production dependencies
├─ requirements-dev.txt # Development dependencies
├─ data/ # Data directory
│ └─ (download script populates)
├─ src/ # Source code
│ ├─ __init__.py # Package initialization
│ ├─ data_ingest.py # Dataset download and preprocessing
│ ├─ model.py # ML model architecture
│ ├─ train.py # Training pipeline
│ ├─ onnx_export.py # Model export and optimization
│ ├─ inference_service/ # API service
│ │ ├─ __init__.py
│ │ ├─ app.py # FastAPI application
│ │ └─ utils.py # Utility functions
│ └─ dashboard/ # User interface
│ ├─ __init__.py
│ ├─ app.py # Streamlit dashboard
│ └─ explainer.py # Explainability visualizations
├─ docker/ # Dockerfiles
│ ├─ Dockerfile # Cloud deployment (x86_64)
│ └─ Dockerfile.edge # Edge deployment (arm64)
├─ deployment/ # Deployment configurations
│ ├─ kubernetes/ # K8s manifests
│ └─ edge/ # Edge deployment scripts
├─ scripts/ # Administration scripts
├─ .github/ # CI/CD configuration
│ └─ workflows/
│ ├─ ci.yml # Continuous Integration
│ └─ cd.yml # Continuous Deployment
└─ tests/ # Test suite
└─ test_inference.py # Inference tests
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Muhammed Ibrahim Kartal | https://kartal.dev
