Basic object detection
An example that performs object detection with a photo and draws a square around each object. Also works with face detection models.
Languages: Python
With the Coral Edge TPU™, you can run an object detection model directly on your device, using real-time video, at over 100 frames per second. You can even run multiple detection models concurrently on one Edge TPU, while maintaining a high frame rate.
This page provides several trained models that are compiled for the Edge TPU, example code to run them, plus information about how to train your own model with TensorFlow.
These models are trained and compiled for the Edge TPU.
Model name | Detections/Dataset | Input size | TF ver. | Latency 1 | mAP 2 | Micro 3 | Model size | Downloads |
---|---|---|---|---|---|---|---|---|
SSD MobileNet V1 |
90 objects |
300x300x3 | 1 | 6.5 ms | 21.5% | Yes | 7.0 MB | |
SSD/FPN MobileNet V1 |
90 objects |
640x640x3 | 2 | 229.4 ms | 31.1% | No | 37.7 MB | |
SSD MobileNet V2 |
90 objects |
300x300x3 | 1 | 7.3 ms | 25.6% | Yes | 6.6 MB | |
SSD MobileNet V2 |
90 objects |
300x300x3 | 2 | 7.6 ms | 22.4% | Yes | 6.7 MB | |
SSD MobileNet V2 |
Faces |
320x320x3 | 1 | 5.2 ms | N/A | Yes | 6.7 MB | |
SSDLite MobileDet |
90 objects |
320x320x3 | 1 | 9.1 ms | 32.9% | Yes | 5.1 MB | |
EfficientDet-Lite0 |
90 objects |
320x320x3 | 2 | 37.4 ms | 30.4% | No | 5.7 MB | |
EfficientDet-Lite1 |
90 objects |
384x384x3 | 2 | 56.3 ms | 34.3% | No | 7.6 MB | |
EfficientDet-Lite2 |
90 objects |
448x448x3 | 2 | 104.6 ms | 36.0% | No | 10.2 MB | |
EfficientDet-Lite3 |
90 objects |
512x512x3 | 2 | 107.6 ms | 39.4% | No | 14.4 MB | |
EfficientDet-Lite3x* |
90 objects |
640x640x3 | 2 | 197.0 ms | 43.9% | No | 20.6 MB |
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.
2 mAP is the "mean average precision," as specified by the COCO evaluation metrics. Our evaluation uses a subset of the COCO17 dataset.
3 Indicates compatibility with the Dev Board Micro. Some models are not compatible because they require a CPU-bound op that is not supported by TensorFlow Lite for Microcontrollers or they require more memory than available on the board. (All models are compatible with all other Coral boards.)
* EfficientDet-Lite3x is not compatible with Edge TPUs over USB; it can be used only with PCIe-based devices. Our benchmarks for EfficientDet-Lite3x come from a desktop system paired with the Asus AI Accelerator—your results will vary.
Basic object detection
An example that performs object detection with a photo and draws a square around each object. Also works with face detection models.
Languages: Python
Image recognition with video
Multiple examples showing how to stream images from a camera and run classification or detection models with the TensorFlow Lite API. Each example uses a different camera library, such as GStreamer, OpenCV, PyGame, and PiCamera.
Languages: Python
Object tracking with video
This example takes a camera feed and tracks each uniquely identified object, assigning each object with a persistent ID. The example detection script allows you to specify the tracker program you want to use (the Sort tracker is included).
Languages: Python
If you’d like to train an object detection model to recognize new types of objects, try the following tutorials: