-
Notifications
You must be signed in to change notification settings - Fork 0
EngineOutput to normalize engine outputs #16
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
Open
dtronmans
wants to merge
19
commits into
develop-v0.1.0
Choose a base branch
from
feat/abstract-engines
base: develop-v0.1.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
44912e7
Initial engine and model spec
dtronmans 8e82e0c
engines i
dtronmans 144b8d1
dai_type patch
dtronmans 91b5467
compute interface but with all parsers
dtronmans 9d34191
non-positional argument for ModelSpec in parse, remove dai_type resol…
dtronmans 88d1ba3
fixed syntax
dtronmans e5562da
update to more flexible and NNArchive-dependent configs
dtronmans 4482e9e
renaming and removing unrelated resolutions
dtronmans 01e2362
add dai nodes utils
dtronmans f8c2cce
rename classification config
dtronmans f8431cc
adjust names of imported parsers
dtronmans c163978
use new YOLOComputeInputs contract for explicit parameters
dtronmans 52b82a1
consistency between depthai-nodes and luxonis-eval parser names and r…
dtronmans e7bc102
class-attribute EngineOutput for Engine classes and move the EngineOu…
dtronmans 23b48be
adhere to new dai nodes contract for segmentatoin
dtronmans 8db5ca5
remove segmentation metric specific code because this is unrelated to…
dtronmans 51f34d1
cleaning up, moving around and renaming
dtronmans 8dc26ed
restore order
dtronmans bf1c7b5
fixes
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| pipeline: | ||
| loader: | ||
| name: LuxonisLoader | ||
| params: | ||
| dataset_name: flowersclassification | ||
| view: [test] | ||
|
|
||
| engine: | ||
| name: depthai | ||
| model_path: classification_light.rvc4.tar.xz | ||
| params: | ||
| device_ip: 10.12.143.168 | ||
|
|
||
| evaluators: | ||
| - task_name: "" | ||
| parser: | ||
| name: ClassificationParser | ||
| params: | ||
| # Set to false if the NNArchive already outputs probabilities. | ||
| apply_softmax: true | ||
| metrics: | ||
| - name: TopKAccuracy | ||
| params: | ||
| topk: [1] | ||
| visualizers: [] |
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,34 @@ | ||
| pipeline: | ||
| loader: | ||
| name: LuxonisLoader | ||
| params: | ||
| dataset_name: coco-2017 | ||
| view: [test] | ||
|
|
||
| engine: | ||
| name: onnx | ||
| model_path: path/to/yolov8n.onnx | ||
| params: | ||
| providers: [CPUExecutionProvider] | ||
|
|
||
| # engine: | ||
| # name: depthai | ||
| # model_path: path/to/yolov8n.rvc4.tar.xz | ||
| # params: | ||
| # device_ip: 10.12.143.173 | ||
|
|
||
| evaluators: | ||
| - task_name: "" | ||
| parser: | ||
| name: YOLOExtendedParser | ||
| params: | ||
| subtype: yolov8 | ||
| n_classes: 80 | ||
| conf_threshold: 0.25 | ||
| iou_threshold: 0.7 | ||
| max_det: 300 | ||
| metrics: | ||
| - name: BboxMeanAveragePrecision | ||
| params: | ||
| iou_type: bbox | ||
| visualizers: [] |
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,71 @@ | ||
| pipeline: | ||
| loader: | ||
| name: LuxonisLoader | ||
| params: | ||
| dataset_name: your_pose_dataset | ||
| view: [test] | ||
| class_mapping: | ||
| 0: person | ||
|
|
||
| engine: | ||
| name: onnx | ||
| model_path: path/to/yolov8n-pose.onnx | ||
| params: | ||
| providers: [CPUExecutionProvider] | ||
|
|
||
| # engine: | ||
| # name: depthai | ||
| # model_path: path/to/yolov8n-pose.rvc4.tar.xz | ||
| # params: | ||
| # device_ip: 10.12.143.173 | ||
|
|
||
| evaluators: | ||
| - task_name: "" | ||
| parser: | ||
| name: YOLOExtendedParser | ||
| params: | ||
| subtype: yolov8 | ||
| n_classes: 1 | ||
| conf_threshold: 0.25 | ||
| iou_threshold: 0.7 | ||
| max_det: 300 | ||
| keypoint_label_names: | ||
| - nose | ||
| - left_eye | ||
| - right_eye | ||
| - left_ear | ||
| - right_ear | ||
| - left_shoulder | ||
| - right_shoulder | ||
| - left_elbow | ||
| - right_elbow | ||
| - left_wrist | ||
| - right_wrist | ||
| - left_hip | ||
| - right_hip | ||
| - left_knee | ||
| - right_knee | ||
| - left_ankle | ||
| - right_ankle | ||
| keypoint_edges: | ||
| - [0, 1] | ||
| - [0, 2] | ||
| - [1, 3] | ||
| - [2, 4] | ||
| - [5, 6] | ||
| - [5, 7] | ||
| - [7, 9] | ||
| - [6, 8] | ||
| - [8, 10] | ||
| - [5, 11] | ||
| - [6, 12] | ||
| - [11, 12] | ||
| - [11, 13] | ||
| - [13, 15] | ||
| - [12, 14] | ||
| - [14, 16] | ||
| metrics: | ||
| - name: KeypointMeanAveragePrecision | ||
| params: | ||
| compute_area_from_keypoints: true | ||
| visualizers: [] |
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,40 @@ | ||
| pipeline: | ||
| loader: | ||
| name: LuxonisLoader | ||
| params: | ||
| dataset_name: your_segmentation_dataset | ||
| view: [test] | ||
|
|
||
| engine: | ||
| name: onnx | ||
| model_path: path/to/segmentation_model.onnx | ||
| params: | ||
| providers: [CPUExecutionProvider] | ||
|
|
||
| # engine: | ||
| # name: depthai | ||
| # model_path: path/to/segmentation_model.rvc4.tar.xz | ||
| # params: | ||
| # device_ip: 10.12.143.173 | ||
|
|
||
| evaluators: | ||
| - task_name: "" | ||
| parser: | ||
| name: SegmentationParser | ||
| params: | ||
| # Set to true for binary / single-logit outputs that encode one class in one channel. | ||
| classes_in_one_layer: false | ||
| metrics: | ||
| - name: MIoU | ||
| params: | ||
| num_classes: 21 | ||
| include_background: false | ||
| per_class: true | ||
| input_format: index | ||
| - name: DiceCoefficient | ||
| params: | ||
| num_classes: 21 | ||
| include_background: false | ||
| average: micro | ||
| input_format: index | ||
| visualizers: [] |
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
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 |
|---|---|---|
| @@ -1,10 +1,15 @@ | ||
| from .base_engine import BaseEngine, ModelSpec | ||
| from .depthai_engine import DepthAIEngine | ||
| from .onnx_engine import OnnxEngine | ||
| from .depthai_engine import DepthAIEngine, DepthAIEngineOutput | ||
| from .io import EngineOutput, TensorSpec | ||
| from .onnx_engine import OnnxEngine, ONNXEngineOutput | ||
|
|
||
| __all__ = [ | ||
| "BaseEngine", | ||
| "DepthAIEngine", | ||
| "DepthAIEngineOutput", | ||
| "EngineOutput", | ||
| "ModelSpec", | ||
| "ONNXEngineOutput", | ||
| "OnnxEngine", | ||
| "TensorSpec", | ||
| ] |
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.