예제 #1
0
def load_ss_roidb(image_set, year, root_path, devkit_path, flip=False):
    voc = PascalVOC(image_set, year, root_path, devkit_path)
    gt_roidb = voc.gt_roidb()
    ss_roidb = voc.selective_search_roidb(gt_roidb)
    if flip:
        ss_roidb = voc.append_flipped_images(ss_roidb)
    prepare_roidb(voc, ss_roidb)
    means, stds = add_bbox_regression_targets(ss_roidb)
    return voc, ss_roidb, means, stds
예제 #2
0
import os

from helper.dataset import pascal_voc
from helper.processing import roidb
from rcnn import data_iter

# test flip
devkit_path = os.path.join(os.path.expanduser('~'), 'Dataset', 'VOCdevkit')
voc = pascal_voc.PascalVOC('trainval', '2007', devkit_path)
gt_roidb = voc.gt_roidb()
ss_roidb = voc.selective_search_roidb(gt_roidb)
ss_roidb = voc.append_flipped_images(ss_roidb)
roidb.prepare_roidb(voc, ss_roidb)
means, stds = roidb.add_bbox_regression_targets(ss_roidb)

roi_iter = data_iter.ROIIter(ss_roidb, shuffle=True)

for j in range(0, 20):
    print j
    for databatch in roi_iter:
        i = 0
    roi_iter.reset()