def test_rpn(image_set, year, root_path, devkit_path, prefix, epoch, ctx, vis=False): # load symbol sym = get_vgg_rpn_test() # load testing data voc, roidb = load_gt_roidb(image_set, year, root_path, devkit_path) test_data = ROIIter(roidb, batch_size=1, shuffle=False, mode='test') # load model args, auxs, _ = load_param(prefix, epoch, convert=True, ctx=ctx) # start testing detector = Detector(sym, ctx, args, auxs) imdb_boxes = generate_detections(detector, test_data, voc, vis=vis) voc.evaluate_recall(roidb, candidate_boxes=imdb_boxes)
def test_rpn(image_set, year, root_path, devkit_path, trained, epoch, ctx): from rcnn.rpn.generate import Detector, generate_detections # load symbol sym = get_vgg_rpn_test() # load testing data voc, roidb = load_gt_roidb(image_set, year, root_path, devkit_path) test_data = ROIIter(roidb, batch_size=1, shuffle=False, mode="test") # load trained args, auxs = load_param(trained, epoch, convert=True, ctx=ctx[0]) # start testing detector = Detector(sym, ctx[0], args, auxs) imdb_boxes = generate_detections(detector, test_data, voc, vis=False) voc.evaluate_recall(roidb, candidate_boxes=imdb_boxes)
def test_rpn(image_set, year, root_path, devkit_path, trained, epoch, ctx): from rcnn.rpn.generate import Detector, generate_detections # load symbol sym = get_vgg_rpn_test() # load testing data voc, roidb = load_gt_roidb(image_set, year, root_path, devkit_path) test_data = ROIIter(roidb, batch_size=1, shuffle=False, mode='test') # load trained args, auxs = load_param(trained, epoch, convert=True, ctx=ctx[0]) # start testing detector = Detector(sym, ctx[0], args, auxs) imdb_boxes = generate_detections(detector, test_data, voc, vis=False) voc.evaluate_recall(roidb, candidate_boxes=imdb_boxes)
def test_rpn(image_set, year, root_path, devkit_path, prefix, epoch, ctx, vis): # set config config.TEST.HAS_RPN = True config.TEST.RPN_PRE_NMS_TOP_N = -1 config.TEST.RPN_POST_NMS_TOP_N = 2000 # load symbol sym = get_vgg_rpn_test() # load testing data voc, roidb = load_gt_roidb(image_set, year, root_path, devkit_path) test_data = ROIIter(roidb, batch_size=1, shuffle=False, mode='test') # load model args, auxs = load_param(prefix, epoch, convert=True, ctx=ctx) # start testing detector = Detector(sym, ctx, args, auxs) imdb_boxes = generate_detections(detector, test_data, voc, vis=vis) voc.evaluate_recall(roidb, candidate_boxes=imdb_boxes)
def gpu_rpn(): args = parse_args() ctx = mx.gpu(args.gpu) symbol = get_vgg_rpn_test(num_anchors=config.NUM_ANCHORS) predictor = get_net(symbol, args.prefix, args.epoch, ctx) demo_rpn(predictor, args.image)
def gpu_rpn(): args = parse_args() ctx = mx.gpu(args.gpu) symbol = get_vgg_rpn_test() predictor = get_net(symbol, args.prefix, args.epoch, ctx) demo_rpn(predictor, args.image)