# HG changeset patch # User Nicolas Saunier # Date 1683491067 14400 # Node ID 8356e15fd691ff4bf291a40959b0a5db40c5f7f6 # Parent 1b472cddf9b1ec73ffc7c2d415489fbadd645c7b fix for result files diff -r 1b472cddf9b1 -r 8356e15fd691 trafficintelligence/storage.py --- a/trafficintelligence/storage.py Fri May 05 22:52:25 2023 -0400 +++ b/trafficintelligence/storage.py Sun May 07 16:24:27 2023 -0400 @@ -1299,7 +1299,7 @@ # from https://github.com/utiasSTARS/pykitti/blob/master/pykitti/utils.py -def loadTrajectoriesFromKITTI(filename, kittiCalibration, oxts): +def loadTrajectoriesFromKITTI(filename, kittiCalibration, oxts, resultFile = False): '''Reads data from KITTI ground truth or output from an object detection and tracking method kittiCalibration is obtained from loading training/testing calibration file for each sequence 00XX.txt @@ -1328,6 +1328,8 @@ 'l', # box length (in meters) 'x', 'y', 'z', # location (x,y,z) in camera coord 'ry'] # yaw angle (around Y-axis in camera coordinates) [-pi..pi] + if resultFile: + header.append('score') data = read_csv(filename, delimiter = ' ', names = header) data = data[data.trackingid > -1]