Downloads · 30 days
3
2% of all-time downloads
shirish9354/Criminal_Activity_Detector_DaudshahVideoDataset
Criminal_Activity_Detector_DaudshahVideoDataset is a machine learning model from shirish9354. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as mit.
This project presents a deep learning–based video classification system that categorizes short clips as Normal or Suspicious. The model is trained on the Daudshah Video Dataset and is designed for surveillance analysi…
Downloads · 30 days
3
2% of all-time downloads
All-time downloads
124
Public
Repo size
8 MB
Likes
1
Public
Click a slice to open those files.
.keras8 MB · 100%
From the Hugging Face model README
This project presents a deep learning–based video classification system that categorizes short clips as Normal or Suspicious. The model is trained on the Daudshah Video Dataset and is designed for surveillance analysis, supporting both offline video processing and real-time streams.
The pipeline combines spatial feature extraction (CNN) with temporal modeling (RNN + attention) to capture motion patterns indicative of anomalous behavior.
Input Video (2-second clip, 16 frames)
↓
ResNet50 (ImageNet pretrained, frozen)
↓
Frame Embeddings (16 × 2048)
↓
LayerNorm → Dense(256) → Dropout(0.4)
↓
Bidirectional GRU (64 units)
↓
Temporal Attention Layer
↓
Dense(64) → Dropout(0.6)
↓
Sigmoid Output → P(Suspicious / Normal)
| Parameter | Value |
|---|---|
| Framework | TensorFlow / Keras |
| Backbone | ResNet50 (frozen) |
| Sequence length | 16 frames |
| Clip duration | ~2 seconds |
| Batch size | 32 |
| Epochs | ~19 (early stopping applied) |
| Optimizer | Adam (clipnorm = 1.0) |
| Loss | Focal Loss (α = 0.60, γ = 2.0) |
| LR Schedule | ReduceLROnPlateau |
| Early Stopping | Based on validation AUC |
| Split | Clips | Normal | Suspicious |
|---|---|---|---|
| Train | 1,328 | 51.2% | 48.8% |
| Validation | 332 | 51.2% | 48.8% |
| Test | 290 | 51.7% | 48.3% |
| Metric | Score |
|---|---|
| Accuracy | 95.24% |
| AUC-ROC | 0.9895 |
| Macro F1 | 0.903 |
| Class | Precision | Recall |
|---|---|---|
| Normal | 89.6% | 92.0% |
| Suspicious | 91.2% | 88.6% |
| Issue | Mitigation |
|---|---|
| Class imbalance bias | Focal Loss tuning |
| Overfitting | Frozen backbone |
| Slow preprocessing | Batched GPU feature extraction |
| Threshold bias | Macro-F1 optimization |
| Serialization issues | Keras serializable registration |
| Training interruptions | Checkpointing with resume support |
| Feature extraction crashes | Incremental checkpointing |
| Dataset path issues | Auto-discovery logic |
| Data leakage risk | Video-level splitting |