extend docs

This commit is contained in:
kirilllzaitsev 2023-07-08 12:29:16 +02:00
parent 40853350fd
commit fd717ea749
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,3 @@
## ConfusionMatrix
:::supervision.metrics.detection.ConfusionMatrix

View File

@ -11,6 +11,15 @@ from supervision.detection.utils import box_iou_batch
@dataclass
class ConfusionMatrix:
"""
Data class containing information about classification results in form of a confusion matrix.
Attributes:
matrix: An array of shape (len(classes) + 1, len(classes) + 1) containing the number of TP, FP, FN and TN for each class.
classes: all known class names.
conf_threshold: detection confidence threshold between 0 and 1. Detections with lower confidence will be excluded from the matrix.
iou_threshold: detection iou threshold between 0 and 1. Detections with lower iou will be classified as FP.
"""
matrix: np.ndarray
classes: List[str]
conf_threshold: float