🏆News: our team got the winner at the AI CITY 2019 Challenge Track3
This repository contains our source code of Track-3 in the NVIDIA AI City Challenge at CVPR 2019 Workshop.
Traffic Anomaly Detection via Perspective Map based on Spatial-temporal Information Matrix
The challenge Track 3 of NVIDIA AI CITY 2019 required participating teams to submit the anomalies detected based on video feeds available from multiple cameras at intersections and along highways.
Detailed information of NVIDIA AICity Challenge 2019 can be found here. Overview of the architecture of our anomaly detection framework, which consists of background modeling module, perspective detection module, and spatial-temporal matrix discriminating module.
- Linux (tested on CentOS 7.2)
- Python 3.6
- PyTorch 0.4.1
- Opencv
- sklearn
- mmcv
- mmdetection
- Install PyTorch 0.4.1 and torchvision following the official instructions.
- Install mmdetection@(pytorch0.4.1) and mmcv following the official instructions.
- Download the model weights and precaculated detection results from here.
Since it takes a long time to run this system, we split the task into several steps and provide precalculated results.
- Run
python ./src/bg_modeling/capture_and_average.py
. Then, you will get all original frames and superimposed frames saved in./data/AIC_Track3/ori_images
and./data/AIC_Track3/processed_images
separately. - Put the downloaded detection and reid models into
./models
, and put precaculated detection results into./detection_results
. - To test a video and show the result.
python ./detect_anomaly.py <video id>
- To test all videos and save the results.
sh detect_all_videos.sh >tarck3.txt
We use Res50-FPN with DCN (Deformable-ConvNets) as our detector, which is trained with Datasets (UA_DETRAC & VisDrone)
@InProceedings{Bai_2019_CVPR_Workshops,
author = {Bai, Shuai and He, Zhiqun and Lei, Yu and Wu, Wei and Zhu, Chengkai and Sun, Ming and Yan, Junjie},
title = {Traffic Anomaly Detection via Perspective Map based on Spatial-temporal Information Matrix},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2019}
}