Vision AI-assisted retail checkout scanners in real-time 

Boost efficiency in retail and barcode scanners with fast vision AI models using NPU's

Application note
Vision AI-assisted retail checkout scanners in real-time 

Application overview

Retail checkout systems are trending towards low-touch and self-serve user experiences, reducing the need to individually scan or enter codes for each item. AI models on imagery can distinguish a wide variety of products, including multiple at the same time, allowing customers to quickly enter their whole order and provide minor corrections as needed. If needed, AI can assist barcode reading in the same system by quickly finding 1-D and 2-D codes on products.

Edge AI enables image processing on a local processor, giving fast, real-time results and protecting customer privacy. Data stays on the device and prevents network stability from impacting the customer while also reducing the recurring cost of cloud-based AI.

Devices like AM62A and AM67A come with the C7™  NPU to accelerate neural network models up to 50x the performance compared to the CPU on an equivalent device. A higher-end system can incorporate additional cameras for extra viewpoints to improve detection accuracy or for adding theft preventation to prevent inventory shrinkage. 

Starting evaluation

Data collection

Vision AI models are trained using images, and for detecting objects for a retail scanner, object detection models like YOLOX are the best choice. The model will detect and distinguish many different products. The ground truth (i.e., annotations) for what the model will recognize are 'bounding boxes', which include the region of the image containing a product and which product that is.

The images will be acquired with cameras, and it is beneficial to include images taken from the cameras that will be used in the final product. A good dataset will have a variety of realistic variations in the scenery, lighting conditions and orientation of the objects. Images can be collected and annotated with CCStudio™ Edge AI Studio using a TI EVM or by manually uploading the images into the tool.

Data quality assessment

Good, well-annotated image data is required for an accurate model. The annotations (bounding boxes) must be accurate to where the products are. 

 

A good dataset must include realistic scenarios and variations, including some of the following:

 

  • Products partially overlapping or touching each other. 
  • Objects that are not purchasable products, like the customers hands, clothing, wallet, etc. should be present. 
  • Lighting variations throughout the day or reflections from products.
  • Slightly damaged yet still human-recognizable products.

Build and train your model

Models may be trained with CCStudio™ Edge AI Studio or edgeai-modelmaker for TI-supported neural networks. More advanced developers may prefer to train custom networks themselves with PyTorch or TensorFlow.

Find the right model for your needs

Start by narrowing the search to an object detection model. Since a retail system may need to detect a large number of different objects, a larger, higher-resolution model is likely better. Larger models were run slower, so there is a balance to navigate depending on the how responsive the system needs to be. A larger number of distinct products will benefit from larger models.

Model variants like YOLO-Small (S) vs. YOLOX-Nano have similar architectures, but the former will have more (and larger) layers to improve accuracy.

For smaller, faster models like a barcode detector, a lower resolution model is used to determine the region of interest before a traditional algorithm decodes the structured visual data into a product number or SKU.

Deploying your model

Model deployment requires the model to be compiled beforehand for the target hardware accelerator. With tools like Edge AI Studio and edgeai-modelmaker, compilation is automatic. Otherwise, compiling models will require a separate step through software packages like edgeai-tidl-tools on the TI GitHub using a Bring Your Own Model flow.

Model artifacts are deployed through runtimes like ONNX Runtime, LiteRT (formerly tensorflow-lite) and TVM using TI Deep Learning (TIDL) as the backend software for hardware acceleration.

To deploy the model into an end-to-end vision application, start with edgeai-gst-apps, which composes the pipeline with multiple stages of hardware acceleration for pre-processing and post-processing the image, in addition to accelerating the AI model itself.

In addition to edgeai-gst-apps, we have built two separate demos for retail checkout and barcode scanning. Demo-quality models were trained for each, and are included as part of the repositories; please find the links to these repositories in the supporting resources.

Retail applications will routinely see items added and removed from the catalog, so it will be important to continually retrain and update the models. Establishing on online update mechanism will be necessary for the full production grade system.

Choosing the right device for you

Device selection will depend on the level of AI performance required and the camera throughput (resolution and framerate).

Note that then AM67A includes 2x C7 NPU cores, which each individually perform at a similar level to AM62A benchmarks. Multiple models can run on individual cores or share the same core.

The benchmarks in the table below were produced using SDK version 10.1. 

Product number
Processing core
NPU available
Model benchmarks
YOLOX-Nano(416x416) Performance
SSD-Mobilenetv2 (512x512) Performance
YOLOX-Small (640x640) Performance
AM62A7
4x Arm®
Cortex®-A53 + C7™ NPU
2 TOPS

8.69 ms

115 FPS

14.51 ms

68 FPS

38.6 ms

25 FPS

TDA4VM
2x Arm®  Cortex®-A72 + C7™ NPU
8 TOPS

4.23 ms

236 FPS

5.46 ms

183 FPS

10.1 ms

99 FPS

FPS (Frames per second)

 

All the hardware, software and resources you’ll need to get started

Hardware

SK-AM62A-LP
The AM62A is the lowest-cost AI-accelerated device in the AM6xA family, and is best suited for evaluation. A generic USB camera or webcam can be used for image capture and model evaluation on live data

Software & development tools

PROCESSOR-SDK-LINUX-AM62A
The Edge AI processor SDK is Linux-based and includes the necessary software components to run a compiled model with hardware acceleration. Other Edge AI accelerated processors may be substituted for AM62A

CCStudio™ Edge AI Studio
This tool contains tools for training, compiling and deploying a model to TI edge AI processors. A model selection tool is available to view pre-generated benchmarks of popular models.

Command-Line tools
Tools for Micro Processor devices with Linux and TIDL support. TI's edge AI solution simplifies the whole product life cycle of DNN development and deployment by providing a rich set of tools and optimized libraries. 

Industrial | Vision

Find and localize specific objects, people in real-time at high framerate with AI-accelerated processors and industry-standard software

Industrial | Classification

Detect people in a wide variety of scenes with vision-based AI in >120 FPS using AI-accelerators