YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
CCTV Threat Detection Model
A fine-tuned Vision Transformer (ViT) model for real-time threat detection in CCTV footage. This model can identify violent behavior, weapons, and other security threats from surveillance camera feeds.
π Quick Start
Installation
pip install -r requirements.txt
Basic Usage
from src.models.threat_detector import CCTVThreatDetector
# Load model
detector = CCTVThreatDetector.from_pretrained("kroeungcyber/cctv-threat-detection")
# Detect threats in image
result = detector.predict("path/to/image.jpg")
print(f"Threat detected: {result['is_threat']} (confidence: {result['confidence']:.2%})")
Gradio Demo
python app.py
π Model Performance
- Accuracy: 94.2%
- Precision: 92.8%
- Recall: 91.5%
- F1-Score: 92.1%
π― Use Cases
- Real-time CCTV monitoring
- Security system integration
- Automated threat alerting
- Forensic video analysis
π Documentation
π οΈ Training
The model is based on google/vit-base-patch16-224-in21k and fine-tuned on:
- Real Life Violence Situations Dataset
- Custom CCTV footage (anonymized)
- Augmented security camera scenarios
Training in Google Colab
π§ IP Camera Integration
from src.inference.ip_camera import IPCameraProcessor
processor = IPCameraProcessor("path/to/model")
processor.process_camera_feed("rtsp://camera-url")
π Supported Formats
- Images: JPG, PNG, BMP
- Video: MP4, AVI, MOV
- Streams: RTSP, HTTP, MJPEG
π¨ Alerts & Notifications
- Email notifications
- Webhook integration
- Real-time logging
- Image archiving
π License
MIT License - see LICENSE file for details.
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
π Support
- Create an issue for bugs/features
- Check documentation for common questions
- Community discussions in the Hugging Face Hub
Citation
@misc{cctv-threat-detection,
title={CCTV Threat Detection using Vision Transformers},
author={Your Name},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/kroeungcyber/cctv-threat-detection}
}
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support