def generate_disp_data(normed_disp_field_maps, gt_polygons, disp_max_abs_value, spatial_shape):
    scaled_disp_field_maps = normed_disp_field_maps * disp_max_abs_value
    disp_polygons_list = polygon_utils.apply_displacement_fields_to_polygons(gt_polygons,
                                                                             scaled_disp_field_maps)
    disp_polygon_maps = polygon_utils.draw_polygon_maps(disp_polygons_list, spatial_shape, fill=True,
                                                        edges=True, vertices=True)
    return disp_polygons_list, disp_polygon_maps
Example #2
0
File: test.py Project: dtekeshe/ml
def generate_disp_data(normed_disp_field_maps, gt_polygons,
                       disp_max_abs_value):
    scaled_disp_field_maps = normed_disp_field_maps * disp_max_abs_value
    disp_polygons_list = polygon_utils.apply_displacement_fields_to_polygons(
        gt_polygons, scaled_disp_field_maps)
    return disp_polygons_list