Skip to content

Add examples/selfie_segmentation/, an end-to-end example that calibrates selfie_multiclass_256x256.tflite and quantizes it to A8W8 with the min_max, histogram_percentile, and histogram_mse activation ranges, in both calibration modes, and compares the segmentation quality of each quantized model with the float model. - #12079

Merged
copybara-service[bot] merged 1 commit into
mainfrom
litert_pr_1021344586
Nov 20, 2026

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Add examples/selfie_segmentation/, an end-to-end example that calibrates selfie_multiclass_256x256.tflite and quantizes it to A8W8 with the min_max, histogram_percentile, and histogram_mse activation ranges, in both calibration modes, and compares the segmentation quality of each quantized model with the float model.

  • Uses the in-tree async_segmentation sample model and image when present, and otherwise downloads the MediaPipe selfie segmentation model and portrait.jpg into --output_dir (/tmp by default). Other images can be passed with --image_paths; tests use synthetic images.
  • Add pillow to opensource_only/pyproject.toml for image loading.

…rates `selfie_multiclass_256x256.tflite` and quantizes it to A8W8 with the `min_max`, `histogram_percentile`, and `histogram_mse` activation ranges, in both calibration modes, and compares the segmentation quality of each quantized model with the float model.

- Uses the in-tree `async_segmentation` sample model and image when present, and otherwise downloads the MediaPipe selfie segmentation model and `portrait.jpg` into `--output_dir` (`/tmp` by default). Other images can be passed with `--image_paths`; tests use synthetic images.
- Add `pillow` to `opensource_only/pyproject.toml` for image loading.

LiteRT-PiperOrigin-RevId: 1026785496
@copybara-service
copybara-service Bot merged commit fcc3148 into main Nov 20, 2026
24 checks passed
@copybara-service
copybara-service Bot deleted the litert_pr_1021344586 branch November 20, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant