LEGIONM36's picture
Upload 4 files
0e6cabe verified
# 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`.