Seeed-Studio / yolov5-swift

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite > UF2
GNU General Public License v3.0
20 stars 5 forks source link

Requiring flatbuffers v1.12 is breaking tflite.convert() #28

Open CharlesMod opened 1 year ago

CharlesMod commented 1 year ago

Search before asking

YOLOv5-Swift Component

Integrations, Other

Bug

on line 496 there is a requirements check for flatbuffers v1.12, for my application (Seeed studio vision ai) this causes the conversion from a tf model to tflite model to fail on the convert function.

Seems this was to solve an int8 flag related bug previously, that is now fixed as of the latest flatbuffers version. Simply removing this if statement restores functionality.

Environment

Google colab

Minimal Reproducible Example

Without the fix, see this google colab notebook, things will error out on step 7 (assuming you place credentials in the earlier step)

Additional

nope!

Are you willing to submit a PR?

mjq2020 commented 1 year ago

Search before asking

  • [x] I have searched the YOLOv5-Swift issues and found no similar bug report.

YOLOv5-Swift Component

Integrations, Other

Bug

on line 496 there is a requirements check for flatbuffers v1.12, for my application (Seeed studio vision ai) this causes the conversion from a tf model to tflite model to fail on the convert function.

Seems this was to solve an int8 flag related bug previously, that is now fixed as of the latest flatbuffers version. Simply removing this if statement restores functionality.

Environment

Google colab

Minimal Reproducible Example

Without the fix, see this google colab notebook, things will error out on step 7 (assuming you place credentials in the earlier step)

Additional

nope!

Are you willing to submit a PR?

  • [x] Yes I'd like to help by submitting a PR!

image Have you followed the steps in the picture?

CharlesMod commented 1 year ago

Yes.

On Thu, Feb 16, 2023, 11:05 PM mjq2020 @.***> wrote:

Search before asking

YOLOv5-Swift Component

Integrations, Other Bug

on line 496 there is a requirements check for flatbuffers v1.12, for my application (Seeed studio vision ai) this causes the conversion from a tf model to tflite model to fail on the convert function.

Seems this was to solve an int8 flag related bug previously, that is now fixed as of the latest flatbuffers version. Simply removing this if statement restores functionality. Environment

Google colab Minimal Reproducible Example

Without the fix, see this https://colab.research.google.com/gist/lakshanthad/b47a1d1a9b4fac43449948524de7d374/yolov5-training-for-sensecap-a1101.ipynbgoogle colab notebook, things will error out on step 7 (assuming you place credentials in the earlier step) Additional

nope! Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

[image: image] https://user-images.githubusercontent.com/74635395/219562379-5341a344-746e-412c-a008-4073126eec73.png Have you followed the steps in the picture?

— Reply to this email directly, view it on GitHub https://github.com/Seeed-Studio/yolov5-swift/issues/28#issuecomment-1434144989, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKGJUFU7GM2UWZJAIHSGTWX4IJJANCNFSM6AAAAAAU4IG3Z4 . You are receiving this because you authored the thread.Message ID: @.***>

CharlesMod commented 1 year ago

This isn't an issue with importing from roboflow, this is an issue with exporting an already trained TF model

On Fri, Feb 17, 2023 at 7:08 AM Charles Dean Modrich @.***> wrote:

Yes.

On Thu, Feb 16, 2023, 11:05 PM mjq2020 @.***> wrote:

Search before asking

YOLOv5-Swift Component

Integrations, Other Bug

on line 496 there is a requirements check for flatbuffers v1.12, for my application (Seeed studio vision ai) this causes the conversion from a tf model to tflite model to fail on the convert function.

Seems this was to solve an int8 flag related bug previously, that is now fixed as of the latest flatbuffers version. Simply removing this if statement restores functionality. Environment

Google colab Minimal Reproducible Example

Without the fix, see this https://colab.research.google.com/gist/lakshanthad/b47a1d1a9b4fac43449948524de7d374/yolov5-training-for-sensecap-a1101.ipynbgoogle colab notebook, things will error out on step 7 (assuming you place credentials in the earlier step) Additional

nope! Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

[image: image] https://user-images.githubusercontent.com/74635395/219562379-5341a344-746e-412c-a008-4073126eec73.png Have you followed the steps in the picture?

— Reply to this email directly, view it on GitHub https://github.com/Seeed-Studio/yolov5-swift/issues/28#issuecomment-1434144989, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKGJUFU7GM2UWZJAIHSGTWX4IJJANCNFSM6AAAAAAU4IG3Z4 . You are receiving this because you authored the thread.Message ID: @.***>