Image Segmentation to Apply Pixel Masks to Scenes | Fritz

Image Segmentation

Use Image Segmentation to recognize everyday objects and identify exactly which pixels belong to each object. Great for creating pixel-level masks, performing portrait segmentation and more.

Getting Started

import Fritz

var visionModel: FritzVisionPeopleSegmentationModel?

let image = FritzVisionImage(image: uiImage)

visionModel.predict(image) { [weak self] (mask, error) in
    guard let mask = mask else { return }
    let maskImage = mask.toImageMask(of: FritzVisionPeopleClass.person)
    DispatchQueue.main.async {
        self?.maskView.image = maskImage
Image Segmentation

The Swift code sample here illustrates how simple it can be to use image segmentation in your app. Use the links below to access additional documentation, code samples, and tutorials that will help you get started.


Supports 4 Scenes

Use Image Segmentation to recognize different objects in one of 4 scenes:

  • People - Identify and mask people in a scene.
  • Hair - Identify hair and alter color, style, and appearance.
  • Outdoor - Identify different objects when you’re exploring the city or your neighborhood.
    • Buildings
    • Sky
    • Tree
    • Pavement / Sidewalk
    • Ground
    • Car
    • Water
    • House
    • Fence
    • Signs
    • Skyscrapers
    • Bridge
    • River
    • Bus
    • Tree
    • Truck / Motortruck
    • Van
    • Minibike / Motorbike
    • Bicycle
    • Traffic Light
    • Person
  • Living Room - Identify different objects when you’re at home.
    • Chair
    • Wall
    • Coffee Table
    • Ceiling
    • Floor
    • Bed
    • Lamp
    • Sofa
    • Window
    • Pillow
Runs On-Device

All predictions / model inferences are made completely on-device.

No internet connection is required to interpret images or video.

No internet dependency means super-fast performance.

Cross-Platform SDKs

Supported mobile platforms:

  • Android Image Segmentation
  • iOS Image Segmentation
Live Video Performance

Runs on live video with a fast frame rate.

Exact FPS performance varies depending on device, but it is possible to run this feature on live video on modern mobile devices.

Customize Scenes

Our team can create custom image segmentation scenes upon request.

Technical Specifications


MobileNet and ICNet variants.

Model Size

5 to 25 MB


300 to 8,750 M


224x224 pixels - Hair

384x384 pixels - People, Living Room, Outdoor

768x768 pixels - People


Height and width of the mask

Number of classes the model predicts

Probability that pixel belongs to class


Core ML, TensorFlow, TensorFlow Mobile, TensorFlow Lite, Keras


12 to 30 FPS on iPhone X

1 to 10 FPS on Pixel 2