File size: 826 Bytes
0e6cabe |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# Violence Detection using Conv3D
## Model Architecture
- **Type**: 3D Convolutional Neural Network (Conv3D)
- **Input**: Video sequence of 16 frames, resized to 112x112.
- **Structure**:
- 4 Conv3D Layers with BatchNorm, ReLU, and MaxPooling.
- Flatten Layer.
- 2 Fully Connected Layers.
- Dropout (0.5) for regularization.
- **Output**: Binary Classification (Violence vs No-Violence).
## Dataset Structure
The code expects a `Dataset` folder in the parent directory (or modify `DATASET_DIR` in `train.py`).
Structure:
```
Dataset/
βββ violence/
β βββ video1.mp4
β βββ ...
βββ no-violence/
βββ video2.mp4
βββ ...
```
## How to Run
1. Install dependencies: `torch`, `opencv-python`, `scikit-learn`, `numpy`.
2. Run `python train.py`.
|