parser.add_argument('-d','--files',required=True,nargs='+',help="A list of score files to evaluate.")
parser.add_argument('-b','--baselines',default=[],nargs='+',help="A list of baseline results to add to the plot")
parser.add_argument('-D','--directory',default='.',help="A directory, where to find the --files")
parser.add_argument('-B','--baseline-directory',default='.',help="A directory, where to find the --baselines")
parser.add_argument('-R','--auto-baselines',choices=('bioid','mit-cmu'),help="Automatically add the baselines for the given database")
parser.add_argument('-l','--legends',nargs='+',help="A list of legend strings used for ROC, CMC and DET plots; if given, must be the same number than --files plus --baselines.")
parser.add_argument('-w','--output',default='FROC.pdf',help="If given, FROC curves will be plotted into the given pdf file.")
parser.add_argument('-c','--count-detections',action='store_true',help="Counts the number of detections (positive is higher than negative, per file).")
parser.add_argument('-n','--max',type=int,nargs=2,default=(160,70),help="The highest false alarms and the lowest detection rate to plot")
parser.add_argument('-t','--title',default='FROC',help="The title of the plot")
logger.error("The number of --files (%d) plus --baselines (%d) must be the same as --legends (%d)",len(args.files),len(args.baselines)ifargs.baselineselse0,len(args.legends))
args.legends=None
# update legends when they are not specified on command line