Open ygean opened 5 years ago
可视化比较简单,这样做 `,anchors,=generate_default_anchor_maps() print type(anchors),anchors.shape
print len(anchors) for anc in anchors: if anc[0]<0 or anc[1]<0 or anc[2]<0 or anc[3]<0: print anc
import matplotlib.pyplot as plt xmin=-224 xmax=672 ymin=-224 ymax=672 fig = plt.figure(figsize=(8,8)) ax = fig.add_subplot(111) plt.xlim( (xmin, xmax) ) plt.ylim( (ymin, ymax) )
for anch in anchors: rect = plt.Rectangle((anch[1],anch[0]),#(x0,y0) anch[3]-anch[1],#width anch[2]-anch[0],#height edgecolor='r', facecolor='none') ax.add_patch(rect) plt.show()`
I want to know how to draw the box when testing , so that i can find if the network focus the most import regins. The paper had a amazing visualization.
Actually, I did it by my mentioned approach not zbxzc35 mentioned . But it seems does not have amazing visualization , which anchor boxes should be localized discriminative feature regions on image directly, my visualization result told me that effect of RPN module still confuses me. It need author's help to tell more details.
@VCBE123 I think you need to find anchor boxes selected by trained model and pad your image with constant value for resizing image's size and then, the way of drawing anchor boxes on PIL image format is easy on searching from stackoverflow.com, good luck for you, guy.
@zhouyuangan Thank you for your help.
@zbxzc35 为什么坐标是 -224 672 输入图片大小不是 448*448 吗,这样的设置不会导致坐标超出图片的大小吗
@VCBE123 I think you need to find anchor boxes selected by trained model and pad your image with constant value for resizing image's size and then, the way of drawing anchor boxes on PIL image format is easy on searching from stackoverflow.com, good luck for you, guy.
Hello, when I run test.py on CUB_200 dataset, nothing has been output.Is this normal? then where to find the result of bounding boxes of the test images ? without the bbox information how can I visualize? I really need help.
@VCBE123 I think you need to find anchor boxes selected by trained model and pad your image with constant value for resizing image's size and then, the way of drawing anchor boxes on PIL image format is easy on searching from stackoverflow.com, good luck for you, guy.
Hello, when I run test.py on CUB_200 dataset, nothing has been output.Is this normal? then where to find the result of bounding boxes of the test images ? without the bbox information how can I visualize? I really need help.
I would like to ask, did you successfully draw the bounding box during the test? How to visualize? thank you very much.
@yangze0930 Hi, I get self.top_n_cdds in model.py/attention_net and then I pad image to 896 x 896 size, draw anchor boxes in padded image. Have I done something wrong in this procedure? I wanna know how you visualize anchor boxes in image, I'd like you can reply as soon as possible sincerely, thanks a lot