Beispiel #1
0
def test_processing_statistics_normal(
    scene_synthetic: synthetic_scene.SyntheticInputData, ):
    reference = scene_synthetic.reconstruction
    dataset = synthetic_dataset.SyntheticDataSet(
        reference,
        scene_synthetic.exifs,
        scene_synthetic.features,
        scene_synthetic.descriptors,
        scene_synthetic.colors,
        scene_synthetic.tracks_manager,
    )

    processing_statistics = stats.processing_statistics(dataset, [reference])

    assert list(
        processing_statistics.keys()) == ["steps_times", "date", "area"]
    assert processing_statistics["steps_times"] == {
        "Feature Extraction": -1,
        "Features Matching": -1,
        "Tracks Merging": -1,
        "Reconstruction": -1,
        "Total Time": 0,
    }
    assert processing_statistics["date"] == "unknown"
    assert 3500 < processing_statistics["area"] < 3600
Beispiel #2
0
def test_processing_statistics_null(
    scene_synthetic: synthetic_scene.SyntheticInputData,
    null_scene: types.Reconstruction,
):
    dataset = synthetic_dataset.SyntheticDataSet(
        null_scene,
        scene_synthetic.exifs,
        scene_synthetic.features,
        scene_synthetic.descriptors,
        scene_synthetic.colors,
        scene_synthetic.tracks_manager,
    )

    processing_statistics = stats.processing_statistics(dataset, [null_scene])

    assert list(
        processing_statistics.keys()) == ["steps_times", "date", "area"]
    assert processing_statistics["steps_times"] == {
        "Feature Extraction": -1,
        "Features Matching": -1,
        "Tracks Merging": -1,
        "Reconstruction": -1,
        "Total Time": 0,
    }
    assert processing_statistics["date"] == "unknown"
    assert processing_statistics["area"] == -1