changeset 1190:d24d57e4de24

work on optimization
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 28 Jun 2022 01:04:58 +0200
parents ccab20f85710
children f3b3696f5640
files scripts/compute-clearmot.py scripts/nomad/site-parameters-optimization.py trafficintelligence/moving.py
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/compute-clearmot.py	Sat Jun 25 01:09:20 2022 +0200
+++ b/scripts/compute-clearmot.py	Tue Jun 28 01:04:58 2022 +0200
@@ -8,6 +8,8 @@
 
 # TODO: need to trim objects to same mask ?
 
+# Warning, not working with changed intrinsic and homography processing
+
 parser = argparse.ArgumentParser(description='The program computes the CLEAR MOT metrics between ground truth and tracker output (in Polytrack format)', epilog='''CLEAR MOT metrics information:
 Keni, Bernardin, and Stiefelhagen Rainer. "Evaluating multiple object tracking performance: the CLEAR MOT metrics." EURASIP Journal on Image and Video Processing 2008 (2008)
 
--- a/scripts/nomad/site-parameters-optimization.py	Sat Jun 25 01:09:20 2022 +0200
+++ b/scripts/nomad/site-parameters-optimization.py	Tue Jun 28 01:04:58 2022 +0200
@@ -51,8 +51,10 @@
         intersectionAbsPath = os.path.abspath(intersectionPath)
         os.chdir(intersectionAbsPath)
         # iterate through all the subdirectories to find ground truth sqlite files
-        gtDatabaseaAbsPaths.extend([os.path.abspath(intersectionAbsPath + '/' + file) for file in glob.glob('**/*_gt.sqlite', recursive=True)])
-        configFileAbsPaths.append(os.path.abspath(intersectionAbsPath + '/' + glob.glob('*.cfg', recursive=True)[0]))
+        newPaths = [os.path.abspath(intersectionAbsPath + '/' + file) for file in glob.glob('**/*_gt.sqlite', recursive=True)]
+        gtDatabaseaAbsPaths.extend(newPaths)
+        configFilename = os.path.abspath(intersectionAbsPath + '/' + glob.glob('*.cfg', recursive=True)[0])
+        configFileAbsPaths.extend([configFilename]*len(newPaths))
         os.chdir(cwd)
     for gtDatabaseAbsPath, configFileAbsPath in zip(gtDatabaseaAbsPaths, configFileAbsPaths):
         gtDatabaseBasename = gtDatabaseAbsPath[:-10]
--- a/trafficintelligence/moving.py	Sat Jun 25 01:09:20 2022 +0200
+++ b/trafficintelligence/moving.py	Tue Jun 28 01:04:58 2022 +0200
@@ -2002,7 +2002,7 @@
     Reference:
     Keni, Bernardin, and Stiefelhagen Rainer. "Evaluating multiple object tracking performance: the CLEAR MOT metrics." EURASIP Journal on Image and Video Processing 2008 (2008)
 
-    objects and annotations are supposed to in the same space
+    objects and annotations are supposed to be in the same space
     current implementation is BBMovingObject (bounding boxes)
     mathingDistance is threshold on matching between annotation and object