Mercurial Hosting > traffic-intelligence
diff scripts/compute-clearmot.py @ 593:e2a873e08568
non-working clear mot metrics
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Sat, 06 Dec 2014 22:15:56 -0500 |
parents | 985a3021cff2 |
children | 9e39cd95e017 |
line wrap: on
line diff
--- a/scripts/compute-clearmot.py Fri Dec 05 17:50:16 2014 -0500 +++ b/scripts/compute-clearmot.py Sat Dec 06 22:15:56 2014 -0500 @@ -27,12 +27,19 @@ else: homography = None +firstInstant = int(args.firstInstant) +lastInstant = int(args.lastInstant) + objects = storage.loadTrajectoriesFromSqlite(args.trackerDatabaseFilename, 'object') annotations = storage.loadGroundTruthFromSqlite(args.groundTruthDatabaseFilename) for a in annotations: a.computeCentroidTrajectory(homography) -moving.matchingGroundTruthToTracker(objects, annotations, args.matchingDistance, - int(args.firstInstant), int(args.lastInstant)) -#storage.deleteFromSqlite(args.databaseFilename, args.dataType) +matchTable = moving.matchingGroundTruthToTracker(objects, annotations, args.matchingDistance, + firstInstant, lastInstant) +# number of frames of existence of all objects within [firstInstant, lastInstant] +nTrackFrames = sum([min(o.getLastInstant(),lastInstant)-max(o.getFirstInstant(),firstInstant)+1 for o in objects]) + +print moving.computeClearMOT(matchTable, nTrackFrames) +