Get the Code
View the demo
by Mark Sturdevant, Michael Hollinger | Published May 11, 2018
Artificial intelligenceData sciencePythonCloud
Whether you are counting cars on a road or products on a conveyor belt, there are many use cases for computer vision with video. With video as input, you can use automatic labeling to create a better classifier with less manual effort. This code pattern shows you how to create and use a classifier to identify objects in motion and then track and count the objects as they enter designated regions of interest.
Whether it is car traffic, people traffic, or products on a conveyer belt, there are many applications for keeping track of potential customers, actual customers, products, or other assets. With video cameras everywhere, a business can get useful information from them with some computer vision. Applying this technology to videos is much more practical than older methods (for example, using special hardware or a person counting vehicle traffic).
This code pattern explains how to create a video car counter using the PowerAI Vision Video Data Platform, OpenCV, and a Jupyter Notebook. You’ll use a little manual labeling and a lot of automatic labeling to train an object classifier to recognize cars on a highway. You’ll load another car video into a Jupyter Notebook where you’ll process the individual frames and annotate the video.
You’ll use the deployed model for inference to detect cars on a sample of the frames at a regular interval, and you’ll use OpenCV to track the cars from frame to frame in between inference. In addition to counting the cars as they are detected, you’ll also count them as they cross a “finish line” for each lane and show cars per second.
When you’ve completed this code pattern, you will understand how to:
Find the detailed steps for this pattern in the README. The steps will show you how to:
March 26, 2019
July 15, 2019
Adversarial Robustness ToolboxAI Fairness 360+
March 14, 2019
Back to top