Пример #1
0
def test_build_matrices():
    gt_poly, det_poly = ObjectAreaEvaluator.prune_and_polygon(
        kGroundTruth, kDetected)
    gt_matrix, det_matrix = ObjectAreaEvaluator.build_matrices(
        gt_poly, det_poly)
    assert np.allclose(gt_matrix, kMatchMatrixGroundTruth)
    assert np.allclose(det_matrix, kMatchMatrixDetections)
Пример #2
0
def test_build_matrices():
	gt_poly, det_poly = ObjectAreaEvaluator.prune_and_polygon(kGroundTruth, kDetected)
	gt_matrix, det_matrix = ObjectAreaEvaluator.build_matrices(gt_poly, det_poly)
	assert np.allclose(gt_matrix, kMatchMatrixGroundTruth)
	assert np.allclose(det_matrix, kMatchMatrixDetections)
Пример #3
0
def test_prune_and_polygon():
    gt_poly, det_poly = ObjectAreaEvaluator.prune_and_polygon(
        kGroundTruth, kDetected)
    assert [p.length for p in gt_poly] == [18.0, 38.0, 20.0, 14.0, 10.0]
    assert [p.length
            for p in det_poly] == [18.0, 18.0, 28.0, 26.0, 10.0, 12.0, 14.0]
Пример #4
0
def test_prune_and_polygon():
	gt_poly, det_poly = ObjectAreaEvaluator.prune_and_polygon(kGroundTruth, kDetected)
	assert [p.length for p in gt_poly] == [18.0, 38.0, 20.0, 14.0, 10.0]
	assert [p.length for p in det_poly] == [18.0, 18.0, 28.0, 26.0, 10.0, 12.0, 14.0]