콘텐츠로 건너뛰기

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.

TFLite Edge TPU

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.

설치

필요한 패키지를 설치하려면 실행합니다:

설치

# Install the required package for YOLO11
pip install ultralytics

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 모델 배포에 대한 자세한 지침은 다음 리소스를 참조하세요:

요약

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 모델을 내보내거나 배포하는 동안 문제가 발생하는 경우 일반적인 문제 가이드를 참조하여 문제 해결 팁을 확인하세요. 이 가이드는 원활한 작동을 보장하는 데 도움이 되는 일반적인 문제와 해결 방법을 다룹니다. 추가 지원이 필요하면 도움말 센터를 방문하세요.

📅 Created 7 months ago ✏️ Updated 22 days ago

댓글