def _load_rpn_roidb(self, gt_roidb, model):
    if (self._image_set == 'test'):
        prefix = (model + '/testing')
    else:
        prefix = (model + '/training')
    box_list = []
    for index in self.image_index:
        filename = os.path.join(self._pascal_path, 'region_proposals', prefix, (index + '.txt'))
        assert os.path.exists(filename), 'RPN data not found at: {}'.format(filename)
        raw_data = np.loadtxt(filename, dtype=float)
        if (len(raw_data.shape) == 1):
            if (raw_data.size == 0):
                raw_data = raw_data.reshape((0, 5))
            else:
                raw_data = raw_data.reshape((1, 5))
        x1 = raw_data[:, 0]
        y1 = raw_data[:, 1]
        x2 = raw_data[:, 2]
        y2 = raw_data[:, 3]
        score = raw_data[:, 4]
        inds = np.where(((x2 > x1) & (y2 > y1)))[0]
        raw_data = raw_data[inds, :4]
        self._num_boxes_proposal += raw_data.shape[0]
        box_list.append(raw_data)
    return self.create_roidb_from_box_list(box_list, gt_roidb)
def _load_rpn_roidb(self, gt_roidb, model):
    if (self._image_set == 'test'):
        prefix = (model + '/testing')
    else:
        prefix = (model + '/training')
    box_list = []
    for index in self.image_index:
        filename = os.path.join(self._pascal_path, 'region_proposals', prefix, (index + '.txt'))
        assert os.path.exists(filename), 'RPN data not found at: {}'.format(filename)
        raw_data = np.loadtxt(filename, dtype=float)
        if (len(raw_data.shape) == 1):
            if (raw_data.size == 0):
                raw_data = raw_data.reshape((0, 5))
            else:
                raw_data = raw_data.reshape((1, 5))
        x1 = raw_data[:, 0]
        y1 = raw_data[:, 1]
        x2 = raw_data[:, 2]
        y2 = raw_data[:, 3]
        score = raw_data[:, 4]
        inds = np.where(((x2 > x1) & (y2 > y1)))[0]
        raw_data = raw_data[inds, :4]
        self._num_boxes_proposal += raw_data.shape[0]
        box_list.append(raw_data)
    return self.create_roidb_from_box_list(box_list, gt_roidb)