Repository to host GStreamer based Edge AI applications for TI devices
This repo adds a vision based people tracking support.
- About People Tracking Demo
- Supported Devices
- EVM Setup
- Demo Setup and Running
- Result
- Basic Summary of the Code Changes
- Resources
This demo uses AM62A to run a vision-based artificial intelligent model for people tracking. Vision-based people tracking has applications in several fields such as retail, building automation, security and safety. This demo utilizes YOLOX-S-Lite machine learning model to detect individuals in the video stream. The output of this model is used to track people moving within the scene. An open source library, Norfair, is used for people tracking. This demo is implemented on AM62A SOC and it can be seamlessly ported to run on other AM6xA devices.
The demo offers live tracking of individuals in the scene with timers indicating the duration they spent at their current location. In addition, it features a dashboard presenting several statistics such as the total number of visitors, the current occupancy and the distribution of the time individuals spent in the scene. The demo also includes a heatmap highlighting frequently visited areas. This feature provides insights to understand human behavior which has applications in several industries. For instance, the heatmap data can inform the rearrangement shelf layout at retail stores to enhance customer experience.
See Resources for links to AM62A and other Edge AI training material.
DEVICE | Supported |
---|---|
AM62A | ✔️ |
Follow the AM62A Quick Start guide for the AM62A Starter Kit
- Download the Edge AI SDK from ti.com.
- Ensure that the tisdk-edgeai-image-am62axx.wic.xz is being used.
- Install the SDK onto an SD card using a tool like Balena Etcher.
- Connect to the device (EVM) and login using a UART connection or a network connection through an SSH session.
-
Clone this repo in your target under /opt
root@am62axx-evm:/opt# git clone https://github.com/TexasInstruments/edgeai-gst-apps-people-tracking root@am62axx-evm:/opt# cd edgeai-gst-apps-people-tracking
-
Run the setup script below within this repository on the EVM. This requires an internet connection on the EVM.
-
An ethernet connection is recommended.
-
Proxy settings for HTTPS_PROXY may be required if the EVM is behind a firewall.
root@am62axx-evm:/opt/edgeai-gst-apps-people-tracking# ./setup-people-tracking.sh
This script will download the following:
- Download the YOLOX-S-LITE model and install it under /opt/model_zoo in the filesystem, if it is not already installed.
- Install the Norfair tracking library.
-
Run commands as follows from the base directory of this repo on the EVM.
root@am62axx-evm:/opt/edgeai-gst-apps-people-tracking# cd apps_python
- To run the demo using a camera as input:
root@am62axx-evm:/opt/edgeai-gst-apps-people-tracking/apps_python# ./app_edgeai.py ../configs/people-detection.yaml
The application shows two main sections on the screen: live feed of the input video and a graphical dashboard. The live video is overlaid with total and still duration data and the history of the movement. The dashboard graphically shows an overview of the total visitors and the current occupancy. It also shows two hisogram graph bars for analyzing the total and still durations. The bottom of the dashboard shows a heatmap over lay on the scene based on the history of all detected individuals. The figures belewo shows a screenshot of the demo and provides details about the view and possible applications.
- apps_python:
- Add a new post process class for people tracking in post_process.py.
- Add a new dashboard class in dashboard.py to generate graphical representation of data.
- Add a new ObjectTime and ObjectTimeCount in object_time_count.py to count total time and still time for each tracket object.
- add a new calss HeatMap in heat_map.py to generate heatmap based on history of all detected objects and overlay on input frame.
- add a new class LitePlot in lite_plot.py to draw various plots which are desgined to take short times.
- apps_cpp: Not changed in this version
- configs: Create two new config files:
- /configs/people_tracking.yaml to run the demo using a CSI or a USB camera feed as input.