Accelerate Edge AI Development with SiMa.ai Edgematic and Seamless AWS Integration
Deploying machine learning models at the edge just got easier. By combining Amazon SageMaker AI with SiMa.ai’s Palette Edgematic platform, you can build, train, and deploy optimized ML models efficiently for real-time edge applications. The Palette platform is designed to run on SiMa.ai’s MLSoC (Machine Learning System on Chip) hardware, offering compatibility across the entire SiMa.ai product range. This ensures smooth scalability, easy upgrades, and flexible deployment options, all while reducing your total cost of ownership.
Edge AI is critical in environments like warehouses, construction sites, and manufacturing floors, where detecting human presence and personal protective equipment (PPE) can prevent accidents and enforce safety compliance. Cloud-based image recognition often struggles with latency, which is unacceptable in safety-critical scenarios. Deploying a PPE detection model optimized on SiMa.ai MLSoC devices achieves real-time, high-performance monitoring directly on edge hardware, eliminating latency and security risks associated with cloud inference.
How the Solution Works
The integrated solution uses SiMa.ai Edgematic with SageMaker JupyterLab to deploy YOLOv7, a well-known object detection model, to edge devices. Edgematic provides a low-code, cloud-based pipeline from model preparation to edge deployment. This workflow simplifies managing updates, testing inference performance on hardware, and eliminates the need for continuous cloud connectivity—resulting in low latency, improved security, and data privacy.
The workflow has two key phases:
- ML training and exporting: Train and validate your model in SageMaker AI. Use SiMa.ai SDKs to optimize, quantize, test, and compile models from PyTorch, TensorFlow, or ONNX into binaries that run efficiently on SiMa.ai’s ML accelerator.
- ML edge evaluation and deployment: Transfer compiled model files to Edgematic for streamlined deployment and validate real-time performance directly on edge devices to ensure safety monitoring requirements are met.
Step-by-Step Guide to Build Your Edge AI Solution
- Create a custom Docker image for SageMaker JupyterLab.
- Launch SageMaker JupyterLab using the custom image.
- Train your object detection model inside the Jupyter notebook environment.
- Perform graph surgery, quantize, and compile the model.
- Import the optimized model into SiMa.ai Edgematic and evaluate its performance on edge hardware.
Prerequisites
- An AWS account with appropriate IAM permissions and AWS CLI configured.
- Local installation of Docker and Git.
- Access to the SiMa.ai Developer Portal. Register for a free account if you don’t have one.
Create a Custom SageMaker JupyterLab Image
SageMaker JupyterLab lets developers build and train ML models with a familiar interface. To integrate with SiMa.ai Palette APIs, start by provisioning AWS resources in the us-east-1 region, including a SageMaker domain and user, plus an Amazon ECR private repository for your Docker images.
Download the SiMa.ai Palette Docker image from the Developer Portal. Palette contains tools to quantize and compile ML models for SiMa.ai’s MLSoC devices and integrates seamlessly with SageMaker JupyterLab.
Tag the Palette Docker image and push it to your Amazon ECR repository. Make sure your AWS CLI is configured with credentials that have AmazonEC2ContainerRegistryFullAccess. Login to ECR and push the image using:
aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
docker load < palette.tar
docker tag palette/sagemaker <ecr_repository_uri>
docker push <ecr_repository_uri>
Note: The Palette image is over 25 GB; pushing it may take several hours depending on your internet speed.
Next, configure SageMaker JupyterLab to use this custom image through the SageMaker console by creating an image resource pointing to your ECR URI. Attach this image to your SageMaker domain and user profile to make it available inside Studio.
Launch SageMaker JupyterLab with Your Custom Image
Create a new JupyterLab space in SageMaker Studio, selecting a GPU-based instance (like ml.g4dn.xlarge) with at least 16 GB memory and 30 GB disk space for efficient training. Choose the Palette image as your environment and launch JupyterLab.
Train the Object Detection Model
Inside JupyterLab, clone the SiMa.ai GitHub repository with example notebooks. Use the yolov7.ipynb to work with YOLOv7, fine-tuning it to detect humans, heads, and helmets. The dataset uses the open-images-v7 dataset with about 8,000 labeled images per class, split 75/25 for training and validation.
Select between YOLOv7 and YOLOv7-tiny weights depending on your accuracy and training time requirements. Retrain the model for 10 epochs using the notebook commands. This achieves an mAP around 0.6, sufficient for reliable PPE detection.
After training, export the model to ONNX format for further optimization.
Optimize Your Model: Graph Surgery, Quantization, Compilation
Graph surgery modifies the ONNX model’s computational graph by replacing unsupported operations like Reshape, Split, and Concat with hardware-compatible equivalents such as point-wise convolutions. This step ensures compatibility with SiMa.ai MLSoC without affecting learned parameters.
Next, quantize the model from 32-bit float to 8-bit integer. This reduces size and computational requirements, making the model faster and more efficient on edge devices. Validate the quantized model with inference tests to confirm accuracy remains acceptable.
Finally, compile the quantized model into a binary (.lm) and a configuration file (.json) for the SiMa.ai ML accelerator. The notebook uploads the compiled package to an S3 bucket and provides a pre-signed link to download it for deployment.
Deploy and Evaluate the Model with SiMa.ai Edgematic
Switch to SiMa.ai Edgematic to build the complete edge application. Edgematic provides drag-and-drop plugins for preprocessing, postprocessing, UDP sync, and video encoding, streamlining application development without custom code.
Create a new project in Edgematic and load the YOLOv7 pipeline from the Developer Community. Request a device, start the pipeline, and deploy the application wirelessly. After deployment, the app will detect people in the video stream on the SiMa.ai MLSoC.
Add your custom-trained PPE model by importing it via the generated S3 pre-signed link. Replace the existing YOLOv7 block in the pipeline with your new PPE detection model to tailor the application for workplace safety monitoring.
Summary
This workflow enables rapid development and deployment of optimized edge AI applications with low latency and high accuracy. By combining SageMaker’s powerful training environment and SiMa.ai’s edge-focused tooling, IT and development teams can build safety-critical monitoring solutions with minimal overhead.
For those interested in expanding their AI skills, consider exploring practical AI courses and certifications that cover edge AI deployment and model optimization techniques. Visit Complete AI Training for a curated list of resources and courses tailored for developers and IT professionals.
Your membership also unlocks: