# Segmentation
Image segmentation is the process of partitioning a digital image into multiple
segments (sets of pixels, also known as image objects). The goal of segmentation
is to simplify and/or change the representation of an image into something that
is more meaningful and easier to analyze.
The following image shows the output of the image segmentation model on Android.
The model will create a mask over the target objects with high accuracy.
Note: To integrate an existing model, try
[TensorFlow Lite Task Library](https://www.tensorflow.org/lite/inference_with_metadata/task_library/image_segmenter).
## Get started
If you are new to TensorFlow Lite and are working with Android or iOS, it is
recommended you explore the following example applications that can help you get
started.
You can leverage the out-of-box API from
[TensorFlow Lite Task Library](../../inference_with_metadata/task_library/image_segmenter)
to integrate image segmentation models within just a few lines of code. You can
also integrate the model using the
[TensorFlow Lite Interpreter Java API](../../guide/inference#load_and_run_a_model_in_java).
The Android example below demonstrates the implementation for both methods as
[lib_task_api](https://github.com/tensorflow/examples/tree/master/lite/examples/image_segmentation/android/lib_task_api)
and
[lib_interpreter](https://github.com/tensorflow/examples/tree/master/lite/examples/image_segmentation/android/lib_interpreter),
respectively.
View
Android example
View
iOS example
If you are using a platform other than Android or iOS, or you are already
familiar with the
TensorFlow Lite
APIs, you can download our starter image segmentation model.
Download
starter model
## Model description
_DeepLab_ is a state-of-art deep learning model for semantic image segmentation,
where the goal is to assign semantic labels (e.g. person, dog, cat) to every
pixel in the input image.
### How it works
Semantic image segmentation predicts whether each pixel of an image is
associated with a certain class. This is in contrast to
object detection, which detects
objects in rectangular regions, and
image classification, which
classifies the overall image.
The current implementation includes the following features:
| Model Name | Model size | Device | GPU | CPU |
|---|---|---|---|---|
| Deeplab v3 | 2.7 Mb | Pixel 3 (Android 10) | 16ms | 37ms* |
| Pixel 4 (Android 10) | 20ms | 23ms* | ||
| iPhone XS (iOS 12.4.1) | 16ms | 25ms** |