generated from roboflow/template-python
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Core system for Metrics #1442
Merged
Merged
Core system for Metrics #1442
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
7d7e5f1
Initial attempt at definining a metric
LinasKo b061f4f
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] 4c903cf
Metrics changes + tests
LinasKo d6d71a0
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] 6f566b5
Remove incorrect test
LinasKo 4add8c8
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] 0305cee
Simplified tests
LinasKo 3e860a5
Add invalid value test
LinasKo a4cf260
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] 5565241
Basic mask tests
LinasKo e1ffd0e
Address some review comments
LinasKo dabd18c
Remove duplicate box_iou_batch method
LinasKo b40cddd
Validate class IDs together
LinasKo 758b9d6
Expose class_id, add missing docs
LinasKo 0e8365f
Add dependency: typing-extensions
LinasKo 6675844
Simplified core metrics
LinasKo 6f47cd3
Add to_pandas to IoU
LinasKo 85e0a54
Return dataclass for IoU. plot + as_pandas in result.
LinasKo ab76a47
Refactored metrics store, removed typing extensions
LinasKo c31d96d
Merge branch 'develop' into feat/metrics-module-initial
onuralpszr fe27e44
supervision metrics module
LinasKo a5bb93d
bugfix: hstack confidence, class_id
LinasKo d1e5e03
bugfix: incorrect indexing into 0-sized data in data stores
LinasKo 026a243
Give descriptive names to data_1, data_2 in mAP
LinasKo 84bb44d
Metrics docs overhaul
LinasKo 57e5c10
Merge branch 'develop' into feat/metrics-module-initial
LinasKo ec5790a
Removed print statement internal_data_store
LinasKo 8ff0d31
Removed internal store from mAP
LinasKo 162f9ed
fix mAP for small/medium/large objects
LinasKo 6ac0f84
fix small object area calculation
LinasKo 6bb5929
Remove IoU metric for now - unclear external API
LinasKo 55c8c07
Rename legacy metrics doc to metrics, preserve url
LinasKo 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 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 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,18 @@ | ||
--- | ||
comments: true | ||
status: new | ||
--- | ||
|
||
# Mean Average Precision | ||
|
||
<div class="md-typeset"> | ||
<h2><a href="#supervision.metrics.mean_average_precision.MeanAveragePrecision">MeanAveragePrecision</a></h2> | ||
</div> | ||
|
||
:::supervision.metrics.mean_average_precision.MeanAveragePrecision | ||
|
||
<div class="md-typeset"> | ||
<h2><a href="#supervision.metrics.mean_average_precision.MeanAveragePrecisionResult">MeanAveragePrecisionResult</a></h2> | ||
</div> | ||
|
||
:::supervision.metrics.mean_average_precision.MeanAveragePrecisionResult |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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,10 @@ | ||
from supervision.metrics.core import CLASS_ID_NONE, Metric, MetricTarget | ||
from supervision.metrics.mean_average_precision import ( | ||
MeanAveragePrecision, | ||
MeanAveragePrecisionResult, | ||
) | ||
from supervision.metrics.utils.object_size import ( | ||
ObjectSizeCategory, | ||
get_detection_size_category, | ||
get_object_size_category, | ||
) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onuralpszr, do we need to do something extra here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SkalskiP Sorry, I miss this message because was hidden, making optional to add is correct I also see "stub" package which also optional also good. If I may I would like to also say If you need faster metrics and better RAM management, We should strongly consider "polars" as well. I can give you raw example and send you colab example what I meant about it. Plus we can convert to pandas as well. or read from pandas,numpy etc as well. So cards are still open. You saw speed of "ruff" (rust) you can see this one too.
cc : @LinasKo please check as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc references:
https://docs.pola.rs/api/python/stable/reference/functions.html
https://docs.pola.rs/api/python/stable/reference/dataframe/export.html
I can show more and explain as well.