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

TensorRT SegmentationModel fix #9465

Merged
merged 15 commits into from
Sep 18, 2022
Merged

TensorRT SegmentationModel fix #9465

merged 15 commits into from
Sep 18, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 18, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancements in exporting models with added support for Segmentation and Detection in ONNX and TensorRT formats.

πŸ“Š Key Changes

  • DetectionModel and SegmentationModel classes added to the list of imports from the models.yolo module.
  • Support for exporting SegmentationModel to ONNX with appropriate output names and dynamic axes configuration.
  • Dynamic axes handling now considers SegmentationModel and DetectionModel instances differently when exporting to ONNX.
  • Adjusted TensorRT code to accommodate multiple output names and dynamic reshaping of inputs and outputs according to the model type.

🎯 Purpose & Impact

  • 🎨 Allows for more model types to be exported, specifically those used for segmentation tasks, addressing a wider range of machine learning use cases.
  • βš™οΈ Improves interoperability by exporting models to formats compatible with different deep learning inference engines such as ONNX and TensorRT.
  • πŸ‘₯ Users benefit from an expanded set of models that can be exported, potentially increasing the adoption of Ultralytics YOLOv5 for varied applications.

@glenn-jocher glenn-jocher changed the title Tenosrt/segment TensorRT SegmentationModel fix Sep 18, 2022
@glenn-jocher
Copy link
Member Author

@AyushExel @Laughing-q this PR adds SegmentationModel TensorRT inference support. I updated CoreML and Paddle inference yesterday to support SegmentationModels.

The only SegmentationModel exports not running inference correctly still are the TF formats.

Screenshot 2022-09-18 at 14 17 19

You can see Segmentation benchmark results as part of the daily CI:
https://github.com/ultralytics/yolov5/actions/runs/3077032938/jobs/4971602647
Screenshot 2022-09-18 at 14 19 11

Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher merged commit dc42e6e into master Sep 18, 2022
@glenn-jocher glenn-jocher deleted the tenosrt/segment branch September 18, 2022 12:45
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

1 participant