Closed UdonDa closed 5 years ago
Hi @UdonDa, This code already provides those functions. Please look up: https://github.com/jiwoon-ahn/irn/blob/master/misc/imutils.py#L193-L272
Thanks! I will try it!
Sorry, I don't know how to save the images, fig6 (C) and (D) in the https://arxiv.org/pdf/1904.05044.pdf I want to save the centroid image. Please teach us.
Consider adding the following lines around here https://github.com/jiwoon-ahn/irn/blob/master/step/make_ins_seg_labels.py#L125
For (c),
colorize_displacement(dp)
For (d),
edge
Hi @jiwoon-ahn How can I get the Instance Map from the Displacement field (As in Figure 1)?
考虑在此处添加以下几行https://github.com/jiwoon-ahn/irn/blob/master/step/make_ins_seg_labels.py#L125 对于(c),
colorize_displacement(dp)
对于(d),edge
请问对于d用哪个函数
How can i get fig6 (e) Pseudo labels? Thank you
############Visual offset field from PIL import Image rgb_image = colorize_displacement(dp) if rgb_image.dtype != np.uint8: 空格rgb_image = (rgb_image * 255).astype(np.uint8) image = Image.fromarray(rgbimage) image.save(os.path.join("/disk4/xjt/irn-master/cam/","" + str(img_name)+"offset" + ".png")) ###############
offset_map1 = offset_map.cpu().numpy() norm_r = save_displacement_image(offset_map1)
import matplotlib.pyplot as plt import os fig, ax = plt.subplots(figsize=(10, 10)) cmap = plt.get_cmap('coolwarm') norm = plt.Normalize(vmin=0, vmax=1) cax = ax.imshow(norm_r, cmap=cmap, norm=norm) save_path = "/data2/jt2/code/BESTIE-main_peak50copy1_1active_get_stage1copy/utils/1/" filename = f"{fname[0]}{cls}.png" file_path = os.path.join(save_path, filename) plt.savefig(file_path, bbox_inches='tight', pad_inches=0) plt.close(fig) #############
Thanks to open your implementation!
I want to know how to save the visualization image like https://github.com/jiwoon-ahn/irn/blob/master/outline.jpg
thanks.