remove test_from_detections

This commit is contained in:
kirilllzaitsev 2023-07-20 15:48:38 +02:00
parent 8d131ad3e8
commit 6016338a4f
1 changed files with 0 additions and 36 deletions

View File

@ -316,42 +316,6 @@ def test_from_tensors(
assert np.array_equal(result.matrix, expected_result)
@pytest.mark.parametrize(
"predictions, targets, classes, conf_threshold, iou_threshold, expected_result, exception",
[
(
[DETECTIONS],
[CERTAIN_DETECTIONS],
CLASSES,
0.2,
0.5,
IDEAL_CONF_MATRIX,
DoesNotRaise(),
)
],
)
def test_from_detections(
predictions,
targets,
classes,
conf_threshold,
iou_threshold,
expected_result: Optional[np.ndarray],
exception: Exception,
):
with exception:
result = ConfusionMatrix.from_detections(
predictions=predictions,
targets=targets,
classes=classes,
conf_threshold=conf_threshold,
iou_threshold=iou_threshold,
)
assert result.matrix.diagonal().sum() == result.matrix.sum()
assert np.array_equal(result.matrix, expected_result)
@pytest.mark.parametrize(
"predictions, targets, num_classes, conf_threshold, iou_threshold, expected_result, exception",
[