Android segmentation deployment workflow

You will use this workflow:

  1. Prepare LR-ASPP MobileNetV3 weights, labels, sample image, and input and output specifications.
  2. Export and lower the FP32 model to ExecuTorch with XNNPACK.
  3. Validate the FP32 cutout locally and record the baseline mask quality.
  4. Calibrate, quantize, and lower the model to INT8 with XNNPACK.
  5. Validate the INT8 cutout locally and compare it with the FP32 baseline.
  6. Package the INT8 .pte, labels, and model specification as Android assets.
  7. Run the Android object-cutout app on an emulator or physical device.
  8. Inspect how the Java app loads assets, creates tensors, calls ExecuTorch, and postprocesses the output.

By the end of the workflow, you should have FP32 and INT8 .pte artifacts, local FP32 and INT8 cutout images, Android app output, and timing measurements.

Script layout

The repository separates model preparation from Android integration:

    

        
        
aot                    Model preparation, export, lowering, calibration, quantization, and validation
android                Android asset synchronization
android/ObjectCutout   Java Android Gradle project
artifacts              Generated model files and validation images

    

Development and target environments

EnvironmentResponsibilityMain outputs
Development machinePrepare LR-ASPP, export, lower, quantize, validate FP32 and INT8 cutouts.pte artifacts, model_spec.json, labels, validation images
Android emulator or physical Android phoneCheck the build, asset loading, image selection, cutout output, and UI responsivenessCutout and highlight output; stage timings on a physical device
Previous page Complete and continue