def main(argv): seq = argv[0] print seq datasetDir = '/home/morris/var/media/Elements/var/data/KITTI/data_road/training/' outputDir = '/home/morris/var/media/Elements/var/data/KITTI/data_road/LibLinear_Results/' + seq + '/grabcut_' + argv[1] + '_' + argv[2] + '_' + argv[3] + '/' evaluateRoad.main(outputDir, datasetDir)
"Not deleting result files in the directory. Aborting now...") sys.exit() # Needs only to be called once, creates and stores ALL parameter files to paramDirName # Can be commented out, if they already exist from an earlier run... # cpf.createParameterFiles() # Get a list with the names of all pngs used to detect lanes in inputPngs = getPngs(inputDirName) # Get a list with all parameter file names paramFiles = getParameterFiles(paramDirName, 2520, 3479) for pf in paramFiles: print( "#################### eval: current paramFile {} #######################" .format(pf)) suffix = getSuffix(pf) # Call for all images the binary for one specific parameter file for png in inputPngs: exitCode = callBinary(png, pf) storeExitcodes( exitCode, os.path.abspath(os.path.join(resultsDirName, "exit" + suffix))) # => output images of binary now exist in directory tmpDirName # Call fct main() evaluateRoad.py on each of output images in tmpDirName er.main(os.path.abspath(tmpDirName), os.path.abspath(imagesDirName), os.path.abspath(os.path.join(resultsDirName, "data" + suffix)), False) # => one addtional measurement file "data123" in resultDirName # Delete all images in tmpDirName deleteImages(os.path.abspath(tmpDirName))
#datasetDir = '/hri/storage/user/rtds/KITTI_Road_Data' #outputDir = '/hri/recordings/KITTI/road_dataset/' # check for correct number of arguments. if len(sys.argv)<2: print("Usage: python simpleExample_evalTrainResults.py <datasetDir> <outputDir>") print("<datasetDir> = base directory of the KITTI Road benchmark dataset (has to contain training and testing), e.g., /home/elvis/kitti_road/") print("<outputDir> = Here the baseline results will be saved, e.g., /home/elvis/kitti_road/results/") sys.exit(1) # parse parameters datasetDir = sys.argv[1] assert os.path.isdir(datasetDir), 'Error <datasetDir>=%s does not exist' %datasetDir if len(sys.argv)>2: outputDir = sys.argv[2] else: # default outputDir = os.path.join(datasetDir, 'results') # Run computeBaseline script to generate example classification results on training set trainDir = os.path.join(datasetDir, 'training') outputDir_perspective = os.path.join(outputDir, 'baseline_perspective_train') computeBaseline.main(trainDir, trainDir, outputDir_perspective) # Toy example running evaluation on perspective train data # Final evaluation on server is done in BEV space and uses a 'valid_map' # indicating the BEV areas that are invalid # (no correspondence in perspective space) evaluateRoad.main(outputDir_perspective, trainDir)
# datasetDir = '/hri/storage/user/rtds/KITTI_Road_Data' # outputDir = '/hri/recordings/KITTI/road_dataset/' # check for correct number of arguments. if len(sys.argv) < 2: print "Usage: python simpleExample_evalTrainResults.py <datasetDir> <outputDir>" print "<datasetDir> = base directory of the KITTI Road benchmark dataset (has to contain training and testing), e.g., /home/elvis/kitti_road/" print "<outputDir> = Here the baseline results will be saved, e.g., /home/elvis/kitti_road/results/" sys.exit(1) # parse parameters datasetDir = sys.argv[1] assert os.path.isdir(datasetDir), "Error <datasetDir>=%s does not exist" % datasetDir if len(sys.argv) > 2: outputDir = sys.argv[2] else: # default outputDir = os.path.join(datasetDir, "results") # Run computeBaseline script to generate example classification results on training set trainDir = os.path.join(datasetDir, "training") outputDir_perspective = os.path.join(outputDir, "baseline_perspective_train") computeBaseline.main(trainDir, trainDir, outputDir_perspective) # Toy example running evaluation on perspective train data # Final evaluation on server is done in BEV space and uses a 'valid_map' # indicating the BEV areas that are invalid # (no correspondence in perspective space) evaluateRoad.main(outputDir_perspective, trainDir)
import os, sys import computeBaseline, evaluateRoad if __name__ == "__main__": assert len(sys.argv) == 3, "Usage : python myeval.py <result_dir> <data_road_dir>" result_dir = sys.argv[1] dataset_dir = sys.argv[2] trainDir = os.path.join(dataset_dir, "training") evaluateRoad.main(result_dir, trainDir)