Giter VIP home page Giter VIP logo

2018aicity_mcprl's Introduction

Unsupervised Anomaly Detection for Traffic Surveillance Based on Background Modeling

This work participates in Nvidia AI City Challenge CVPR 2018 Workshop.

This repository contains our source code of Track-2 in the NVIDIA AI City Challenge at CVPR 2018 Workshop.

Introduction

The pipeline of our system is as follow:

As shown in the picture, we get the background frames from the original frames. Then we detect vehicles in background images using Faster-RCNN. After that, to eliminate false detected bounding boxes, we utilize VGG as a powerful classifier. We determine anomalous vehicles based on the bounding boxes produced by the former module. When meeting camera movement or vehicles waiting for red lights, we will compare the similarity between two candidates with the help of ResNet50 trained with triplet loss. For every detected abnormal vehicles, we go back to find the accurate timestamp when the abnormal happens. More details can be found in our paper.

Dependencies

  • Python2
  • Caffe
  • pytorch
  • cv2
  • PIL
  • Numpy

Code structure

Because it takes a lone time to run our system on the entire evaluation dataset, which contains about 1500 minuntes video in total, we split and run our system in three part. What's more, it makes debugging easier. First, we generate the background frames. Next, we detecte vechiles using faster-rcnn in multi-scale, which is follower by a VGG16 classifier. At last, we obtain all anomalies according to saved bounding boxes. If you want, you can also run the whole system end-to-end, but you have to combine the code together. When meeting some trouble, you should feel free to contact me

  1. Run python ./extract_background.py. Then, you will get all original frames and background frames saved in ./data/all_imgs/all and ./data/all_imgs/bg separately, which are both used in the following modules.
  2. The ./classification contains the code to train classification model. You can also download our model rather than train it yourself.
  3. The ./similar contains the code to train similarity comparison model. You can also download our model rather than train it yourself.
  4. The ./data is the directory to save all images and models used in our work. This is some of our data for classification and the source other data are illustruted here. Here you can download all models used by us.
  5. The ./py-faster-rcnn contains almost all the scripts of our system.

More details can be found in corresponding subfolders.

Reference

JiaYi Wei, JianFei Zhao, YanYun Zhao, ZhiCheng Zhao, "Unsupervised Anomaly Detection for Traffic Surveillance Based on Background Modeling", in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recogn. Workshops (CVPRW), Jun. 2018.

Contact

If you have any question about our work, you can contact JiaYi Wei

2018aicity_mcprl's People

Contributors

anujsgithub avatar chomolungma avatar jiayi-wei avatar shuiyeyue avatar

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.