Exemplo n.º 1
0
    def log_fusion_net_target(self, rgb, scope_name=''):
        subdir = self.log_subdir
        top_image = self.top_image

        img_rgb_rois = box.draw_boxes(
            rgb,
            self.batch_rgb_rois[np.where(self.batch_fuse_labels == 0), 1:5][0],
            color=(0, 0, 255),
            thickness=1)
        img_rgb_rois = box.draw_boxes(
            img_rgb_rois,
            self.batch_rgb_rois[np.where(self.batch_fuse_labels != 0), 1:5][0],
            color=(255, 255, 255),
            thickness=3)
        # nud.imsave('img_rgb_rois', img_rgb_rois, subdir)
        self.summary_image(img_rgb_rois,
                           scope_name + '/img_rgb_rois',
                           step=self.n_global_step)

        # labels, deltas, rois3d, top_img, cam_img, class_color
        top_img, cam_img = draw_fusion_target(self.batch_fuse_labels,
                                              self.batch_fuse_targets,
                                              self.batch_rois3d, top_image,
                                              rgb, [[10, 20, 10], [255, 0, 0]])
        top_new_size = (cam_img.shape[0],
                        int(top_img.shape[1] *
                            (cam_img.shape[0] / top_img.shape[0])))
        top_img = cv2.resize(top_img, (top_new_size[1], top_new_size[0]))

        img_cat = np.concatenate((top_img, cam_img), 1)
        self.summary_image(img_cat,
                           scope_name + '/fusion_target',
                           step=self.n_global_step)
Exemplo n.º 2
0
    def log_fusion_net_target(self, rgb, scope_name=''):
        subdir = self.log_subdir
        top_image = self.top_image

        img_rgb_rois = box.draw_boxes(
            rgb,
            self.batch_rgb_rois[np.where(self.batch_fuse_labels == 0), 1:5][0],
            color=(0, 0, 255),
            thickness=1)
        img_rgb_rois = box.draw_boxes(
            img_rgb_rois,
            self.batch_rgb_rois[np.where(self.batch_fuse_labels == 1), 1:5][0],
            color=(255, 255, 255),
            thickness=3)
        # nud.imsave('img_rgb_rois', img_rgb_rois, subdir)
        self.summary_image(img_rgb_rois,
                           scope_name + '/img_rgb_rois',
                           step=self.n_global_step)

        # labels, deltas, rois3d, top_img, cam_img, class_color
        top_img, cam_img = draw_fusion_target(self.batch_fuse_labels,
                                              self.batch_fuse_targets,
                                              self.batch_rois3d, top_image,
                                              rgb, [[10, 20, 10], [255, 0, 0]])
        # nud.imsave('fusion_target_rgb', cam_img, subdir)
        # nud.imsave('fusion_target_top', top_img, subdir)
        self.summary_image(cam_img,
                           scope_name + '/fusion_target_rgb',
                           step=self.n_global_step)
        self.summary_image(top_img,
                           scope_name + '/fusion_target_top',
                           step=self.n_global_step)
Exemplo n.º 3
0
    def log_fusion_net_target(self,rgb, scope_name=''):
        subdir = self.log_subdir
        top_image = self.top_image

        img_rgb_rois = box.draw_boxes(rgb, self.batch_rgb_rois[np.where(self.batch_fuse_labels == 0), 1:5][0],
                                      color=(0, 0, 255), thickness=1)
        img_rgb_rois = box.draw_boxes(img_rgb_rois,
                                      self.batch_rgb_rois[np.where(self.batch_fuse_labels == 1), 1:5][0],
                                      color=(255, 255, 255), thickness=3)
        # nud.imsave('img_rgb_rois', img_rgb_rois, subdir)
        self.summary_image(img_rgb_rois, scope_name+'/img_rgb_rois', step=self.n_global_step)

        # labels, deltas, rois3d, top_img, cam_img, class_color
        top_img, cam_img = draw_fusion_target(self.batch_fuse_labels, self.batch_fuse_targets, self.batch_rois3d,
                                              top_image, rgb, [[10, 20, 10], [255, 0, 0]])
        # nud.imsave('fusion_target_rgb', cam_img, subdir)
        # nud.imsave('fusion_target_top', top_img, subdir)
        self.summary_image(cam_img, scope_name+'/fusion_target_rgb', step=self.n_global_step)
        self.summary_image(top_img, scope_name+'/fusion_target_top', step=self.n_global_step)
Exemplo n.º 4
0
    def log_fusion_net_target(self,rgb, scope_name=''):
        subdir = self.log_subdir
        top_image = self.top_image

        img_rgb_rois = box.draw_boxes(rgb, self.batch_rgb_rois[np.where(self.batch_fuse_labels == 0), 1:5][0],
                                      color=(0, 0, 255), thickness=1)
        img_rgb_rois = box.draw_boxes(img_rgb_rois,
                                      self.batch_rgb_rois[np.where(self.batch_fuse_labels == 1), 1:5][0],
                                      color=(255, 255, 255), thickness=3)
        # nud.imsave('img_rgb_rois', img_rgb_rois, subdir)
        self.summary_image(img_rgb_rois, scope_name+'/img_rgb_rois', step=self.n_global_step)

        # labels, deltas, rois3d, top_img, cam_img, class_color
        top_img, cam_img = draw_fusion_target(self.batch_fuse_labels, self.batch_fuse_targets, self.batch_rois3d,
                                              top_image, rgb, [[10, 20, 10], [255, 0, 0]])
        top_new_size = (cam_img.shape[0], int(top_img.shape[1]*(cam_img.shape[0]/top_img.shape[0])))
        top_img = cv2.resize(top_img,(top_new_size[1],top_new_size[0]))

        img_cat = np.concatenate((top_img,cam_img),1)
        self.summary_image(img_cat, scope_name+'/fusion_target', step=self.n_global_step)