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

AI-assisted

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.

Close
?
You’ll deploy MobileSAM prompt segmentation on Ethos-U85 with ExecuTorch and validate its output on the Corstone-320 FVP. First, you’ll prepare the model and export a quantized program with a fixed point prompt. Then, you’ll build the standard Arm runner and pass image tensors through semihosting. Finally, you’ll compare the host and target masks and confirm both intersection over union (IoU) checks reach 0.9.

Frequently asked questions

AI-assisted

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.

Close
?
How do I know my host is supported before I start?
Run the preflight check to verify macOS 15 or later on Apple silicon, or glibc 2.28 or later on Linux. You’ll also check the required tools, including python3.12, git, cmake, c++, and either Ninja or Make.
Which directory should I run commands from during export and build?
Run commands from the ExecuTorch repository root. Activate your Python environment and source setup_path.sh from the examples/arm/arm-scratch/ directory in the current shell.
What should I expect after running the MobileSAM export step?
Prepare the pinned source and checkpoint first with 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.
What confirms that the FVP execution worked?
Confirm successful runner execution in 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.
How do I validate the segmentation quality and target agreement?
Run the MobileSAM example’s 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.
Next