Conda CI and Metric docstring updates (#5233)

This commit is contained in:
Glenn Jocher 2023-10-05 00:32:44 +02:00 committed by GitHub
parent 3e3980b2bc
commit 6923b3a414
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 72 additions and 4 deletions

View file

@ -623,8 +623,19 @@ class Metric(SimpleClass):
def update(self, results):
"""
Updates the evaluation metrics of the model with a new set of results.
Args:
results (tuple): A tuple of (p, r, ap, f1, ap_class)
results (tuple): A tuple containing the following evaluation metrics:
- p (list): Precision for each class. Shape: (nc,).
- r (list): Recall for each class. Shape: (nc,).
- f1 (list): F1 score for each class. Shape: (nc,).
- all_ap (list): AP scores for all classes and all IoU thresholds. Shape: (nc, 10).
- ap_class_index (list): Index of class for each AP score. Shape: (nc,).
Side Effects:
Updates the class attributes `self.p`, `self.r`, `self.f1`, `self.all_ap`, and `self.ap_class_index` based
on the values provided in the `results` tuple.
"""
self.p, self.r, self.f1, self.all_ap, self.ap_class_index = results