Synthetic Intelligence (AI) on the edge is widespread amongst sensible video gadgets. For instance, Good Dwelling cameras and video doorbells revolutionized dwelling monitoring. What started as easy recording and distant viewing instruments has developed into clever observers. With AI infusion, at this time’s cameras can actively analyze scenes, alert customers to movement occasions, acknowledge acquainted faces, spot bundle deliveries, and dynamically modify their recording habits. Enterprise surveillance cameras are one other instance. These cameras have superior decision, enhanced computing energy, and may drive extra refined AI fashions. These enhanced capabilities lead to sharper detection at larger distances.
As illustrated, clients demand clever monitoring methods that may course of knowledge domestically whereas sustaining privateness and decreasing bandwidth prices. To deal with these wants, the AWS Web of Issues (AWS IoT) group has developed a wise digicam answer with AWS companions that mixes Amazon Kinesis Video Streams, Realtek’s low-power Ameba Pro2 microcontroller, and environment friendly machine studying fashions from Plumerai. This weblog publish gives steering for event-triggered video uploads coupled with human detection algorithm processing on the edge.
Answer structure
Determine under illustrates the answer structure that this weblog makes use of:
- Starting with the digicam, the gadget firmware has built-in Realtek SDK to entry digicam modules through outlined APIs.
- The video fragments are delivered to Plumerai’s machine studying fashions for object detection.
- The pattern software provides detection outcomes as bonding field overlay on the unique video fragments. This pattern constantly uploads the fragments to cloud by Kinesis Video Streams Producer SDK. (As an apart, you can too set detection outcomes to set off uploads of 20-second video segments.)
- The Kinesis Video Streams Producer SDK depends on PutMedia API with lengthy HTTPS connection to add MKV fragments constantly in a streaming means.
- The media knowledge might be ingested and the service shops all media knowledge persistently for later evaluation.
- A frontend software performs the playback of stay, or beforehand recorded movies, counting on HLS or DASH protocols from Kinesis Video Streams.
- The answer feeds video and audio knowledge into Giant Language Fashions (LLMs) for Agentic AI insights. (We are going to cowl semantic video search in our subsequent weblog).
Integration highlights
Amazon Kinesis Video Streams
Kinesis Video Streams transforms how companies deal with video options for IP cameras, robots, and vehicles. Key advantages embody:
- A completely managed structure. This helps engineering groups deal with innovation as a substitute of infrastructure and is good for corporations with restricted assets.
- AWS SDKs are open-sourced. High manufacturers particularly worth this independence from platform constraints.
- Versatile pay-per-use pricing mannequin. Whereas gadget improvement can take months or years, you don’t pay till the cameras go stay. With typical cloud storage activation under 30% and declining yearly utilization, prices keep dramatically decrease than mounted license charges.
Plumerai
The Plumerai firm makes a speciality of embedded AI options, specifically centered towards making deep studying tiny and environment friendly. The Plumerai mannequin helps to offer inference on small, inexpensive, and low-power {hardware}. The corporate additionally optimizes AI fashions for the Realtek Ameba Pro2 platform by:
- Meeting-level optimizations can maximize Arm Cortex-M CPU efficiency, and leverages DSP directions for enhanced sign processing capabilities.
- Neural Structure Search (NAS) selects optimum AI fashions for Realtek NPU and reminiscence structure to realize 0.4 TOPS NPU acceleration
- Plumerai fashions use Realtek on-chip {hardware} accelerators (scalers, format converters) to cut back computational load.
- The AI mannequin helps RTOS to seamlessly integrates the SoC’s real-time working system.
- The appliance integrates with Realtek’s media streaming framework.
- The quick boot design helps speedy booting occasions, which improves battery life, and ensures excessive velocity of energetic object detection.
- The sting AI fashions are skilled on 30 million labeled photographs and movies.
These enhancements translate into the next real-world efficiency:
- Delivers precision with out losing reminiscence.
- Captures large scenes by 180° field-of-view lenses.
- Detects people at 20m+ (65ft) distances.
- Handles crowds by monitoring 20 folks concurrently.
- Maintains particular person monitoring with a singular ID system.
- Performs constantly in shiny daylight and complete darkness.
Realtek Ameba Pro2

Determine above illustrates Realtek Ameba Pro2’s knowledge structure. It incorporates Built-in Video Encoder (IVE) and an Picture Sign Processor (ISP) that processes media’s uncooked knowledge and delivers the consequence to a Video Offload Engine (VOE). The VOE then manages a number of video channels and concurrent video streams to help the movement detection algorithm. The Neural Processing Unit (NPU) performs inference on photographs or picture areas. The Parallel Processing Unit (PPU) handles multitasking jobs like cropping Areas of Pursuits (ROIs) from high-resolution photographs, resizing NPU inference enter, and retrieving remaining output from high-resolution channels.This structure unlocks highly effective capabilities to help video analytics on the edge, together with:
- Runing with minimal CPU energy for optimum effectivity.
- Responding in close to actual time to movement.
- Start video processing even through the boot sequence.
- Streaming to each the SD card and cloud by safe WiFi or Ethernet.
- Leveraging NPU to ship superior AI efficiency.
- Integrating with Plumerai fashions and Kinesis Video Streams by a multimedia framework SDK.
Walkthrough
This part outlines the constructing steps for the answer to run edge AI and stream the video fragments.
Stipulations
- AWS account with permission for:
- A stream useful resource with the title “kvs-plumerai-realtek-stream” created on Kinesis Video Streams Console.
- The Realtek Ameba Pro2 Mini MCU.
- Fundamental data about embedded methods and dealing in a Linux surroundings.
- Web connection to obtain the SDK and add movies to AWS.
- Library and machine studying mannequin information from Plumerai. (Please submit your request on the Plumerai Web site.)
Arrange the constructing surroundings
This weblog makes use of an Amazon EC2 with Ubuntu LTS 22.04 because the constructing surroundings. You should utilize your individual Ubuntu pc to cross-compile the SDK.
Amazon EC2 occasion setup:
- Check in into the AWS administration console and navigate to Amazon EC2.
- Launch an occasion with the next configuration:
- Occasion title: KVS_AmebaPlumerAI_poc
- Utility and OS Photos: Ubuntu Server 22.04 LTS (HVM)
- Occasion kind: t3.massive
- Create a brand new key pair for login: kvs-plumerai-realtek-keypair
- Configure storage: 100GiB
- Comply with SSH connection conditions to permit inbound SSH site visitors.
Obtain pattern script from Github:
- Utilizing the next command, log into your Amazon EC2 occasion (make sure to change xxx.yyy.zzz with the occasion’s IP tackle). For detailed directions, see Hook up with your Linux occasion utilizing an SSH consumer.
Get hold of the Plumerai library:
- Utilizing the Plumerai contact us kind, submit a request to obtain a duplicate of their demo bundle. After you have the bundle, change the “plumerai” listing with it within the Amazon EC2 occasion. The up to date listing construction ought to be the next:

Get hold of the Ameba SDK:
- Please contact Realtek to acquire the newest Ameba Pro2 SDK. Within the listing construction, change the “ambpro2_sdk” in Amazon EC2. The listing construction ought to be the next:

Set up dependencies and configure surroundings
- Run the script setup_kvs_ameba_plumerai.sh within the listing sample-kvs-edge_ai-video-streaming-solution from the Github repository:
The script will mechanically set up the Linux dependencies, construct the Realtek toolchain, run crucial Plumerai patches, copy mannequin information, and obtain the Kinesis Video Streams Producer SDK. In case you expertise an error within the course of, please contact Realtek or Plumerai for technical help.
Configure pattern in Kinesis Video Streams Producer SDK
Use the next to configure AWS credentials, stream title, and AWS area. These might be discovered within the element/instance/kvs_producer_mmf/sample_config.h file.
Remark out example_kvs_producer_mmf(); and example_kvs_producer_with_object_detection(); within the file /dwelling/ubuntu/KVS_Ameba_Plumerai/ambpro2_sdk/element/instance/kvs_producer_mmf/app_example.c




Zihang Huang is an answer architect at AWS. He’s an IoT area professional for linked autos, sensible dwelling, sensible renewable power, and industrial IoT. Earlier than AWS, he gained technical expertise at Bosch and Alibaba Cloud. At present, he focuses on interdisciplinary options to combine AWS IoT, edge computing, large knowledge, AI, and machine studying.
Siva Somasundaram is a senior engineer at AWS and builds embedded SDK and server-side elements for Kinesis Video Streams. With over 15 years of expertise in video streaming providers, he has developed media processing pipelines, transcoding and security measures for large-scale video ingestion. His experience spans throughout video compression, WebRTC, RTSP, and video AI. He’s captivated with creating metadata hubs that energy semantic search, RAG experiences, and pushing the boundaries of what’s potential in video expertise.
Emily Chou is director at Realtek Semiconductor Corp. She makes a speciality of wi-fi communication community expertise and has labored with a number of generations of the AmebaIoT MCU. She guides a group to offer connectivity options, video analytics, and edge AI computing.
Marco Jacobs is the Head of Product Advertising and marketing at Plumerai, the place he drives adoption of tiny, extremely correct AI options for sensible dwelling cameras and IoT gadgets. With 25 years of expertise in digicam and imaging functions, he seamlessly connects executives and engineers to drive innovation. Holding seven issued patents, Marco is captivated with reworking cutting-edge AI expertise into enterprise alternatives that ship real-world impression.