Ejemplo n.º 1
0
def exhaustive_search(image_path, metadata_path, unit_ratio_list, overlap_ratio):
    # Given an image and its annotation meta data, generate all possible windows with the target
    p = parse_image_metadata(metadata_path, parseObject=False)
    windowL = []
    for ratio in unit_ratio_list:
        window_builder(p=p, unit_ratio=ratio, overlap_ratio=overlap_ratio, winList=windowL)
    return windowL
Ejemplo n.º 2
0
def batch_one_image_dataset(global_X_path, global_Y_path, img_window_path, img_vlad_path, img_metadata_path, target, overlap_threshold=0.5):
    pic = parse_image_metadata(file_path=img_metadata_path, parseObject=True)
    winL = de_serialize_window(input_path=img_window_path)
    vladL = load_matrix(input_path=img_vlad_path).tolist()
    dataset = get_data_set_X_Y(winL, vladL, pic, target, overlap_threshold)
    X, Y = dataset[0], dataset[1]
    append_file(dest_file=global_X_path, strInput=X)
    append_file(dest_file=global_Y_path, strInput=Y)
Ejemplo n.º 3
0
def exhaustive_search(image_path, metadata_path, unit_ratio_list,
                      overlap_ratio):
    # Given an image and its annotation meta data, generate all possible windows with the target
    p = parse_image_metadata(metadata_path, parseObject=False)
    windowL = []
    for ratio in unit_ratio_list:
        window_builder(p=p,
                       unit_ratio=ratio,
                       overlap_ratio=overlap_ratio,
                       winList=windowL)
    return windowL
Ejemplo n.º 4
0
def batch_one_image_dataset(global_X_path,
                            global_Y_path,
                            img_window_path,
                            img_vlad_path,
                            img_metadata_path,
                            target,
                            overlap_threshold=0.5):
    pic = parse_image_metadata(file_path=img_metadata_path, parseObject=True)
    winL = de_serialize_window(input_path=img_window_path)
    vladL = load_matrix(input_path=img_vlad_path).tolist()
    dataset = get_data_set_X_Y(winL, vladL, pic, target, overlap_threshold)
    X, Y = dataset[0], dataset[1]
    append_file(dest_file=global_X_path, strInput=X)
    append_file(dest_file=global_Y_path, strInput=Y)