faster_rcnn_conv5.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:tf-Faster-RCNN 作者: kevinjliang 项目源码 文件源码
def vis_detections(self, im, class_name, gt_boxes, dets):
        """Visual debugging of detections."""
        import matplotlib
        matplotlib.use('TkAgg')  # For Mac OS
        import matplotlib.pyplot as plt
        import matplotlib.patches as patches
        fig, ax = plt.subplots(1)
        for i in range(np.minimum(10, dets.shape[0])):
            bbox = dets[i,1:]
            print(bbox)
            ax.imshow(np.squeeze(im), cmap="gray")
            self.plot_patch(ax, patches, bbox, gt=False)
        plt.title(class_name)
        self.plot_patch(ax, patches, gt_boxes[0][:4], gt=True)

        # Display Final composite image
        plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号