comparison scripts/compute-clearmot.py @ 768:f8e0a8ea8402 dev

updated the bounding box code (the name so that it is general for ground truth and UT)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 14 Jan 2016 11:44:39 -0500
parents 43ae3a1af290
children 3aa6102ccc12
comparison
equal deleted inserted replaced
767:04497166d8f0 768:f8e0a8ea8402
39 mask = mask[:,:,0] 39 mask = mask[:,:,0]
40 for obj in objects: 40 for obj in objects:
41 maskObjects += obj.getObjectsInMask(mask, inv(homography), 2) # TODO add option to keep object if at least one feature in mask 41 maskObjects += obj.getObjectsInMask(mask, inv(homography), 2) # TODO add option to keep object if at least one feature in mask
42 objects = maskObjects 42 objects = maskObjects
43 43
44 annotations = storage.loadGroundTruthFromSqlite(args.groundTruthDatabaseFilename) 44 annotations = storage.loadBBMovingObjectsFromSqlite(args.groundTruthDatabaseFilename)
45 for a in annotations: 45 for a in annotations:
46 a.computeCentroidTrajectory(homography) 46 a.computeCentroidTrajectory(homography)
47 47
48 if args.display: 48 if args.display:
49 motp, mota, mt, mme, fpt, gt, gtMatches, toMatches = moving.computeClearMOT(annotations, objects, args.matchingDistance, args.firstInstant, args.lastInstant, True) 49 motp, mota, mt, mme, fpt, gt, gtMatches, toMatches = moving.computeClearMOT(annotations, objects, args.matchingDistance, args.firstInstant, args.lastInstant, True)