File size: 712 Bytes
6028065
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Violence GRU Model

## Model Architecture
- **Type**: CNN-GRU Hybrid
- **Components**:
  - **CNN Backbone**: 4-Layer 2D CNN to extract spatial features from each frame.
  - **Recurrent Unit**: 2-Layer GRU (Gated Recurrent Unit) to model temporal dependencies.
  - **Classifier**: Fully Connected Layer.
- **Input**: Video sequence of 16 frames, resized to 112x112.
- **Output**: Binary Classification (Violence vs No-Violence).

## Dataset Structure
The code expects a `Dataset` folder in the parent directory.
```

Dataset/

├── violence/

└── no-violence/

```

## How to Run
1. Install dependencies: `torch`, `opencv-python`, `scikit-learn`, `numpy`.
2. Run `python train.py`.