def main():
    selectors = [
        FPSReductionKS(n=3),
        MaxHistDiffKS(frames_per_window=1),
    ]
    extractors = [
        ColorLayoutFE(),
        AutoEncoderFE(dummy=True),
    ]
    indexes = [
        LinearIndex(dummy=True),
        KDTreeIndex(dummy=True, trees=5),
        SGHIndex(dummy=True, projections=10),
    ]
    lshs = [
        LSHIndex(dummy=True, projections=5, tables=10),  # color layout
        LSHIndex(dummy=True, projections=3, tables=10),  # auto encoder
    ]

    for selector in selectors:
        read_selection_log(selector, extractors)

    for extractor in extractors:
        read_extraction_log(extractor, selectors)

    for index in indexes:
        read_index_logs(selectors, extractors, index)

    for i in range(len(lshs)):
        read_index_logs(selectors, [extractors[i]], lshs[i])

    read_detection_log()
    return
def main():
    selectors = [
        FPSReductionKS(n=3),
        # MaxHistDiffKS(frames_per_window=1),
    ]
    extractors = [
        ColorLayoutFE(),
        AutoEncoderFE(dummy=True, model_name='model'),
    ]
    indexes = [
        # LinearIndex(dummy=True, k=100),
        KDTreeIndex(dummy=True, trees=5, k=100),
        # SGHIndex(dummy=True, projections=14, tables=2, k=100),
        # LSHIndex(dummy=True, projections=14, k=100),
    ]

    for selector in selectors:
        for extractor in extractors:
            for index in indexes:
                find_copies(
                    video_name='385',
                    selector=selector,
                    extractor=extractor,
                    index=index,
                )
    return
def main():
    videos = ['417', '143', '215', '385', '178', '119-120', ]

    selectors = [
        FPSReductionKS(n=3),
        MaxHistDiffKS(frames_per_window=1),
    ]
    extractors = [
        ColorLayoutFE(),
        AutoEncoderFE(dummy=True),
    ]

    indexes = [
        LinearIndex(dummy=True),
        KDTreeIndex(dummy=True, trees=5),
        SGHIndex(dummy=True, projections=10),
        LSHIndex(dummy=True, projections=5, tables=10),  # color layout
        LSHIndex(dummy=True, projections=3, tables=10),  # auto encoder
    ]

    datasets = [
        (selectors[0], extractors[0], indexes[0],),  # linear
        # (selectors[0], extractors[0], indexes[1],),  # kdtree
        # (selectors[0], extractors[0], indexes[2],),  # sgh
        # (selectors[0], extractors[0], indexes[3],),  # lsh

        # (selectors[0], extractors[1], indexes[0],),  # linear
        # (selectors[0], extractors[1], indexes[1],),  # kdtree
        # (selectors[0], extractors[1], indexes[2],),  # sgh
        # (selectors[0], extractors[1], indexes[4],),  # lsh

        # (selectors[1], extractors[0], indexes[1],),  # kdtree
        # (selectors[1], extractors[0], indexes[2],),  # sgh
        # (selectors[1], extractors[0], indexes[3],),  # lsh

        # (selectors[1], extractors[1], indexes[1],),  # kdtree
        # (selectors[1], extractors[1], indexes[2],),  # sgh
        # (selectors[1], extractors[1], indexes[4],),  # lsh
    ]

    for video in videos:
        for selector, extractor, index in datasets:
            evaluate_duplicates(
                video_name=video,
                selector=selector,
                extractor=extractor,
                index=index,
            )
    return
def main():
    max_missing_streak = 6
    min_duration = 5
    max_offset = 2

    videos = ['119-120', '143', '178', '215', '385', '417', ]

    selectors = [
        # FPSReductionKS(n=3),
        MaxHistDiffKS(frames_per_window=1),
    ]
    extractors = [
        ColorLayoutFE(),
        AutoEncoderFE(dummy=True),
    ]

    indexes = [
        LinearIndex(dummy=True),
        KDTreeIndex(dummy=True, trees=5),
        SGHIndex(dummy=True, projections=10),
        # LSHIndex(dummy=True, projections=5, tables=10),  # color layout
        # LSHIndex(dummy=True, projections=3, tables=10),  # auto encoder
    ]

    for selector in selectors:
        for extractor in extractors:
            for index in indexes:
                for video_name in videos:
                    find_copies(
                        video_name=video_name,
                        selector=selector,
                        extractor=extractor,
                        index=index,
                        max_missing_streak=max_missing_streak,
                        min_duration=min_duration,
                        max_offset=max_offset,
                        force=True,
                    )
    return