This work is based on a violence detection model proposed by [1] with minor modifications. The original model was implemented with Pytorch [2]. in this work, we implement it with Keras and TensorFlow as a back-end. The model incorporates a pre-trained convolution Neural Network (CNN) connected to Convolutional LSTM (ConvLSTM) layer. The model takes as an input the raw video, converts it into frames, and output a binary classification of violence or non-violence label.
data path are defined as follows:
- hocky - data/raw_videos/HockeyFights - Data_Link
- violentflow - data/raw_videos/violentflow - Data_Link
- movies - data/raw_videos/movies - Data_Link
- python 2.7
- numpy 1.14.0
- keras 2.2.0
- tensorflow 1.9.0
- Pillow 3.1.2
- opencv-python 3.4.1.15
just run python run.py (currently we don't support arguments from command line)
- Sudhakaran, Swathikiran, and Oswald Lanz. "Learning to detect violent videos using convolution long short-term memory." In Advanced Video and Signal Based Surveillance (AVSS), 2017 14th IEEE International Conference on, pp. 1-6. IEEE, 2017.
- https://github.com/swathikirans/violence-recognition-pytorch