--- license: apache-2.0 pipeline_tag: image-segmentation library_name: executorch --- # selfie-segmentation This repository hosts the **selfie-segmentation** models exported for the [React Native ExecuTorch](https://www.npmjs.com/package/react-native-executorch) library as ExecuTorch `.pte` programs, ready to run on device. Upstream model: [selfie segmentation](https://ai.google.dev/edge/mediapipe/solutions/vision/image_segmenter) ## Variants | Path | Backend | Precision | | --- | --- | --- | | `coreml/selfie_segmentation_coreml_fp16.pte` | coreml | fp16 | | `coreml/selfie_segmentation_landscape_coreml_fp16.pte` | coreml | fp16 | | `xnnpack/selfie_segmentation_xnnpack_fp32.pte` | xnnpack | fp32 | | `xnnpack/selfie_segmentation_landscape_xnnpack_fp32.pte` | xnnpack | fp32 | ## Unshipped backends A backend directory carrying a `NOTES.md` and no `.pte` was exported and not published. Its note records what went wrong. - `mlx` ([why](https://huggingface.co/software-mansion/react-native-executorch-selfie-segmentation/blob/main/mlx/NOTES.md)) ## Repository structure ``` config.json 41 B coreml/config.json 1.4 kB coreml/selfie_segmentation_coreml_fp16.pte 601 kB coreml/selfie_segmentation_landscape_coreml_fp16.pte 601 kB mlx/NOTES.md 2.4 kB xnnpack/config.json 1.4 kB xnnpack/selfie_segmentation_landscape_xnnpack_fp32.pte 463 kB xnnpack/selfie_segmentation_xnnpack_fp32.pte 486 kB ``` ## Compatibility These files are published for the **ExecuTorch v1.4.1** runtime. ExecuTorch gives no forward compatibility guarantee, so an older runtime may fail to load them. To use them in React Native ExecuTorch, pass the model constant shipped in the library's model registry to the corresponding task pipeline. See the [documentation](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/downloading-models). To load these files in your own ExecuTorch runtime, read the [compatibility note](https://github.com/pytorch/executorch/blob/main/runtime/COMPATIBILITY.md) first.