fix: YOLOv5u version detection and revert changes in ghcr image building#148
Merged
fix: YOLOv5u version detection and revert changes in ghcr image building#148
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Test Results 6 files 6 suites 8m 44s ⏱️ Results for commit 24df078. ♻️ This comment has been updated with latest results. |
klemen1999
reviewed
May 7, 2025
Collaborator
klemen1999
left a comment
There was a problem hiding this comment.
LGTM but let's add the tests by expanding the test_conversion tests
klemen1999
approved these changes
May 9, 2025
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.
Purpose
First, this PR improves the automatic YOLO version detection mechanism to better detect the anchor-free version of the
YOLOv5introduced in one of the more recent version of Ultralytics (YOLOv5u). Second, it reverts the ghcr image building changes introduced in #147 (it turns out that the erroneous version detection was the underlying source of the problem).Specification
tools/main.py:YOLOv5uis detected explaining that theYOLOv8conversion procedure will be utilized.tools/utils/version_detection.py:"YOLOv8" in contentcriterion forYOLOv8detection as someYOLOv5umodels were mistakenly labeled asYOLOv8due to this check. Moreover, it doesn't seem to be so important for theYOLOv8detection at all as the"yolov8" in contentcriterion seems to be sufficient;"yolov5u" in contentand"yolov5" in content and "ultralytics" in contentcriteria forYOLOv5udetection.Dependencies & Potential Impact
Removing the
"YOLOv8" in contentcriterion might cause some issues (according to my tests it shouldn't but let's be cautious). Do we have some test.ptfiles that we could run the detection on to test this out?Deployment Plan
None
Testing & Validation
Testing version detection with some yolo files found online (
yolov5n,yolov5nu,yolov8).