Learn to Export to TFLite Edge TPU Format From YOLO11 Model
λͺ¨λ°μΌ λλ μλ² λλ μμ€ν κ³Ό κ°μ΄ μ°μ° λ₯λ ₯μ΄ μ νλ λλ°μ΄μ€μ μ»΄ν¨ν° λΉμ λͺ¨λΈμ λ°°ν¬νλ κ²μ κΉλ€λ‘μΈ μ μμ΅λλ€. λ λΉ λ₯Έ μ±λ₯μ μ΅μ νλ λͺ¨λΈ νμμ μ¬μ©νλ©΄ νλ‘μΈμ€κ° κ°μνλ©λλ€. TensorFlow Lite Edge TPU λλ TFLite Edge TPU λͺ¨λΈ νμμ μ κ²½λ§μ λΉ λ₯Έ μ±λ₯μ μ 곡νλ©΄μ μ΅μνμ μ λ ₯μ μ¬μ©νλλ‘ μ€κ³λμμ΅λλ€.
The export to TFLite Edge TPU format feature allows you to optimize your Ultralytics YOLO11 models for high-speed and low-power inferencing. In this guide, we'll walk you through converting your models to the TFLite Edge TPU format, making it easier for your models to perform well on various mobile and embedded devices.
TFLite Edge TPU λ‘ λ΄λ³΄λ΄μΌ νλ μ΄μ ?
Exporting models to TensorFlow Edge TPU makes machine learning tasks fast and efficient. This technology suits applications with limited power, computing resources, and connectivity. The Edge TPU is a hardware accelerator by Google. It speeds up TensorFlow Lite models on edge devices. The image below shows an example of the process involved.
The Edge TPU works with quantized models. Quantization makes models smaller and faster without losing much accuracy. It is ideal for the limited resources of edge computing, allowing applications to respond quickly by reducing latency and allowing for quick data processing locally, without cloud dependency. Local processing also keeps user data private and secure since it's not sent to a remote server.
TFLite Edgeμ μ£Όμ κΈ°λ₯ TPU
λ€μμ TFLite Edge TPU λ₯Ό κ°λ°μμκ² νλ₯ν λͺ¨λΈ νμ μ νμΌλ‘ λ§λλ μ£Όμ κΈ°λ₯μ λλ€:
-
μ£μ§ λλ°μ΄μ€μμ μ΅μ νλ μ±λ₯: TFLite Edge TPU λ μμν, λͺ¨λΈ μ΅μ ν, νλμ¨μ΄ κ°μ, μ»΄νμΌλ¬ μ΅μ νλ₯Ό ν΅ν΄ κ³ μ λ΄λ΄ λ€νΈμνΉ μ±λ₯μ λ¬μ±ν©λλ€. μ΅μνμ μν€ν μ²λ‘ λ μμ ν¬κΈ°μ λΉμ© ν¨μ¨μ±μ μ 곡ν©λλ€.
-
λμ μ°μ° μ²λ¦¬λ: TFLite Edge TPU λ νΉμ νλμ¨μ΄ κ°μκ³Ό ν¨μ¨μ μΈ λ°νμ μ€νμ κ²°ν©νμ¬ λμ μ»΄ν¨ν μ²λ¦¬λμ λ¬μ±ν©λλ€. μ격ν μ±λ₯ μ건μ κ°μΆ λ¨Έμ λ¬λ λͺ¨λΈμ μ£μ§ λλ°μ΄μ€μ λ°°ν¬νλ λ° μ ν©ν©λλ€.
-
Efficient Matrix Computations: The TensorFlow Edge TPU is optimized for matrix operations, which are crucial for neural network computations. This efficiency is key in machine learning models, particularly those requiring numerous and complex matrix multiplications and transformations.
TFLite Edgeλ₯Ό μ¬μ©ν λ°°ν¬ μ΅μ TPU
Before we jump into how to export YOLO11 models to the TFLite Edge TPU format, let's understand where TFLite Edge TPU models are usually used.
TFLite Edge( TPU )λ λ€μκ³Ό κ°μ λ¨Έμ λ¬λ λͺ¨λΈμ μν λ€μν λ°°ν¬ μ΅μ μ μ 곡ν©λλ€:
-
μ¨λλ°μ΄μ€ λ°°ν¬: TensorFlow Edge TPU λͺ¨λΈμ λͺ¨λ°μΌ λ° μλ² λλ λλ°μ΄μ€μ μ§μ λ°°ν¬ν μ μμ΅λλ€. μ¨λλ°μ΄μ€ λ°°ν¬λ₯Ό μ¬μ©νλ©΄ λͺ¨λΈμ νλμ¨μ΄μμ μ§μ μ€νν μ μμΌλ―λ‘ ν΄λΌμ°λ μ°κ²°μ΄ νμνμ§ μμ΅λλ€.
-
ν΄λΌμ°λλ₯Ό μ¬μ©ν μ£μ§ μ»΄ν¨ν TensorFlow TPU: μ£μ§ λλ°μ΄μ€μ μ²λ¦¬ λ₯λ ₯μ΄ μ νμ μΈ μλ리μ€μμ TensorFlow μ£μ§ TPUλ μΆλ‘ μμ μ TPUκ° μ₯μ°©λ ν΄λΌμ°λ μλ²λ‘ μ€νλ‘λν μ μμ΅λλ€.
-
Hybrid Deployment: A hybrid approach combines on-device and cloud deployment and offers a versatile and scalable solution for deploying machine learning models. Advantages include on-device processing for quick responses and cloud computing for more complex computations.
Exporting YOLO11 Models to TFLite Edge TPU
You can expand model compatibility and deployment flexibility by converting YOLO11 models to TensorFlow Edge TPU.
μ€μΉ
νμν ν¨ν€μ§λ₯Ό μ€μΉνλ €λ©΄ μ€νν©λλ€:
For detailed instructions and best practices related to the installation process, check our Ultralytics Installation guide. While installing the required packages for YOLO11, if you encounter any difficulties, consult our Common Issues guide for solutions and tips.
μ¬μ©λ²
Before diving into the usage instructions, it's important to note that while all Ultralytics YOLO11 models are available for exporting, you can ensure that the model you select supports export functionality here.
μ¬μ©λ²
from ultralytics import YOLO
# Load the YOLO11 model
model = YOLO("yolo11n.pt")
# Export the model to TFLite Edge TPU format
model.export(format="edgetpu") # creates 'yolo11n_full_integer_quant_edgetpu.tflite'
# Load the exported TFLite Edge TPU model
edgetpu_model = YOLO("yolo11n_full_integer_quant_edgetpu.tflite")
# Run inference
results = edgetpu_model("https://ultralytics.com/images/bus.jpg")
# Export a YOLO11n PyTorch model to TFLite Edge TPU format
yolo export model=yolo11n.pt format=edgetpu # creates 'yolo11n_full_integer_quant_edgetpu.tflite'
# Run inference with the exported model
yolo predict model=yolo11n_full_integer_quant_edgetpu.tflite source='https://ultralytics.com/images/bus.jpg'
μ§μλλ λ΄λ³΄λ΄κΈ° μ΅μ μ λν μμΈν λ΄μ©μ λ°°ν¬ μ΅μ μ λνUltralytics λ¬Έμ νμ΄μ§λ₯Ό μ°Έμ‘°νμΈμ.
Deploying Exported YOLO11 TFLite Edge TPU Models
After successfully exporting your Ultralytics YOLO11 models to TFLite Edge TPU format, you can now deploy them. The primary and recommended first step for running a TFLite Edge TPU model is to use the YOLO("model_edgetpu.tflite") method, as outlined in the previous usage code snippet.
νμ§λ§ TFLite Edge TPU λͺ¨λΈ λ°°ν¬μ λν μμΈν μ§μΉ¨μ λ€μ 리μμ€λ₯Ό μ°Έμ‘°νμΈμ:
-
Coral Edge TPU on a Raspberry Pi with Ultralytics YOLO11: Discover how to integrate Coral Edge TPUs with Raspberry Pi for enhanced machine learning capabilities.
-
μ½λ μμ : μ€μ©μ μΈ TensorFlow Edge TPU λ°°ν¬ μμ μ μ‘μΈμ€νμ¬ νλ‘μ νΈλ₯Ό μμνμΈμ.
-
λ€μμ μ¬μ©νμ¬ μ£μ§μμ μΆλ‘ μ€ν TPU Python: μ€μ λ° μ¬μ© μ§μΉ¨μ ν¬ν¨νμ¬ Edge TPU μ ν리μΌμ΄μ μ© TensorFlow Lite Python APIλ₯Ό μ¬μ©νλ λ°©λ²μ μ΄ν΄λ³΄μΈμ.
μμ½
In this guide, we've learned how to export Ultralytics YOLO11 models to TFLite Edge TPU format. By following the steps mentioned above, you can increase the speed and power of your computer vision applications.
μ¬μ©λ²μ λν μμΈν λ΄μ©μ Edge 곡μ μΉμ¬μ΄νΈ( TPU )μμ νμΈνμΈμ.
Also, for more information on other Ultralytics YOLO11 integrations, please visit our integration guide page. There, you'll discover valuable resources and insights.
μμ£Ό 묻λ μ§λ¬Έ
How do I export a YOLO11 model to TFLite Edge TPU format?
To export a YOLO11 model to TFLite Edge TPU format, you can follow these steps:
μ¬μ©λ²
from ultralytics import YOLO
# Load the YOLO11 model
model = YOLO("yolo11n.pt")
# Export the model to TFLite Edge TPU format
model.export(format="edgetpu") # creates 'yolo11n_full_integer_quant_edgetpu.tflite'
# Load the exported TFLite Edge TPU model
edgetpu_model = YOLO("yolo11n_full_integer_quant_edgetpu.tflite")
# Run inference
results = edgetpu_model("https://ultralytics.com/images/bus.jpg")
# Export a YOLO11n PyTorch model to TFLite Edge TPU format
yolo export model=yolo11n.pt format=edgetpu # creates 'yolo11n_full_integer_quant_edgetpu.tflite'
# Run inference with the exported model
yolo predict model=yolo11n_full_integer_quant_edgetpu.tflite source='https://ultralytics.com/images/bus.jpg'
λ€λ₯Έ νμμΌλ‘ λͺ¨λΈμ λ΄λ³΄λ΄λ λ°©λ²μ λν μμΈν λ΄μ©μ λ΄λ³΄λ΄κΈ° κ°μ΄λλ₯Ό μ°Έμ‘°νμΈμ.
What are the benefits of exporting YOLO11 models to TFLite Edge TPU?
Exporting YOLO11 models to TFLite Edge TPU offers several benefits:
- μ΅μ νλ μ±λ₯: μ΅μνμ μ λ ₯ μλΉλ‘ κ³ μ μ κ²½λ§ μ±λ₯μ λ¬μ±νμΈμ.
- μ§μ° μκ° λ¨μΆ: ν΄λΌμ°λμ μμ‘΄ν νμ μμ΄ λ‘컬 λ°μ΄ν°λ₯Ό λΉ λ₯΄κ² μ²λ¦¬ν©λλ€.
- κ°νλ κ°μΈμ 보 보νΈ: λ‘컬 μ²λ¦¬λ₯Ό ν΅ν΄ μ¬μ©μ λ°μ΄ν°λ₯Ό λΉκ³΅κ°λ‘ μμ νκ² λ³΄νΈν©λλ€.
This makes it ideal for applications in edge computing, where devices have limited power and computational resources. Learn more about why you should export.
λͺ¨λ°μΌ λ° μλ² λλ λλ°μ΄μ€μ TFLite Edge TPU λͺ¨λΈμ λ°°ν¬ν μ μλμ?
μ, TensorFlow Lite Edge TPU λͺ¨λΈμ λͺ¨λ°μΌ λ° μλ² λλ λλ°μ΄μ€μ μ§μ λ°°ν¬ν μ μμ΅λλ€. μ΄ λ°°ν¬ λ°©μμ μ¬μ©νλ©΄ λͺ¨λΈμ νλμ¨μ΄μμ μ§μ μ€νν μ μμΌλ―λ‘ λ λΉ λ₯΄κ³ ν¨μ¨μ μΈ μΆλ‘ μ΄ κ°λ₯ν©λλ€. ν΅ν© μμλ λΌμ¦λ² 리νμ΄μ Coral Edge λ°°ν¬ κ°μ΄λ( TPU )λ₯Ό μ°Έμ‘°νμΈμ.
TFLite Edge TPU λͺ¨λΈμ μΌλ°μ μΈ μ¬μ© μ¬λ‘λ 무μμΈκ°μ?
TFLite Edge TPU λͺ¨λΈμ μΌλ°μ μΈ μ¬μ© μ¬λ‘λ λ€μκ³Ό κ°μ΅λλ€:
- μ€λ§νΈ μΉ΄λ©λΌ: μ€μκ° μ΄λ―Έμ§ λ° λΉλμ€ λΆμ ν₯μ.
- IoT λλ°μ΄μ€: μ€λ§νΈ ν λ° μ°μ μλν μ§μ.
- ν¬μ€μΌμ΄: μλ£ μμ λ° μ§λ¨ κ°μν.
- μ맀μ : μ¬κ³ κ΄λ¦¬ λ° κ³ κ° νλ λΆμ κ°μ .
μ΄λ¬ν μ ν리μΌμ΄μ μ TFLite Edge TPU λͺ¨λΈμ κ³ μ±λ₯ λ° μ μ λ ₯ μλΉμ μ΄μ μ λ릴 μ μμ΅λλ€. μ¬μ© μλ리μ€μ λν΄ μμΈν μμ보μΈμ.
TFLite Edge TPU λͺ¨λΈμ λ΄λ³΄λ΄κ±°λ λ°°ν¬νλ λμ λ¬Έμ λ₯Ό ν΄κ²°νλ €λ©΄ μ΄λ»κ² ν΄μΌ νλμ?
TFLite Edge TPU λͺ¨λΈμ λ΄λ³΄λ΄κ±°λ λ°°ν¬νλ λμ λ¬Έμ κ° λ°μνλ κ²½μ° μΌλ°μ μΈ λ¬Έμ κ°μ΄λλ₯Ό μ°Έμ‘°νμ¬ λ¬Έμ ν΄κ²° νμ νμΈνμΈμ. μ΄ κ°μ΄λλ μνν μλμ 보μ₯νλ λ° λμμ΄ λλ μΌλ°μ μΈ λ¬Έμ μ ν΄κ²° λ°©λ²μ λ€λ£Ήλλ€. μΆκ° μ§μμ΄ νμνλ©΄ λμλ§ μΌν°λ₯Ό λ°©λ¬ΈνμΈμ.