Engine val to validate the trt engine file#5667
Closed
shihanyu wants to merge 6 commits intoultralytics:masterfrom
Closed
Engine val to validate the trt engine file#5667shihanyu wants to merge 6 commits intoultralytics:masterfrom
shihanyu wants to merge 6 commits intoultralytics:masterfrom
Conversation
Member
|
@shihanyu see #5278 (comment), we can not add tensorrt specific packages to requirements.txt as the majority of users will not need these and do not want them, and may not even have CUDA installed on their system (like me, working on a MacBook). |
Member
|
@shihanyu also see my other comments in #5278. Any modifications we might consider need to be entirely contained within DetectMultiBackend() class. Lastly, the amount of lines here is far too many. In my DetectMultiBackend PR #5549 I only added 35 lines of code to the repo while adding val and detect capability for a multitude of formats (TorchScript, CoreML, ONNX, TensorFlow, TensorFlow Lite etc.). In contrast this PR is proposing +450 lines of code to simply add support for 1 additional format. |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
modified the val.py mainly so that it can validate the tensorrt file.
$ python path/to/val.py --data xxxxxx.yaml --img 640 --engine_library xxxx.so --engine_path xxxx.engine
(The last code I pushed failed because I forget to add pycuda in the requirements.txt.
I think this time it may work. Hope it can pass.)
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhanced YOLOv5 with TensorRT optimization support for faster inference.
📊 Key Changes
tensorrtandpycudato therequirements.txt, indicating new dependencies for TensorRT operation.yolov5_trt.py, a new utility to support YOLOv5 inference using NVIDIA's TensorRT.val.pyto support validation using TensorRT optimized models.🎯 Purpose & Impact