Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Notice: Creating folder will generate an empty file .keep, because not support in Git

Traffic Vision

This app detects cars/buses in a live traffic at a phenomenal 50 frames/sec with HD resolution (1920x1080) using deep learning network Yolo-V2. The model used in the app is optimized for inferencing performnce on AMD-GPUs using MIVisionX toolkit.

Traffic Vision Animation


  1. Vehicle detection with bounding box
  2. Vehicle direction ((upward, downward) detection
  3. Vehicle speed estimation
  4. Vehicle type: bus/car.

How to Run

Use Model


App starts the demo, if no other option is provided. Demo uses a video stored in the media/ dir.

% ./
('Loaded', 'yoloOpenVX')
OK: loaded 22 kernels from
OK: OpenVX using GPU device#0 (gfx900) [OpenCL 1.2 ] [SvmCaps 0 1]
OK: annCreateInference: successful
Processed a total of  102 frames
OK: OpenCL buffer usage: 87771380, 46/46

Here is the link to YouTube video detecting cars, bounding boxes, car speed, and confidence scores.

Other Examples

recorded video

  1. ./ --video /vid.mp4

traffic cam ip

  1. ./ --cam_ip ''



  1. GPU: Radeon Instinct or Vega Family of Products with ROCm and OpenCL development kit
  2. Install AMD's MIVisionX toolkit : AMD's MIVisionX toolkit is a comprehensive computer vision and machine intelligence libraries, utilities
  3. CMake, Caffe
  4. Google's Protobuf


% git clone

1. Model Conversion

This steps downloads yolov2-tiny for voc dataset and converts to MIVision's openVX model.

% cd trafficVision/model
% bash ./

More details on the pre-requisite (like caffe) of the model conversion in the models/ dir.

2. MIVision Model Compilation

% cd trafficVision
% make

3. Test App

% cd trafficVision
% make test

It'll display detection all videos in media/ dir.


This section is a guide for developers, who would like to port vision and object detections models to AMD's Radeon GPUs from other frameworks including tensorflow, caffe or pytorch.

High Level Design

Lower Level Modules

These lower level modules can be found as python modules (files) or packages (directories) in this repository.


Model Conversion

Follow model conversion process similar to the one described below.


Make sure you've infrastructure pre-requisites installed before you start porting neural network model for inferencing.

Developed and Tested on

  1. Hardware
    1. AMD Ryzen Threadripper 1900X 8-Core Processor
    2. Accelerator = Radeon Instinct™ MI25 Accelerator
  2. Software
    1. Ubuntu 16.04 LTS OS
    2. Python 2.7
    3. MIVisionX 1.7.0
    4. AMD OpenVX 0.9.9
    5. GCC 5.4


  • MIVisionX Team


  1. yoloV2 paper
  2. Tiny Yolo aka Darknet reference network
  3. MiVisionX Setup
  4. AMD OpenVX
  5. Optimization with OpenVX Graphs
  6. Measuring Traffic Speed With Deep Learning Object Detection

Comments ( 0 )

Sign in for post a comment




No release




load more
can not load any more