In this innovative project, we push the boundaries of deep neural networks by extending them to three dimensions for video analysis. We capture both spatial and temporal features from video feeds by introducing a spatio-temporal autoencoder based on a 3D convolution network. The encoder extracts intricate details, while the decoder reconstructs frames. Abnormal events are pinpointed by measuring the reconstruction loss via Euclidean distance between original and reconstructed batches. This approach revolutionizes video surveillance, enabling accurate anomaly detection by harnessing the power of deep learning in understanding dynamic visual data.
├── Data
│ ├──Train
│ ├── Test
├── Dockerfile
├── README.md
├── model
│ ├── saved_model.keras
├── vid2array.py
├── training.npy
├── train.py
├── test.py
├── requirements.txt
├── results
├── live.png
├── test2_output.gif
├── abornal_frames.json
- Train: This directory contains training data for building anomaly detection deep learning models.
- Test: This directory contains test data for evaluating the performance of the anomaly detection models. You can download the dataset from here - Download
- vid2array.py: This Python script implements the data preparation.
- train.py: This script implements the abnormal event detection mechanism and trains the model on the data.
- test.py: This script tests the anomaly detection model.
- training.npy: Numpy file containing preprocessed training data.
- model.keras: Trained anomaly detection model saved in keras format.
- app.py: A real-time application showcasing the anomaly detection output on the given video.
- requirements.txt: List of Python dependencies required to run the code.
- Dockerfile: It facilitates containerized application deployment, ensuring seamless setup and execution across different environments.
- Clone this repository to your local machine:
git clone https://github.com/jaigane6387/DeepEYE_Video_Surviellience.git
- Install the required dependencies:
pip install -r requirements.txt
Now, download the data from the given source/link and structure it to train and test directories.
- Prepare the data by converting all the videos to frames:
python vid2array.py
- Train the anomaly detection model using the provided training data
python train.py
- Test the trained model on test data:
python test.py
If you want to directly view the working application, first we need to go through a couple of steps to set up and run the live application.
-
You need to install the Docker application and set up it accordingly. For reference, you can refer to this video
-
Navigate to Repository Change your directory to the cloned repository:
cd <repository-directory>
- Build a Docker Image Build the Docker image using the provided Dockerfile
docker build -t myapp .
- Run Docker Container Run a Docker container from the built image:
docker run -it --rm -p 5000:5000 myapp
These technologies are the backbone of this project, providing powerful tools for Data Manipulation, Deep Learning, and Computer Vision tasks.
If you encounter any issues with the code or have suggestions for new features, please don't hesitate to open an issue. Your feedback is highly appreciated and will help improve this project for everyone.
Connect with me on social media platforms to stay updated on this project and more!