-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/semseg misclassification #628
Conversation
Codecov Report
@@ Coverage Diff @@
## main #628 +/- ##
==========================================
- Coverage 84.39% 83.76% -0.64%
==========================================
Files 164 165 +1
Lines 12964 12959 -5
==========================================
- Hits 10941 10855 -86
- Misses 2023 2104 +81
... and 11 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
accuracy: Optional[float] = None | ||
dominant_mislabel_class: Optional[int] = None | ||
dominant_mislabel_class_percent: Optional[float] = None |
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.
if these are all present when we instantiate the object, we don't need them to be optional
@@ -15,6 +15,20 @@ class SemSegCols(str, Enum): | |||
meta = "meta" | |||
|
|||
|
|||
class ClassificationData(BaseModel): |
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.
Maybe ClassificationErrorData
@@ -15,6 +15,20 @@ class SemSegCols(str, Enum): | |||
meta = "meta" | |||
|
|||
|
|||
class ClassificationData(BaseModel): | |||
""" | |||
accuracy: float the mean accuracy per pixel |
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.
what does "mean accuracy per pixel" mean? specifically the word "mean" in this context
@@ -30,7 +44,7 @@ class IoUType(str, Enum): | |||
class IouData(BaseModel): | |||
iou: float | |||
iou_per_class: List[float] | |||
area_per_class: List[int] | |||
area_per_class: List[float] |
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.
if this is a float are the other area values a float? if so we should update the fn typing to return float not int
@@ -62,7 +76,7 @@ class Contour(BaseModel): | |||
class Polygon(BaseModel): | |||
uuid: str # UUID4 | |||
label_idx: int | |||
misclassified_class_label: Optional[int] = None | |||
classification_data: ClassificationData = ClassificationData() |
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.
just have this be optional and default to None
add_classification_error_to_polygons_batch( | ||
self.pred_masks, gold_polygons_batch, n_classes | ||
) | ||
add_classification_error_to_polygons_batch( | ||
self.gold_masks, pred_polygons_batch, n_classes | ||
) |
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.
why are we doing it for both now?
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.
We want both to have classification accuracy and errors
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.
lgtm
To fix typing issue in 3.8 and 3.9 https://stackoverflow.com/questions/76313592/import-langchain-error-typeerror-issubclass-arg-1-must-be-a-class |
Adds misclassification to semseg polygons