This repository contains all source codes relevant to the "Detection and tracking of vehicles with data from a video surveillance camera in the task of estimating traffic flow based on deep convolutional neural networks" research paper. We used official Detectron realization from Facebook as a start point. Here is an example of how implemented system works at day and at night(better to download and open in local video player). If you are interest in the dataset and/or our trained models, please email us(email@example.com, firstname.lastname@example.org).
One should not consider provided sources as an off-the shelf implementation. It is not a production-ready solution and still only a draft of what can be achieved with modern convolutional networks in the field of traffic analysis. Provided project is intended to serve as a complete reference about implementation details and neural network architecture/hyperparameters.
Short summary of the most relevant directories and files:
- traffic/models - config files for used models. Start from here if you are interest in the precise architecture of the detection network.
- traffic/utils - sources for SORT tracker (not present due to the license problems), drawing procedures, model inference and statistics building.
- traffic/scripts/plot_predicts.py - run trained model on a small video fragment to get per frame rendered predictions. Be aware that pretty matplotlib rendering takes time.
- traffic/scripts/parse_is_archives.py - API calls to download and concat video fragments from is74 archive, this archive was used as our main data source in the work. Requires login and password to access.
Refer to the maskrcnn_benchmark/modeling for realization of the feature aggregation pooling and focal loss.