plot input image and its reuslts
(iou_sort_masks, area_sort_masks, image_ori, save_path='../vis/')
| 74 | return im |
| 75 | |
| 76 | def plot_multi_results(iou_sort_masks, area_sort_masks, image_ori, save_path='../vis/'): |
| 77 | """ |
| 78 | plot input image and its reuslts |
| 79 | """ |
| 80 | if not os.path.exists(save_path): |
| 81 | os.mkdir(save_path) |
| 82 | plt.imshow(image_ori) |
| 83 | plt.savefig('../vis/input.png') |
| 84 | def create_long_image(masks): |
| 85 | ims = [] |
| 86 | for img in masks: |
| 87 | ims.append(img) |
| 88 | width, height = ims[0].size |
| 89 | result = Image.new(ims[0].mode, (width * len(ims), height)) |
| 90 | for i, im in enumerate(ims): |
| 91 | result.paste(im, box=(i * width, 0)) |
| 92 | return result |
| 93 | create_long_image(iou_sort_masks).save('../vis/all_results_sort_by_iou.png') |
| 94 | create_long_image(area_sort_masks).save('../vis/all_results_sort_by_areas.png') |
nothing calls this directly
no test coverage detected