-
-
Notifications
You must be signed in to change notification settings - Fork 17.2k
Labels
StaleStale and schedule for closing soonStale and schedule for closing soonbugSomething isn't workingSomething isn't working
Description
Search before asking
- I have searched the YOLOv5 issues and found no similar bug report.
YOLOv5 Component
Export
Bug
Using https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb below export fails
!git clone https://github.com/ultralytics/yolov5 # clone
%cd yolov5
%pip install -qr requirements.txt # install
from yolov5 import utils
display = utils.notebook_init() # checks
!python export.py --weights yolov5s.pt --include tflite --int8
At the end of export, the following message is displayed
TensorFlow Lite: export failure: EndVector() takes 1 positional argument but 2 were given
According to tensorflow/tensorflow#52954 there is some issue with flatbuffers library. Workaround is to downgrade flatbuffers.
The following code therefore works as expected.
!git clone https://github.com/ultralytics/yolov5 # clone
%cd yolov5
%pip install -qr requirements.txt # install
from yolov5 import utils
display = utils.notebook_init() # checks
%pip install --upgrade flatbuffers==1.12 # downgrade from v2 to v1.12
!python export.py --weights yolov5s.pt --include tflite --int8
Environment
Ultralytics colab environment https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb
Minimal Reproducible Example
!git clone https://github.com/ultralytics/yolov5 # clone
%cd yolov5
%pip install -qr requirements.txt # install
from yolov5 import utils
display = utils.notebook_init() # checks
!python export.py --weights yolov5s.pt --include tflite --int8
Additional
No response
Are you willing to submit a PR?
- Yes I'd like to help by submitting a PR!
glenn-jocher
Metadata
Metadata
Assignees
Labels
StaleStale and schedule for closing soonStale and schedule for closing soonbugSomething isn't workingSomething isn't working