def evaluate_proposals(self, all_boxes, output_dir):
    for (im_ind, index) in enumerate(self.image_index):
        filename = os.path.join(output_dir, (index + '.txt'))
        print(('Writing PASCAL results to file ' + filename))
        with open(filename, 'wt') as f:
            for (cls_ind, cls) in enumerate(self.classes):
                if (cls == '__background__'):
                    continue
                dets = all_boxes[cls_ind][im_ind]
                if (dets == []):
                    continue
                for k in range(dets.shape[0]):
                    f.write('{:f} {:f} {:f} {:f} {:.32f}\n'.format(dets[(k, 0)], dets[(k, 1)], dets[(k, 2)], dets[(k, 3)], dets[(k, 4)]))
def evaluate_proposals(self, all_boxes, output_dir):
    for (im_ind, index) in enumerate(self.image_index):
        filename = os.path.join(output_dir, (index + '.txt'))
        print(('Writing PASCAL results to file ' + filename))
        with open(filename, 'wt') as f:
            for (cls_ind, cls) in enumerate(self.classes):
                if (cls == '__background__'):
                    continue
                dets = all_boxes[cls_ind][im_ind]
                if (dets == []):
                    continue
                for k in range(dets.shape[0]):
                    f.write('{:f} {:f} {:f} {:f} {:.32f}\n'.format(dets[(k, 0)], dets[(k, 1)], dets[(k, 2)], dets[(k, 3)], dets[(k, 4)]))