🏆 Our team got the second position at the AI CITY 2020 Challenge Track 4.
This repository contains our source code of Track 4 in the NVIDIA AI City Challenge at CVPR 2020.
The Track 4 of NVIDIA AI CITY 2020 comprised of detecting anomalies based on different video feeds available from multiple cameras at intersections and along highways.
Detailed information of NVIDIA AICity Challenge 2020 can be found here.
Overview of the architecture of our anomaly detection framework, which consists of three main pipelines.
- Python 3.6
- To run the model from scratch, please request data from the organizers.
- Install Yolo-v3 from here and use pretrained model on MS-COCO.
To run model from scratch, please follow these steps:
-- Background Modelling
- Run
python extract_frames.py
to extract frames from the videos with frequency set as 100. - Run
python extract_processed.py
to segment the processed images. - Run pretrained Yolo v3 model on the processed_images2 folder and save it as
result.json
.
-- Segmentation Maps
- Run
python3 extract_frames.py
to extract frames from the videos with frequency set as 10. - Run pretrained Yolo v3 model on the original_images folder and save it as
part1.json
. To reduce complexity, we divided the task into two parts and saved it as part1.json and part2.json. - Run
Seg_masks.py
. - Run
python3 Masks/get_ignore_area.py
. - Computed Segmentation Masks can be downloaded from here.
- Run
python3 Detector.py
and the results will be saved inResults.txt
.
Since it would take a considerable amount of time to run all the steps from scratch, we have also provided precalculated results. You can directly see the result by running 'python3 Detector.py' or see it on the Jupyter notebook Detector.ipynb
.
@inproceedings{doshi2020fast,
title={Fast Unsupervised Anomaly Detection in Traffic Videos},
author={Doshi, Keval and Yilmaz, Yasin},
booktitle={Proc. CVPR Workshops, Seattle, WA, USA},
year={2020}
}