Clone wiki

tvaLib / Home



tvaLib is a shared-source traffic vision analysis library. tvaLib wraps Traffic-Intelligence's tracking capabilities by adding a host of automation, filtering, optimization, visualization, data management, and analysis tools. tvaLib is capable of extracting and analyzing a wide range of basic traffic measures from video data including various forms of traffic counts, speed distributions, and profiles, as well as performing more sophisticated surrogate safety analysis tasks. tvaLib is focused on scaling traffic analysis to a large numbers of sites and is well suited to cross-sectional and before after studies of traffic behaviour, flow, and safety. tvaLib can also scale across multiple computing platforms.


tvaLib is written entirely in Python 2.7, which means that it can be installed on virtually any platform supported by Python (including Windows, Linux, and Mac). A standalone executable has been compiled for Windows, however it is old and not very reliable at this time.


Use of this software is governed by the terms and conditions set out in the accompanying LICENSE.TXT file. This software is provided free of charge in source form for non-commercial use. Please use proper attribution wherever appropriate. Recommended citations:

ST-AUBIN, Paul (2016) Driver Behaviour and Road Safety Analysis Using Computer Vision and Applications In Roundabout Safety, Ph.D., Polytechnique Montréal, Montréal, 255 pages

JACKSON, Stewart, MIRANDA-MORENO, Luis Fernando, ST-AUBIN, Paul, SAUNIER, Nicolas (2013) A Flexible, Mobile Video Camera System and Open Source Video Analysis Software for Road Safety and Behavioural Analysis, Transportation Research Record, no. 2365, pp 90-98

A larger list of publications relating to tvaLib can be found here:


tvaLib requires an installation of Python 2.7 (recommended 64-bit), as well as the following python modules: scipy, numpy, matplotlib, openCV, SQLAlchemy. Additional modules are optional.

tvaLib also requires Traffic-Intelligence.

Please consult the training manual found in the Downloads page for detailed instructions on how to install these on Windows or Linux.


tvaLib can be executed straight from source once all dependencies have been installed. The first time tvaLib is launched, it will prompt you to locate the installation location of Traffic-Intelligence as well as set up a database folder.

Please consult the training manual found in the Downloads page for detailed instructions on installing tvaLib.


Please consult the training manual found in the Downloads page for detailed instructions on operating tvaLib.

tvaLib's code is documented inline, and can be consulted online at


tvaLib supports English and French languages in its output, though documentation is only available in English at this time.