Skip to content

DeepEYE utilizes computer vision to detect anomalies in video surveillance, offering a proactive security solution. By employing advanced machine learning algorithms, it distinguishes between normal activities and potential threats, enhancing surveillance across sectors like public safety, industry, and smart cities.

Notifications You must be signed in to change notification settings

jaigane6387/DeepEYE-Video-Surveillance-with-Anomaly-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepEYE: Anomaly Detection in Video Surveillance

Welcome to the DeepEYE: Anomaly Detection in Video Surveillance repository

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.

Project Structure

├── 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

Dataset

  • 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

File Description

  • 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.

How to Use

  1. Clone this repository to your local machine:
git clone https://github.com/jaigane6387/DeepEYE_Video_Surviellience.git
  1. Install the required dependencies:
pip install -r requirements.txt

Model Training

Now, download the data from the given source/link and structure it to train and test directories.

  1. Prepare the data by converting all the videos to frames:
python vid2array.py
  1. Train the anomaly detection model using the provided training data
python train.py

Inference

  1. Test the trained model on test data:
python test.py

Test output

Application setup

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.

  1. You need to install the Docker application and set up it accordingly. For reference, you can refer to this video

  2. Navigate to Repository Change your directory to the cloned repository:

cd <repository-directory>
  1. Build a Docker Image Build the Docker image using the provided Dockerfile
docker build -t myapp .
  1. Run Docker Container Run a Docker container from the built image:
docker run -it --rm -p 5000:5000 myapp

Output

Tech Stack

Python TensorFlow OpenCV Docker Streamlit NumPy

These technologies are the backbone of this project, providing powerful tools for Data Manipulation, Deep Learning, and Computer Vision tasks.

Bug Reports and Feature Requests

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.

Social

Connect with me on social media platforms to stay updated on this project and more!

About

DeepEYE utilizes computer vision to detect anomalies in video surveillance, offering a proactive security solution. By employing advanced machine learning algorithms, it distinguishes between normal activities and potential threats, enhancing surveillance across sectors like public safety, industry, and smart cities.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published