通用数值¶
此页面包含指标使用的补充数值、类型和枚举。
supervision.metrics.core.MetricTarget
¶
Bases: Enum
Specifies what type of detection is used to compute the metric.
Attributes:
Name | Type | Description |
---|---|---|
BOXES |
xyxy bounding boxes |
|
MASKS |
Binary masks |
|
ORIENTED_BOUNDING_BOXES |
Oriented bounding boxes (OBB) |
Source code in supervision/metrics/core.py
supervision.metrics.core.AveragingMethod
¶
Bases: Enum
Defines different ways of averaging the metric results.
Suppose, before returning the final result, a metric is computed for each class. How do you combine those to get the final number?
Attributes:
Name | Type | Description |
---|---|---|
MACRO |
Calculate the metric for each class and average the results. The simplest averaging method, but it does not take class imbalance into account. |
|
MICRO |
Calculate the metric globally by counting the total true positives, false positives, and false negatives. Micro averaging is useful when you want to give more importance to classes with more samples. It's also more appropriate if you have an imbalance in the number of instances per class. |
|
WEIGHTED |
Calculate the metric for each class and average the results, weighted by the number of true instances of each class. Use weighted averaging if you want to take class imbalance into account. |