Traffic Management: Edge AI Helps Build Smart City And Public Safety with Intelligent Transportation System

Smart Traffic Management is as important as Smart Transportations

When we talk about smart transportation, one of the most ground-breaking AI applications is always autonomous vehicles. More vehicles come to the city, traffic management, and safety much more matter to urban residents and the transportation department. Smart transportation refers to an intelligent integrated transportation system including but not limited to wireless communication, AI, and computer vision for enhancing smarter mobility. The online car shopping guide estimated that 15.2 million new cars will be sold in 2022, representing a 1.2% increase from its 2021 vehicle sales. With more vehicles, another transportation problem that people face on a daily basis is traffic congestion. Congestion also leads to higher fuel consumption, air pollution, and unnecessary waste of time and energy. Traffic violations are the leading cause of road deaths. AI is now set to solve this issue.

Let’s look at Los Angeles, the city across the I-405 freeway, which was ranked as the 11th most congested roadway in the U.S. (Form 2021 Global Traffic Scorecard, INRIX. Actually I thought it was at least top 5?)

I-405 Improvement Project partnered with Iteris utilizing the intelligent transportation system (ITS) and 405 Express Lanes infrastructure design including changeable message signs, CCTV cameras, vehicle detection, ramp metering, and communications networks for both ITS and the Express Lanes. 

File:I-405 (CA).svg - 维基百科,自由的百科全书
?Wikipedia: I-405

Traffic management with Intelligent Transportation System (ITS)

The I-405 Improvement Project explains how ITS combines technology such as IoT and AI to help transportation mechanisms cooperate together. 

AI integrated cameras that can ease the bottlenecks and chokepoints that often hinder traffic in our cities. Traffic congestion occurs mainly due to the neglect of certain factors, such as the distance between two moving vehicles, traffic lights, road signs, and pedestrians at the crossroad.

The intelligent transportation system (ITS) is a major computer vision applied field, including vehicle classification, traffic violation detection, traffic flow analysis, parking lot detection, license plate recognition, pedestrian detection, traffic sign detection, collision avoidance, and road condition monitoring, and in-vehicle driver attention detection.

Deploy Edge AI into our cities

Let’s dive into examples deploying NVIDIA Jetson-powered applications into smart cities utilizing fast training & deployment platforms and pertained models.

  • Pedestrian and Bicyclists detection
  • Car and people detection
  • License plate detection
  • AI-enabled traffic management camera in the city of Denver

Pedestrian Detection

alwaysAI: How to Detect Pedestrians and Bicyclists in a Cityscape

Crossroad requires more reliable data, including vehicle, bicycle and pedestrian information. A more complete traffic analysis is essential to future road improvements. Detecting pedestrians and cyclists in urban cities is a key part of autonomous driving applications. Self-driving cars need to determine the distance between pedestrians and cyclists, as well as their intent.
We can use object detection to detect and differentiate people or bicycles in a scene. However, if you need to more accurately calculate the location of people and bicycles, semantic segmentation is more suitable, where detection is done pixel by pixel rather than bounding box.

alwaysAI provides a set of open source pre-trained models in the Model Catalog. The following example uses one of the starter models with a simple algorithm in order to achieve its goal.

Removing Pedestrians and Bicyclists from a Video

In this tutorial, alwaysAI uses the enet computer vision model to segment pedestrians and bicyclists in each frame of a video, and then use the results to perform actions based on the locations of the pedestrians and bicyclists. The alwaysAI semantic_segmentation_cityscape starter app runs the enet model on a series of cityscape images.

The source for this guide can be found at:

Check out how to use alwaysAI and Seeed’s Jetson powered edge devices to quickly deploy AI applications.

The alwaysAI platform also offers advanced AI capabilities to provide a safer and more intelligent driver experience:

  • Driver and in-cabin monitoring 
    • Utilize the pose estimation and facial recognition models for in-cabin monitoring whether drivers are talking on their phones, texting, or wearing their seatbelts. 
  • Smart tech & electric vehicle integration 
    • Improve the driving experience and the consumer demand for more efficient, smart, and electric vehicles. 
  • Smart electronic mirrors 
    • Enhance the visibility of traffic, filter out glare, monitor your blind spots, and overtake vehicle detection to ensure driver safety.
  • Partially or fully autonomous solutions 
    • Use advanced computer vision to detect vehicles, obstacles, pedestrians, lanes, and traffic signs with optimal accuracy. 

Real-Time Vehicle Detection

We can make use of NVIDIA NGC™ provided tools to set up a vehicle identification system. NVIDIA NGC™ hosts a catalog including a curated set of GPU-optimized software to help you quickly start developing end-to-end computer vision solutions, as well as accelerate production-quality models and time of Proof of Concept(POC) for an AI product. NGC catalog includes:

  • Containers package software applications, libraries, dependencies, and run-time compilers
  • The pre-trained models can be used for inference or fine-tuned with transfer learning, saving data scientists and developers valuable time.
  • SDKs include annotation tools, pre-trained models for customization with transfer learning, and SDKs that help achieve deployment across the cloud to the edge for low-latency inference.
  • Helm charts for the deployment of GPU-optimized applications and SDKs.

Check out how to get started with DashCamNet and PeopleNet with Jetson Xavier NX and multi cameras

In order to detect vehicles, we use DashCamNet and PeopleNet model from NGC, as well as following Tomasz’s repository, we can also enable 3 cameras with ~270° field of view.

PeopleNet is used to determine the flow of people, mostly in retail stores, shopping malls, and public transport stop. PeopleNet is a three-level object detection network that uses 960×544 RGB images to detect people, bags, and faces.

DashCamNet described in this card detects one or more physical objects from four categories within an image and returns a box around each object, as well as a category label for each object. The four categories of objects detected by this model are – cars, people, road signs, and bicycles. DashCamNet is based on NVIDIA DetectNet_v2 detector with ResNet18 as a feature extractor.

DashCamNet (DLA0) + PeopleNet (DLA1) on 3 camera streams.

NVIDIA AI-IOT repository: DashCamNet (DLA0) + PeopleNet (DLA1) on 3 camera streams.

The video shows red Boxes corresponding to DashCamNet detections and green ones to PeopleNet. The PeopleNet detections are used to perform person following logic., We can use it detect cars and people with Jetson Xavier NX. Check out more at the NVIDIA’s repository.

Created by AK Huff on YouTube, the demo shows using DashCamNet real-time detect cars and multiple objects while driving.

Automatic license plate recognition (ALPR)

ALPR is a technology that uses object detection and image recognition to read vehicle license plates to create vehicle location data. Automatic license plate recognition is commonly adopted by police and traffic departments for law enforcement purposes, including vehicle license registration, automatic charge at the toll road, tickets, and parking lot.

The main task of Automatic license plate recognition (ALPR) is to find and recognize license plates in images; it is usually divided into 4 sub-task:

  • Vehicle detection
  • License plate detection
  • Character segmentation
  • Character recognition

Task #3 and #4 can be regarded as Optical Character Recognition (OCR) using deep neural networks.

City of Denver: apply an AI-enabled camera to manage traffic during the most congested scenarios. 

From NVDIA’s blog, Sighthound is helping cities improve traffic management and pedestrian safety with software and hardware solutions in Automatic Pedestrian Detection, Intent to Cross, Crowd Detection, Traffic Flow Optimization, Intersection Index, Multimodal Traffic Lane Data Collection to bring cloud-native solutions at the edge.

Sighthound leverages NVIDIA Jetson Embedded System and pre-trained TrafficCamNet model from NGC, and the NVIDIA TAO Toolkit building a full-stack approach to achieve faster time-to-market compute-optimized solutions. Combining its industry-leading proprietary developed traffic data set with the pre-trained TrafficCamNet model from NGC and the NVIDIA TAO Toolkit.

A just a few weeks of development, Sighthound delivered a traffic safety solution to the City of Denver with built-in AI cameras running multiple Computer Vision models including Vehicle Identity (ALPR), Vehicle and People Detection, Vehicle Recognition (MMCG), Classification (type, class), Safety Sensors, Vehicle, and People Counting.

Typical applications:

  • Traffic and Intersection multimodal safety
  • Parking Lots, Garages, and Curbsides
  • EV charging stations and Gas Stations
  • Retail, Hospitality & QSR

Instance Segmentation: Mask R-CNN

In the first example, we discussed the use of pixels segmentation to replace the bounding box. In addition to the bounding boxes, instance segmentation also creates a fine-grained segmentation mask. Segmentation helps delineate between objects and background,

Mask R-CNN is a Convolutional Neural Network (CNN) and state-of-the-art in terms of image segmentation. It combines binary masks with classification and bounding boxes from Faster R-CNN to produce accurate segmentation of images. Mask R-CNN is a flexible object instance segmentation framework, which can not only target detected images and can help to output high-quality segmentation results for each instance.

Mask R-CNN is natively integrated with the DeepStream SDK, a streaming analytic toolkit for building intelligent video analytic applications.

In addition to cars, we can also use Mask R-CNN for detecting and segmenting road pits, cars, lanes, and traffic signs.

Why does Intelligence Traffic Management matter?

Getting mobility safe, correctly manageable and predictable could be a significant competitive advantage for cities design. This shift can help control air of pollution and reduce traffic deaths. It also helps us improve the quality of life—day in, day out—for billions of people.

Latest new arrivals for Edge AI powered by NVIDIA Embedded System

reComputer Jetson series are compact edge computers built with NVIDIA advanced AI embedded systems: Jetson Nano and Xavier NX. With rich extension modules, industrial peripherals, thermal management combined with decades of Seeed’s hardware expertise, reComputer Jetson is ready to help you accelerate and scale the next-gen AI product emerging diverse AI scenarios.

reComputer Jetson is compatible with the entire NVIDIA Jetson software stack, cloud-native workflows, and industry-leading AI frameworks, helping deliver seamless AI integration.

? Exciting news! NVIDIA Jetson AGX Orin Developer Kit is available to at Seeed now for pre-order, be the first one get 8x AI performance in hands and experience a giant leap forward for Edge AI.

Seeed Jetson series is compatible with the entire NVIDIA Jetson software stack, industry-leading AI frameworks, development platforms:

Edge Impulse: the leading development platform for machine learning on edge devices, free for developers and trusted by enterprises. Try it now for building models in minutes.

AlwaysAI, provides developers and enterprises a comprehensive platform for building, deploying, and managing Computer Vision applications on IoT devices. Get started today with our tutorial, and quickly deploy CV applications at the edge.

YOLOv5 ? : You (must have) looked once when you looking for the best object detection application. Check out our latest few-shot object detection use YOLOv5 and Roboflow.

Deci: empowers deep learning developers to accelerate inference on edge or cloud, reach production faster, and maximize hardware potential. Check out How to Deploy and Boost Inference on NVIDIA Jetson.

Nimbus: cloud-based robot development tool

Allxon: Enable Efficient Remote Hardware Management Services for NVIDIA Jetson Platform. Enjoy exclusive 90 days free trial unlock all functions with code H4U-NMW-CPK. Read our partnership story here.

Work with the Seeed Ecosystem

Deploying AI can be faster, flexible, and scalable for everyone. We aim to cover all kinds of AI scenarios at our open-source platform to accelerate industries’ digital transformations. We are looking for partners to join our ecosystem together to deliver solutions to different industries together.

Please contact [email protected] for more ecosystem partnership information.

About Author


April 2022