Semantic segmentation

A semantic segmentation model can identify the individual pixels that belong to different objects, instead of just a box for each one.

With the Coral Edge TPU™, you can run a semantic segmentation model directly on your device, using real-time video, at over 100 frames per second. You can even run a second model concurrently on one Edge TPU, while maintaining a high frame rate.

This page provides several trained models that are compiled for the Edge TPU, and some example code to run them.

Trained models link

These models are trained and compiled for the Edge TPU.

Notice: These are not production-quality models; they are for demonstration purposes only.
Model name Detections/Dataset Input size Depth mul. Output stride TF ver. Latency1 Model size Downloads

U-Net MobileNet v2

37 pets
Oxford-IIIT pets

128x128 N/A N/A 1 3.6 ms 7.2 MB

Edge TPU model, CPU model,
Labels file

U-Net MobileNet v2

37 pets
Oxford-IIIT pets

256x256 N/A N/A 1 27.7 ms 7.3 MB

Edge TPU model, CPU model,
Labels file

MobileNet v2 DeepLab v3

20 objects
PASCAL VOC2012

513x513 0.5 N/A 1 43.3 ms 1.1 MB

Edge TPU model, CPU model,
Labels file

MobileNet v2 DeepLab v3

20 objects
PASCAL VOC2012

513x513 1.0 N/A 1 49.4 ms 2.9 MB

Edge TPU model, CPU model,
Labels file

MobileNet v1 BodyPix

24 body parts

512x512 0.75 16 1 10.7 ms 1.7 MB

Edge TPU model

MobileNet v1 BodyPix

24 body parts

480x352 0.75 16 1 N/A 1.6 MB

Edge TPU model

MobileNet v1 BodyPix

24 body parts

640x480 0.75 16 1 N/A 1.8 MB

Edge TPU model

MobileNet v1 BodyPix

24 body parts

768x576 0.75 16 1 N/A 1.8 MB

Edge TPU model

MobileNet v1 BodyPix

24 body parts

1024x768 0.75 16 1 N/A 2.0 MB

Edge TPU model

MobileNet v1 BodyPix

24 body parts

1280x720 0.75 16 1 N/A 2.3 MB

Edge TPU model

ResNet-50 BodyPix

24 body parts

416x288 N/A 16 1 N/A 24.5 MB

Edge TPU model

ResNet-50 BodyPix

24 body parts

640x480 N/A 16 1 N/A 26.6 MB

Edge TPU model

ResNet-50 BodyPix

24 body parts

768x496 N/A 32 1 N/A 26.9 MB

Edge TPU model

ResNet-50 BodyPix

24 body parts

864x624 N/A 32 1 N/A 28.5 MB

Edge TPU model

ResNet-50 BodyPix

24 body parts

928x672 N/A 16 1 N/A 35.3 MB

Edge TPU model

ResNet-50 BodyPix

24 body parts

960x736 N/A 32 1 N/A 38.6 MB

Edge TPU model

1 Latency is the time to perform one inference, as measured with a Coral USB Accelerator on a desktop CPU. Latency varies between systems and is primarily intended for comparison between models. For more comparisons, see the Performance Benchmarks.

Example code link

videocam

Person segmentation with video

This example takes in a camera feed and performs body-part segmentation using the BodyPix model (with both MobileNet v1 and ResNet50 backbones). In addition to identifying different body parts, it can anonymize people from images.

Languages: Python

Semantic segmentation

This example performs semantic segmentation on an image. It takes an image as input and creates a new version of that image showing which pixels correspond to each recognized object.

Languages: Python