Git Product home page Git Product logo

anomaly-detection-in-surveillance-videos's Introduction

Real-world Anomaly Detection in Surveillance Videos

This repository provides the implementation for the paper 'Real-world Anomaly Detection in Surveillance Videos' by Waqas Sultani, Chen Chen, Mubarak Shah.

Abstract

The project aims to detect anomolous activities in surveillance videos. A pre-trained 3-D convolution network was used to generate input feature vectors and using multiple instance learning an artificial neural network was trained for classification.

Prerequisites

Dataset:

UCF-Crime (http://crcv.ucf.edu/cchen/UCF_Crimes.tar.gz) courtesy of Waqas Sultani. It is the original dataset used for the aforementioned paper.

Tools:

Caffe, Facebook/C3D-1.0 (https://github.com/facebook/C3D), Tensorflow, Python

Implementation Details

PREPROCESSING:

Resize each video frame to 240*320 pixels and fix frame rate at 30fps.

FEATURE EXTRACTION:

C3D features for every 16-frame video clip followed by l2 normalization. To obtain features for a video segment, we take the average of all 16-frame clip features within that segment.

TRAINING:

We input these features (4096D) to a 3-layer FC neural network. The first FC layer has 512 units followed by 32 units and 1 unit FC layers. Using MIL we try to generate higher anomaly score for anomalous videos than normal videos.

Acknowledgments

  • This project was only possible due the work done by Waqas Sultani, and his help during the course of this project.
  • We are very gratefull to Dr. Rama Krishna Sai Gorthi, our academic advisor for the project.
  • The inspiration behing the project was to look into the techniques for anomoly detection in videos and exploit such techniqes to develop a real time automated moderator for surveillance.

Contributers

Citation

  • Sultani, Waqas, Chen Chen, and Mubarak Shah. "Real-world Anomaly Detection in Surveillance Videos." Center for Research in Computer Vision (CRCV), University of Central Florida (UCF) (2018).

anomaly-detection-in-surveillance-videos's People

Contributors

abhay97ps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anomaly-detection-in-surveillance-videos's Issues

About the result

Thanks for your nice work. I want to know the final result comparing with the original paper.
Look forwards for your reply.

Extracted Features

Since the training can be done on the extracted features alone. Are the extracted features available online? Or if you are having them, do you mind uploading them. Also, what is the approximate size of the dataset after feature extraction?

About download datasets

I try to download UCF-Crime datasets,but it is forbidden,"You don't have permission to access /cchen/UCF_Crimes.tar.gz on this server".Can I download the datasets in another way?

How to implement this project?

Hi! I'm new to video processing. Would you please give me more details about how to run this code?

Thank you so much for your help!!!!

Dataset

Who found this data set?can you send it .

The difference of model between model.ckpt.meta and the code

I check the trained model in file model.ckpt.meta using tensorboard. But the model is different from the one in your code and paper.

The model in your code is FC - ReLU - Dropout - FC - Dropout - FC - Sigmoid.
But the trained model is FC - ReLU - Dropout - FC - Sigmoid - Dropout - FC.

graph_large_attrs_key=_too_large_attrs limit_attr_size=1024 run=

Hello

Hello!! You did great work on anomaly detection. Could you please provide me with training annotation that you used in this code and kindly also tell me that how you label frames in your code. Waiting for your reply

Feature Extraction

Hope you are doing fine.
I'm stuck at the feature extraction part. The whole 16 frame/32 segments thing is confusing me. could you please elaborate a bit more on that?

More specifically, if we are supposed to take 32 individual segments that are 16 frames each. from which part of the video will we take those segments from?

any help regarding this will be really appreciated.

input_feature_vector_gen.py issue

The script in unable to convert strings to float of my fc6-1 feature files in the following line:

norm = normalize(np.array(map(float,open(os.path.join(dirpath, fl)).readlines()[0].strip().split(','))).reshape(1,-1),norm='l2')

The error is specifically in the map function, it states, cannot convert strings to float.
Any help will be appreciated!

The implementation of loss function

The loss function in your paper is

image

image

However, you implement it in the following way.

https://github.com/abhay97ps/Anomaly-Detection-in-Surveillance-Videos/blob/4be07aba4a8dda7cea882f33782595622d248d3e/Anomaly_NN.py#L51

https://github.com/abhay97ps/Anomaly-Detection-in-Surveillance-Videos/blob/4be07aba4a8dda7cea882f33782595622d248d3e/Anomaly_NN.py#L66-L77

The image is implemented as a placeholder extra and calculated using python float type. Won't it make it impossible to back propagate gradient to extra? And the optimizer only minimizes the image .

Shouldn't the image be implemented in tensorflow functions rather than pure python?

The display of `epoch_loss`

The epoch_loss initialized to 0 and never updated after then, the output of the program is always as follow. The loss is always 0.

Epoch 0 completed out of 10 loss: 0
Epoch 1 completed out of 10 loss: 0
Epoch 2 completed out of 10 loss: 0
Epoch 3 completed out of 10 loss: 0
Epoch 4 completed out of 10 loss: 0
Epoch 5 completed out of 10 loss: 0
Epoch 6 completed out of 10 loss: 0
Epoch 7 completed out of 10 loss: 0
Epoch 8 completed out of 10 loss: 0
Epoch 9 completed out of 10 loss: 0

https://github.com/abhay97ps/Anomaly-Detection-in-Surveillance-Videos/blob/4be07aba4a8dda7cea882f33782595622d248d3e/Anomaly_NN.py#L58-L79

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.