Esempio n. 1
0
tsImages = getRecord(AFW(minw=minw, minh=minh), 10000)
pylab.figure(figsize=(10, 7))
res = []
for fn in glob.glob(os.path.join(baseFolder, "*")):
    print fn
    ovr = 0.5
    is_point = False
    ff = os.path.basename(fn).split(".")
    if ff[0] == "Face++" or ff[0] == "Picasa" or ff[0] == "Face":
        is_point = True
    if ff[0] == "Picasa":  # and ff[1]=="cvs":
        # special case for picasa
        # we evaluated manually, selecting overlap threshold of 0.1 gives
        # in this case the correct result
        ovr = 0.1
    dets = loadDetections(fn)
    dets = filterdet(dets, minpix)
    color, label = getColorLabel(fn)
    r = evaluate_optim(
        tsImages, dets, label, color, point=is_point, iter=nit, ovr=ovr)
    res.append(r)

# <codecell>


# <codecell>



# current plot
if detfile != "":
Esempio n. 2
0
    minw = args.minw
    minh = args.minh
    nit = args.nit

    detfile = args.detfile
    if detfile == "":
        raise ValueError('Please determine the detection file!')

    minpix = int(np.sqrt(0.5 * minw * minh))
    # Determine whether we are dealing with fddb or not
    if detfile.lower().find('pascal') != -1:
        tsImages = getRecord(
            PASCALfaces(minw=minw, minh=minh, useOldAnn=args.oldAnn), 10000)
        ovr = 0.5
        is_point = False
        dets = loadDetections(detfile)
        dets = filterdet(dets, minpix)
        color, label = getColorLabel(detfile)
        r = evaluate_optim(tsImages,
                           dets,
                           label,
                           color,
                           point=is_point,
                           iter=nit,
                           ovr=ovr)
        print('{}'.format(r[0]))

    elif detfile.lower().find('afw') != -1:
        tsImages = getRecord(AFW(minw=minw, minh=minh, useOldAnn=args.oldAnn),
                             10000)
        ovr = 0.5
Esempio n. 3
0
    pylab.rcParams.update(params)
    ###
    pylab.figure(figsize=(10, 7))
    res = []
    for fn in glob.glob(os.path.join(baseFolder, "*")):
        ovr = 0.5
        is_point = False
        ff = os.path.basename(fn).split(".")
        if ff[0] == "Face++" or ff[0] == "Picasa" or ff[0] == "Face":
            is_point = True
        if ff[0] == "Picasa":  # and ff[1]=="cvs":
            # special case for picasa
            # we evaluated manually, selecting overlap threshold of 0.1 gives
            # in this case the correct result
            ovr = 0.1
        dets = loadDetections(fn)
        dets = filterdet(dets, minpix)
        color, label = getColorLabel(fn)
        r = evaluate_optim(tsImages,
                           dets,
                           label,
                           color,
                           point=is_point,
                           iter=nit,
                           ovr=ovr)
        res.append(r)

    # current plot
    if args.detfile != "":
        dets = loadDetections(args.detfile)
        dets = filterdet(dets, minpix)
Esempio n. 4
0
    # BASELINES
    pylab.figure(figsize=(10, 7))
    res = []
    for fn in glob.glob(os.path.join(baseFolder, "*")):
        ovr = 0.5
        is_point = False
        ff = os.path.basename(fn).split(".")
        if ff[0] == "Face++" or ff[0] == "Picasa" or ff[0] == "Face":
            is_point = True
        if ff[0] == "Picasa":  # and ff[1]=="cvs":
            # special case for picasa
            # we evaluated manually, selecting overlap threshold of 0.1 gives
            # in this case the correct result
            ovr = 0.1
        dets = loadDetections(fn)
        dets = filterdet(dets, minpix)
        color, label = getColorLabel(fn)
        r = evaluate_optim(
            tsImages, dets, label, color, point=is_point, iter=nit, ovr=ovr)
        res.append(r)

    # current plot
    if args.detfile != "":
        dets = loadDetections(args.detfile)
        dets = filterdet(dets, minpix)
        r = evaluate_optim(tsImages, dets, args.detfile, 'green', iter=nit)
        res.append(r)

    res.sort(key=lambda tup: tup[0], reverse=True)
    ii = []