Model Converter

This page describes supported methods for converting YOLOv5s PyTorch models to TFLite format. It focuses on two primary conversion paths:

  • An open-source converter script from the YOLOv5 project.

  • The MediaTek MTK Converter tool, provided as part of the NeuroPilot SDK.

../../_images/ai-workflow-overview-step1.png


YOLOv5s Model Conversion

Conversion Methods

  1. Open-Source Converter

    • Use the export.py script provided in the official YOLOv5 repository. The script uses TensorFlow Lite Converter to create a converter object and export the YOLOv5 model from PyTorch format to TFLite format.

    • Source link: YOLOv5 GitHub Repository

    Note

    Open-source converters may change over time. This documentation focuses on an end-to-end flow for YOLOv5s only. For other models, frameworks, or third-party converters, additional steps may be required.

  2. NeuroPilot Converter Tool

    • Download the NeuroPilot SDK All-In-One bundle for the target host platform.

    • Install the NeuroPilot Converter tool that matches the host Python version.

    • Use the MTK Converter to convert the YOLOv5 model from PyTorch format to TFLite format.

Next Steps

For detailed, step-by-step instructions, refer to: