lib/dataset/deepv.py
def write_rpn_results(self, all_boxes):
        """
        write results files in pascal devkit path
        :param all_boxes: boxes to be processed [bbox, confidence]
        :return: None
        """
        rpn_classes = ['__background__', 'object']
        for cls_ind, cls in enumerate(rpn_classes):
            if cls == '__background__':
                continue
            print('Writing {} VOC results file'.format(cls))
            filename = self.get_result_file_template().format(cls)
            with open(filename, 'wt') as f:
                for im_ind, index in enumerate(self.image_set_index):
                    dets = all_boxes[im_ind]
                    if len(dets) == 0:
                        continue
                    # the VOCdevkit expects 1-based indices
                    for k in range(dets.shape[0]):
                        f.write('{:s} {:.3f} {:.1f} {:.1f} {:.1f} {:.1f}\n'.
                                format(index, dets[k, -1],
                                       dets[k, 0] + 1, dets[k, 1] + 1, dets[k, 2] + 1, dets[k, 3] + 1))

        write results files in pascal devkit path
        :param all_boxes: boxes to be processed [bbox, confidence]
        :return: None
        
write results files in pascal devkit path
write results files in pascal devkit path
def write_rpn_results(self, all_boxes):
        rpn_classes = ['__background__', 'object']
        for cls_ind, cls in enumerate(rpn_classes):
            if cls == '__background__':
                continue
            print('Writing {} VOC results file'.format(cls))
            filename = self.get_result_file_template().format(cls)
            with open(filename, 'wt') as f:
                for im_ind, index in enumerate(self.image_set_index):
                    dets = all_boxes[im_ind]
                    if len(dets) == 0:
                        continue
                    for k in range(dets.shape[0]):
                        f.write('{:s} {:.3f} {:.1f} {:.1f} {:.1f} {:.1f}\n'.
                                format(index, dets[k, -1],
                                       dets[k, 0] + 1, dets[k, 1] + 1, dets[k, 2] + 1, dets[k, 3] + 1))
def write_rpn_results ( self , all_boxes ) : rpn_classes = [ '__background__' , 'object' ] for cls_ind , cls in enumerate ( rpn_classes ) : if cls == '__background__' : continue print ( 'Writing {} VOC results file' . format ( cls ) ) filename = self . get_result_file_template ( ) . format ( cls ) with open ( filename , 'wt' ) as f : for im_ind , index in enumerate ( self . image_set_index ) : dets = all_boxes [ im_ind ] if len ( dets ) == 0 : continue for k in range ( dets . shape [ 0 ] ) : f . write ( '{:s} {:.3f} {:.1f} {:.1f} {:.1f} {:.1f}\n' . format ( index , dets [ k , - 1 ] , dets [ k , 0 ] + 1 , dets [ k , 1 ] + 1 , dets [ k , 2 ] + 1 , dets [ k , 3 ] + 1 ) )
write results files in pascal devkit path
write results files in pascal devkit path
"""
        write results files in pascal devkit path
        :param all_boxes: boxes to be processed [bbox, confidence]
        :return: None
        """ # the VOCdevkit expects 1-based indices
None
self
all_boxes
boxes to be processed [bbox, confidence]
boxes to be processed [ bbox confidence ]