📄️ Example Overview
This project contains multiple AI example programs written in Python, designed for the RDK S100 platform, covering common AI tasks such as image classification, object detection, instance segmentation, pose estimation, OCR, and speech recognition. The examples perform inference using quantized models in .hbm format, enabling developers to quickly validate model performance and accelerate application development.
📄️ Image Classification - ResNet18
This example demonstrates how to deploy the ResNet18 model for image classification inference using the Python API of hbmruntime. It is applicable to RDK S100 devices equipped with a BPU chip. The example code is located in the /app/pydevdemo/01classificationsample/01_resnet18/ directory.
📄️ Image Classification - MobileNetV2
This example demonstrates how to perform image classification using a BPU-deployed MobileNetV2 model with inference executed via hbmruntime. The example code is located in the /app/pydevdemo/01classificationsample/02_mobilenetv2/ directory.
📄️ Object Detection - Ultralytics YOLOv5x
This example demonstrates how to perform object detection on images using a quantized Ultralytics YOLOv5x model on the BPU. It supports preprocessing, postprocessing, NMS (Non-Maximum Suppression), drawing bounding boxes, and saving results. The example code is located in the /app/pydevdemo/02detectionsample/01ultralytics_yolov5x/ directory.
📄️ Object Detection - Ultralytics YOLO11
This example uses the Ultralytics YOLO11 model and leverages the hbmruntime interface to perform object detection on images. It supports image preprocessing, inference, post-processing (including decoding, confidence filtering, and NMS), and saving result images. The example code is located in the /app/pydevdemo/02detectionsample/02ultralyticsyolo11/ directory.
📄️ Semantic Segmentation - UNetMobileNet
This example demonstrates how to run the UNet-MobileNet semantic segmentation model on the BPU using hbmruntime, supporting functionalities such as image preprocessing, inference, and post-processing (parsing outputs and overlaying colored segmentation masks). The example code is located in the /app/pydevdemo/03instancesegmentationsample/01unetmobilenet/ directory.
📄️ Instance Segmentation - Ultralytics YOLO11
This example demonstrates how to run the YOLOv11 instance segmentation model on the BPU using hbmruntime, supporting image preprocessing, inference, and post-processing (parsing outputs and overlaying colored segmentation masks). The example code is located in the /app/pydevdemo/03instancesegmentationsample/02ultralyticsyolo11seg/ directory.
📄️ Pose Estimation - Ultralytics YOLO11
This example demonstrates how to run the Ultralytics YOLO11 pose estimation model on the BPU using hbmruntime, enabling human keypoint detection and visualization. It supports model preprocessing, inference execution, and post-processing (including keypoint decoding, bounding box drawing, and keypoint annotation). The example code is located in the /app/pydevdemo/04posesample/01ultralyticsyolo11_pose/ directory.
📄️ Instance Segmentation - Ultralytics YOLOE11
This example demonstrates how to run the Ultralytics YOLOE11 instance segmentation model on the BPU using hbmruntime. The program implements a complete pipeline from input image preprocessing, model inference, post-processing, to result visualization. The example code is located in the /app/pydevdemo/05openinstancesegsample/01yoloe11seg/ directory.
📄️ Lane Detection - LaneNet
This example runs the LaneNet model based on hbmruntime to perform instance segmentation and binary segmentation of lane lines, and saves the resulting images locally. The example code is located in the /app/pydevdemo/06lanedetectionsample/01lanenet/ directory.
📄️ Automatic Speech Recognition - ASR
This example runs a speech recognition model based on the hbmruntime inference engine to automatically transcribe .wav audio files into corresponding text. The example code is located in the /app/pydevdemo/07speechsample/01_asr/ directory.
📄️ Text Detection and Recognition - PaddleOCR
This example runs the PaddleOCR model using the hbmruntime inference engine for text detection and recognition, supporting OCR recognition and visualization in Chinese scenarios. The example code is located in the /app/pydevdemo/08OCRsample/01paddleOCR/ directory. The example code is also located in the /app/pydevdemo/02detectionsample/02ultralyticsyolo11/ directory.
📄️ USB Camera YOLOv5x Inference
A real-time inference example of Ultralytics YOLOv5x based on hbmruntime, which supports reading frames from a USB camera for object detection and visualizing the detection results in full-screen mode. The sample code is located under the directory /app/pydevdemo/09usbcamera_sample/.
📄️ MIPI Camera YOLOv5x Inference
This is a real-time inference example based on hbmruntime using Ultralytics YOLOv5x. It supports reading frames from a MIPI camera, performing object detection, and visualizing detection results in full-screen mode. The sample code is located in the /app/pydevdemo/10mipicamera_sample/ directory.
📄️ WebSocket YOLOv5x Inference
This example demonstrates how to perform object detection using the Ultralytics YOLOv5x model on an embedded platform (e.g., RDK S100) equipped with an HBM accelerator and a VIO camera module, and stream JPEG images along with detection bounding boxes in real time via WebSocket. The example code is located in the /app/pydevdemo/11webdisplaycamera_sample/ directory.