-
Notifications
You must be signed in to change notification settings - Fork 14
Get shape for each output from the ONNX and infer layout + YOLO26 changes + output field re-names #207
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
Merged
Merged
Get shape for each output from the ONNX and infer layout + YOLO26 changes + output field re-names #207
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f1c7843
Yolo 26 with nms required, argument for cli version passing in tests
dtronmans 6c81827
precommit
dtronmans 48ed199
reducemax for detection pose and segment
dtronmans a854110
Merge branch 'feat/yolo26-one2many' into feat/yolo26-reducemax
dtronmans 81e4f99
Get shape for each output from the ONNX and infer layout based on dims
dtronmans 02c1852
Merge branch 'feat/yolo26-reducemax' into feat/output-shapes-and-layout
dtronmans 78ee682
fix output names
dtronmans 24fb4e8
remove need for _present tag to make the test simpler looking
dtronmans a932a79
prioritize ultralytics submodule path
dtronmans fe99f74
remove implicit checks
dtronmans 06e8334
Cleaner tests, separate file for nnarchive field name specificiation
dtronmans a90915b
Parser field in nn archive default to YOLO
dtronmans 1ef0413
Merge branch 'main' into feat/output-shapes-and-layout
dtronmans cddb0f6
Revert parser to YOLOExtendedParser from YOLO
dtronmans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from copy import deepcopy | ||
|
|
||
| V8_DETECTION_CHECK = { | ||
| "name": "yolov8n", | ||
| "version": "v8", | ||
| "model_outputs": ["output1_yolov6r2", "output2_yolov6r2", "output3_yolov6r2"], | ||
| "head_outputs": ["output1_yolov6r2", "output2_yolov6r2", "output3_yolov6r2"], | ||
| "yolo_outputs": ["output1_yolov6r2", "output2_yolov6r2", "output3_yolov6r2"], | ||
| } | ||
|
|
||
| V8_SEG_CHECK = { | ||
| "name": "yolov8n-seg", | ||
| "version": "v8", | ||
| "model_outputs": [ | ||
| "output1_yolov8", | ||
| "output2_yolov8", | ||
| "output3_yolov8", | ||
| "output1_masks", | ||
| "output2_masks", | ||
| "output3_masks", | ||
| "protos_output", | ||
| ], | ||
| "head_outputs": [ | ||
| "output1_yolov8", | ||
| "output2_yolov8", | ||
| "output3_yolov8", | ||
| "output1_masks", | ||
| "output2_masks", | ||
| "output3_masks", | ||
| "protos_output", | ||
| ], | ||
| "yolo_outputs": ["output1_yolov8", "output2_yolov8", "output3_yolov8"], | ||
| "mask_outputs": ["output1_masks", "output2_masks", "output3_masks"], | ||
| } | ||
|
|
||
| V8_POSE_CHECK = { | ||
| "name": "yolov8n-pose", | ||
| "version": "v8", | ||
| "model_outputs": [ | ||
| "output1_yolov8", | ||
| "output2_yolov8", | ||
| "output3_yolov8", | ||
| "kpt_output1", | ||
| "kpt_output2", | ||
| "kpt_output3", | ||
| ], | ||
| "head_outputs": [ | ||
| "output1_yolov8", | ||
| "output2_yolov8", | ||
| "output3_yolov8", | ||
| "kpt_output1", | ||
| "kpt_output2", | ||
| "kpt_output3", | ||
| ], | ||
| "yolo_outputs": ["output1_yolov8", "output2_yolov8", "output3_yolov8"], | ||
| "keypoints_outputs": ["kpt_output1", "kpt_output2", "kpt_output3"], | ||
| } | ||
|
|
||
|
|
||
| def _clone_check(base_case: dict, *, name: str, version: str) -> dict: | ||
| case = deepcopy(base_case) | ||
| case["name"] = name | ||
| case["version"] = version | ||
| return case | ||
|
|
||
|
|
||
| N_VARIANT_OUTPUT_NAME_CHECKS = [ | ||
| V8_DETECTION_CHECK, | ||
| V8_SEG_CHECK, | ||
| V8_POSE_CHECK, | ||
| _clone_check(V8_DETECTION_CHECK, name="yolov9t", version="v9"), | ||
| _clone_check(V8_DETECTION_CHECK, name="yolov11n", version="v11"), | ||
| _clone_check(V8_SEG_CHECK, name="yolov11n-seg", version="v11"), | ||
| _clone_check(V8_POSE_CHECK, name="yolov11n-pose", version="v11"), | ||
| _clone_check(V8_DETECTION_CHECK, name="yolov12n", version="v12"), | ||
| { | ||
| "name": "yolo26n", | ||
| "version": "v26", | ||
| "model_outputs": ["output_yolo26"], | ||
| "head_outputs": ["output_yolo26"], | ||
| "yolo_outputs": ["output_yolo26"], | ||
| }, | ||
| { | ||
| "name": "yolo26n-seg", | ||
| "version": "v26", | ||
| "model_outputs": ["output_yolo26", "output_masks", "protos_output"], | ||
| "head_outputs": ["output_yolo26", "output_masks", "protos_output"], | ||
| "yolo_outputs": ["output_yolo26"], | ||
| "mask_outputs": ["output_masks"], | ||
| }, | ||
| { | ||
| "name": "yolo26n-pose", | ||
| "version": "v26", | ||
| "model_outputs": ["output_yolo26", "kpt_output"], | ||
| "head_outputs": ["output_yolo26", "kpt_output"], | ||
| "yolo_outputs": ["output_yolo26"], | ||
| "keypoints_outputs": ["kpt_output"], | ||
| }, | ||
| ] |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.