YOLOv4 on Edge TPU
#
Prepare int8 tfliteSupported Operation: https://coral.ai/docs/edgetpu/models-intro/#supported-operations
- Use YOLOv4-Tiny because YOLOv4 model size is too large.
- Use relu for activation. YOLOv4-Tiny uses leaky-relu, but this is an unsupported operation on the Edge TPU.
- Set the desired input_size before converting the model to tflite.
#
TrainingRef: https://wiki.loliot.net/docs/lang/python/libraries/yolov4/python-yolov4-training#full-script
- v3
- v2
#
Convert to tflite- v3
- v2
- 2020-02-21
- OS: Ubuntu 20.04
- TF: v2.4.1
- yolov4: v3.1.0
caution
Don't confuse yolov4-iny-relu.cfg
and yolov4-tiny-relu-tpu.cfg
#
Run on Edge TPU#
Install the Edge TPU runtimeRef: https://coral.ai/docs/accelerator/get-started/#1-install-the-edge-tpu-runtime
#
Install just the TensorFlow Lite interpreterRef: https://www.tensorflow.org/lite/guide/python#install_just_the_tensorflow_lite_interpreter
#
Run example script- v3
- v2
edge_yolov4_tiny_video_test.py
edge_yolov4_tiny_video_test.py