Systems and applications for detecting and tracking moving objects, whether people, vehicles, or anything else, are currently in heavy demand. Such tracking is widely used in security and surveillance, military, entertainment, sports, medical imaging, as well as for augmented reality and robotics. In the case of people trackers, many businesses need AI-powered systems tailored for locating, monitoring, counting and analyzing human flows and behavior. This particular case is of great interest for passenger traffic in airports, public transportation, in-store analytics in retail and public facilities. Applying such tracker devices and apps to track people’s location in shopping malls helps businesses to achieve success through customer insights thus improving considerably shopper experience and driving revenue.

Project Description

The aim of this was to develop a system for the analysis of the human activity in supermarkets. In particular, we needed to

  • cluster the regions of interest (ROI),
  • detect, track and count people.

The basic scheme of the “People Tracker” framework is presented in Fig.1:

Fig. 1. System modules

 

The video import module was used for the proper transferring of inputs (either saved video or live streams). All metadata was extracted for other modules. 

The ROI detection module was used for the automatic extraction of store areas with human activity.

   App for tracking people. Picture 1    App for tracking people. Picture 2

Fig. 2. Example of video frame and K-means application

In order to extract ROIs, we have extracted each cluster data separately and applied contour detection. Fig. 3 illustrates the sequence of the binary images corresponding to the K-means clusters:

Tracking device for people

Fig. 3. Data from K-means clusters

Since the clustering of ROIs has been performed using color-based segmentation, there is an evident problem of various shop obstacles obstructing the view of the floor in some situations. In order to make the algorithm more generic, we proposed to track people’s activity and store their trajectories. As a result, these trajectories can be drawn as a point cloud which can be clustered by the same K-means algorithm. Fig. 4 illustrates an example of a video frame with such a point cloud and the ROIs detected.

   App for tracking people. Picture 3    App for tracking people. Picture 4

Fig. 4. Example of a video frame and K-means application

(left – frame with the point cloud, right – detected ROIs)

Each point in the cloud corresponds to the position of the trajectory of an arbitrary person. The extracted points are automatically clustered resulting in the detected human activity areas.

Below you can see a short video sample demonstrating the developed “People Tracker”.

Summary

Being an important domain in computer vision, moving object tracking has a wide variety of applications. Here we have demonstrated our solution to track people inside supermarkets using the K-means clustering algorithm.

People Tracker
Tagged on: