Ultralytics Code Refactor https://ultralytics.com/actions (#13152)
Refactor code for speed and clarity
This commit is contained in:
1 parent
05e59bdec1
commit
b9019671f4
13 files changed
+29
-5
No files matched your search
@@ -55,6 +55,9 @@ def ap_per_class_box_and_mask(
|
||||
|
||||
class Metric:
|
||||
def __init__(self) -> None:
|
||||
"""Initializes performance metric attributes for precision, recall, F1 score, average precision, and class
|
||||
indices.
|
||||
"""
|
||||
self.p = [] # (nc, )
|
||||
self.r = [] # (nc, )
|
||||
self.f1 = [] # (nc, )
|
||||
@@ -151,6 +154,9 @@ class Metrics:
|
||||
"""Metric for boxes and masks."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Initializes Metric objects for bounding boxes and masks to compute performance metrics in the Metrics
|
||||
class.
|
||||
"""
|
||||
self.metric_box = Metric()
|
||||
self.metric_mask = Metric()
|
||||
|
||||
|
||||
Reference in new issue
Block a user