Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle edgetpu model inference #5372

Merged
merged 3 commits into from
Nov 4, 2021
Merged

Conversation

Namburger
Copy link
Contributor

@Namburger Namburger commented Oct 27, 2021

TESTED=python3 detect.py --source 0 --weights yolov5n-int8_edgetpu.tflite

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced TFLite model support for Edge TPU in detect.py.

πŸ“Š Key Changes

  • Imported platform library in detect.py.
  • Added Edge TPU compatibility logic in TFLite model loading section.

🎯 Purpose & Impact

  • Integration with Edge TPUs: Allows users to utilize models optimized for Google's Edge TPUs, enhancing inference speed on supported hardware.
  • Cross-Platform Support: Support for Linux, macOS, and Windows is included, ensuring a wide range of users can benefit from this update.
  • Ease of Use: The PR simplifies the process of deploying models on various platforms with Edge TPU support, potentially expanding the user base and applicability of YOLOv5 in edge computing environments.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘‹ Hello @Namburger, thank you for submitting a πŸš€ PR! To allow your work to be integrated as seamlessly as possible, we advise you to:

  • βœ… Verify your PR is up-to-date with upstream/master. If your PR is behind upstream/master an automatic GitHub actions rebase may be attempted by including the /rebase command in a comment body, or by running the following code, replacing 'feature' with the name of your local branch:
git remote add upstream https://github.com/ultralytics/yolov5.git
git fetch upstream
git checkout feature  # <----- replace 'feature' with local branch name
git merge upstream/master
git push -u origin -f
  • βœ… Verify all Continuous Integration (CI) checks are passing.
  • βœ… Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." -Bruce Lee

@glenn-jocher
Copy link
Member

/rebase

pre-commit-ci bot and others added 2 commits November 3, 2021 22:39
Rename `tflite_runtime.interpreter as tflite` to `tflite_runtime.interpreter as tflri` to avoid conflict with existing `tflite` boolean
@glenn-jocher
Copy link
Member

@Namburger I've merged with master and cleaned this up a bit. I also renamed the tflite import to avoid conflict with the existing tflite boolean. Can you verify the PR still works correctly? Thanks!

@Namburger
Copy link
Contributor Author

@Namburger I've merged with master and cleaned this up a bit. I also renamed the tflite import to avoid conflict with the existing tflite boolean. Can you verify the PR still works correctly? Thanks!

Thanks for cleaning up the shadowing and it looks good!

@glenn-jocher glenn-jocher merged commit ac2c49a into ultralytics:master Nov 4, 2021
@glenn-jocher
Copy link
Member

@Namburger PR is merged. Thank you for your contributions to YOLOv5 πŸš€ and Vision AI ⭐

@glenn-jocher glenn-jocher mentioned this pull request Nov 11, 2021
1 task
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Handle edgetpu model inference

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup

Rename `tflite_runtime.interpreter as tflite` to `tflite_runtime.interpreter as tflri` to avoid conflict with existing `tflite` boolean

Co-authored-by: Nam Vu <nam@glodonusa.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants