Search code examples
tensorflowdeep-learningpytorch

Export Yolov5 to Tensorflow


A have some issues exporting yolov5 model to tensor flow. I'm new to tensorflow and yolov5 so following the docs got me in to troubles. What is the easiest way to export?


Solution

  • Yolov5 supports export to two TF formats: TensorFlow SavedModel and TensorFlow GraphDef. For exporting to both:

    python export.py --weights yolov5s.pt --include saved_model pb
    

    For inference

    python detect.py --weights yolov5s_saved_model
    

    and

    python detect.py --weights yolov5s.pb 
    

    respectively