Exemplo n.º 1
0
#  ALL RIGHTS RESERVED.
#
#  Authors: Tobias Kuehnl <*****@*****.**>
#           Jannik Fritsch <*****@*****.**>
#

import os, sys
import computeBaseline, transform2BEV

#########################################################################
# test script to process testing data in perspective domain and 
# transform the results to the metric BEV 
#########################################################################

if __name__ == "__main__":
    
    datasetDir = '/home/keenburn2004/data_road'
    outputDir_perspective = '/home/keenburn2004/data_road/testing/test_baseline_perspective'
    outputDir_bev = '/home/keenburn2004/data_road/testing/test_baseline_bev'
    testData_pathToCalib = os.path.join(datasetDir, 'testing/calib')
    print(testData_pathToCalib)space,
    # you need to run this script before submission!
    inputFiles = os.path.join(outputDir_perspective, '*.png')
    print(inputFiles)
    transform2BEV.main(inputFiles, testData_pathToCalib, outputDir_bev)
    # now zip the contents in the directory 'outputDir_bev' and upload
    # the zip file to the KITTI server


    
Exemplo n.º 2
0
#
#  Authors: Tobias Kuehnl <*****@*****.**>
#           Jannik Fritsch <*****@*****.**>
#

import os, sys
import computingPipeline, transform2BEV

#########################################################################
# test script to process testing data in perspective domain and 
# transform the results to the metric BEV 
#########################################################################

if __name__ == "__main__":
    
    calib = '/home/morris/var/media/Elements/var/data/KITTI/data_road/training/calib/'
    outputDir = '/home/morris/var/media/Elements/var/data/KITTI/data_road/training/image/'
    outputDir_bev = '/home/morris/var/media/Elements/var/data/KITTI/data_road/training/bev/'
   
    # Convert baseline in perspective space into BEV space
    # If your algorithm provides results in perspective space,
    # you need to run this script before submission!
    inputFiles = os.path.join(outputDir, '*.png')
    transform2BEV.main(inputFiles, calib, outputDir_bev)

    # now zip the contents in the directory 'outputDir_bev' and upload
    # the zip file to the KITTI server


    
    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')
    
    # path2data
    testData_pathToCalib = os.path.join(datasetDir, 'testing/calib')
    outputDir_perspective = os.path.join(outputDir, 'baseline_perspective_test')
    outputDir_bev = os.path.join(outputDir, 'baseline_bev_test')
    
    # Run computeBaseline script to generate example classification results on testing set
    # Replace by your algorithm to generate real results
    trainDir = os.path.join(datasetDir, 'training')
    testDir = os.path.join(datasetDir, 'testing')
    computeBaseline.main(trainDir, testDir, outputDir_perspective)
    
    # Convert baseline in perspective space into BEV space
    # If your algorithm provides results in perspective space,
    # you need to run this script before submission!
    inputFiles = os.path.join(outputDir_perspective, '*.png')
    transform2BEV.main(inputFiles, testData_pathToCalib, outputDir_bev)

    # now zip the contents in the directory 'outputDir_bev' and upload
    # the zip file to the KITTI server