Run MobileSAM prompt segmentation on Arm Ethos-U85 with ExecuTorch
Introduction
Understand the MobileSAM deployment workflow
Prepare the ExecuTorch and Arm environment
Export MobileSAM for Ethos-U85
Build and run MobileSAM on the Corstone-320 FVP
Validate the MobileSAM segmentation result
Next Steps
Run MobileSAM prompt segmentation on Arm Ethos-U85 with ExecuTorch
Who is this for?
This Learning Path is for embedded machine learning developers who want to evaluate transformer-based image segmentation on an Arm Ethos-U85 NPU with ExecuTorch.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Identify how the MobileSAM example turns a fixed point prompt and an image into a quantized segmentation mask
- Set up ExecuTorch and the Arm Ethos-U development tools
- Export, build, and run the MobileSAM example on a Corstone-320 Fixed Virtual Platform (FVP)
- Validate quantization quality, Ethos-U delegation, and target mask agreement
Prerequisites
Before starting, you will need the following:
- A Linux development machine with glibc 2.28 or later, or an Apple silicon Mac running macOS 15 or later
- Familiarity with PyTorch model export and embedded cross-compilation
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
0.9.Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
python3.12, git, cmake, c++, and either Ninja or Make.ExecuTorch repository root. Activate your Python environment and source setup_path.sh from the examples/arm/arm-scratch/ directory in the current shell.prepare_mobilesam.py. After running export_mobilesam.py without arguments, you’ll find mobilesam.pte, input.bin, host mask images, metrics.json, and delegation.txt under arm_test/mobilesam/export/. Check that fp32_quantized_iou in the metrics is at least 0.9.arm_test/mobilesam/fvp.log and check that output-0.bin under arm_test/mobilesam/io/ contains the target output tensor. Then run the visualization step to compare the target mask with your host quantized mask. If you use the complete run.sh workflow, you’ll see MobileSAM example: PASS after validation succeeds.visualize_fvp_output.py without arguments, as shown in the validation step. Under arm_test/mobilesam/result/, check fvp_reference_iou in metrics.json and inspect fvp_comparison.png. You need an IoU of at least 0.9. This comparison checks agreement with your host mask on the example image.