Mercurial Hosting > traffic-intelligence
comparison scripts/nomad/site-parameters-optimization.py @ 1191:f3b3696f5640
adding time interval for MOTA computation
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 28 Jun 2022 11:30:08 +0200 |
parents | d24d57e4de24 |
children | 606817bc31e8 |
comparison
equal
deleted
inserted
replaced
1190:d24d57e4de24 | 1191:f3b3696f5640 |
---|---|
72 #load trajectory | 72 #load trajectory |
73 objects = storage.loadTrajectoriesFromSqlite(databaseFilename, 'object') | 73 objects = storage.loadTrajectoriesFromSqlite(databaseFilename, 'object') |
74 #load ground truth | 74 #load ground truth |
75 annotations = storage.loadTrajectoriesFromSqlite(gtDatabaseAbsPath, 'object') | 75 annotations = storage.loadTrajectoriesFromSqlite(gtDatabaseAbsPath, 'object') |
76 # Appending negative mota because nomad minimizes the output | 76 # Appending negative mota because nomad minimizes the output |
77 Mota.append(-computeMota(annotations, objects, Mota)) | 77 matchingDistance = 5 |
78 inter = TimeInterval.union([a.getTimeInterval() for a in annotations]) | |
79 motp, mota, mt, mme, fpt, gt, gtMatches, toMatches = moving.computeClearMOT(annotations, objects, matchingDistance, inter.first, inter.last) | |
80 Mota.append(-mota) | |
78 | 81 |
79 # Change to the previous directory | 82 # Change to the previous directory |
80 os.chdir(cwd) | 83 os.chdir(cwd) |
81 | 84 |
82 return np.mean(Mota) | 85 return np.mean(Mota) |