def test_match_candidates_from_metadata_bow(lund_path):
    config = create_match_candidates_config(
        matching_bow_neighbors=NEIGHBORS,
        matcher_type='WORDS')
    data_generation.save_config(config, lund_path)
    data = dataset.DataSet(lund_path)
    match_candidates_from_metadata(data, assert_count=5)
Beispiel #2
0
def lund_path(tmpdir_factory):
    """
    Precompute exif and features to avoid doing
    it for every test which is time consuming.
    """
    src = os.path.join(data_generation.DATA_PATH, "lund", "images")
    path = str(tmpdir_factory.mktemp("lund"))
    os.symlink(src, os.path.join(path, "images"))

    # Use words matcher type to support the bow retrieval test
    data_generation.save_config({"matcher_type": "WORDS"}, path)

    args = Args(path)
    commands.extract_metadata.Command().run(args)
    commands.detect_features.Command().run(args)

    return path
def lund_path(tmpdir_factory):
    """
    Precompute exif and features to avoid doing
    it for every test which is time consuming.
    """
    path = str(tmpdir_factory.mktemp('lund'))

    os.symlink(os.path.abspath('data/lund/images'),
               os.path.join(path, 'images'))

    # Use words matcher type to support the bow retrieval test
    data_generation.save_config({'matcher_type': 'WORDS'}, path)

    args = Args(path)
    commands.extract_metadata.Command().run(args)
    commands.detect_features.Command().run(args)

    return path
def test_match_candidates_from_metadata_time(lund_path):
    config = create_match_candidates_config(matching_time_neighbors=NEIGHBORS)
    data_generation.save_config(config, lund_path)
    data = dataset.DataSet(lund_path)
    match_candidates_from_metadata(data)
def test_match_candidates_from_metadata_vlad(lund_path):
    config = create_match_candidates_config(matching_vlad_neighbors=NEIGHBORS)
    data_generation.save_config(config, lund_path)
    data = dataset.DataSet(lund_path)
    match_candidates_from_metadata(data, assert_count=5)
Beispiel #6
0
def test_match_candidates_from_metadata_graph(lund_path) -> None:
    config = create_match_candidates_config(matching_graph_rounds=50)
    data_generation.save_config(config, lund_path)
    data = dataset.DataSet(lund_path)
    match_candidates_from_metadata(data)