comparison python/tests/moving.txt @ 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 ad31520e81b5
children 84420159c5f4
comparison
equal deleted inserted replaced
767:04497166d8f0 768:f8e0a8ea8402
174 >>> o1.classifyUserTypeSpeedMotorized(1.5, np.median) 174 >>> o1.classifyUserTypeSpeedMotorized(1.5, np.median)
175 >>> userTypeNames[o1.getUserType()] 175 >>> userTypeNames[o1.getUserType()]
176 'pedestrian' 176 'pedestrian'
177 177
178 >>> o1 = MovingObject.generate(Point(0.,0.), Point(1.,0.), TimeInterval(0,10)) 178 >>> o1 = MovingObject.generate(Point(0.,0.), Point(1.,0.), TimeInterval(0,10))
179 >>> gt1 = BBAnnotation(1, TimeInterval(0,10), MovingObject.generate(Point(0.2,0.6), Point(1.,0.), TimeInterval(0,10)), MovingObject.generate(Point(-0.2,-0.4), Point(1.,0.), TimeInterval(0,10))) 179 >>> gt1 = BBMovingObject(1, TimeInterval(0,10), MovingObject.generate(Point(0.2,0.6), Point(1.,0.), TimeInterval(0,10)), MovingObject.generate(Point(-0.2,-0.4), Point(1.,0.), TimeInterval(0,10)))
180 >>> gt1.computeCentroidTrajectory() 180 >>> gt1.computeCentroidTrajectory()
181 >>> computeClearMOT([gt1], [], 0.2, 0, 10) 181 >>> computeClearMOT([gt1], [], 0.2, 0, 10)
182 (None, 0.0, 11, 0, 0, 11) 182 (None, 0.0, 11, 0, 0, 11)
183 >>> computeClearMOT([], [o1], 0.2, 0, 10) 183 >>> computeClearMOT([], [o1], 0.2, 0, 10)
184 (None, None, 0, 0, 11, 0) 184 (None, None, 0, 0, 11, 0)
187 >>> computeClearMOT([gt1], [o1], 0.05, 0, 10) 187 >>> computeClearMOT([gt1], [o1], 0.05, 0, 10)
188 (None, -1.0, 11, 0, 11, 11) 188 (None, -1.0, 11, 0, 11, 11)
189 189
190 >>> o1 = MovingObject(1, TimeInterval(0,3), positions = Trajectory([range(4), [0.1, 0.1, 1.1, 1.1]])) 190 >>> o1 = MovingObject(1, TimeInterval(0,3), positions = Trajectory([range(4), [0.1, 0.1, 1.1, 1.1]]))
191 >>> o2 = MovingObject(2, TimeInterval(0,3), positions = Trajectory([range(4), [0.9, 0.9, -0.1, -0.1]])) 191 >>> o2 = MovingObject(2, TimeInterval(0,3), positions = Trajectory([range(4), [0.9, 0.9, -0.1, -0.1]]))
192 >>> gt1 = BBAnnotation(1, TimeInterval(0,3), MovingObject(positions = Trajectory([range(4), [0.]*4])), MovingObject(positions = Trajectory([range(4), [0.]*4]))) 192 >>> gt1 = BBMovingObject(1, TimeInterval(0,3), MovingObject(positions = Trajectory([range(4), [0.]*4])), MovingObject(positions = Trajectory([range(4), [0.]*4])))
193 >>> gt1.computeCentroidTrajectory() 193 >>> gt1.computeCentroidTrajectory()
194 >>> gt2 = BBAnnotation(2, TimeInterval(0,3), MovingObject(positions = Trajectory([range(4), [1.]*4])), MovingObject(positions = Trajectory([range(4), [1.]*4]))) 194 >>> gt2 = BBMovingObject(2, TimeInterval(0,3), MovingObject(positions = Trajectory([range(4), [1.]*4])), MovingObject(positions = Trajectory([range(4), [1.]*4])))
195 >>> gt2.computeCentroidTrajectory() 195 >>> gt2.computeCentroidTrajectory()
196 >>> computeClearMOT([gt1, gt2], [o1, o2], 0.2, 0, 3) # doctest:+ELLIPSIS 196 >>> computeClearMOT([gt1, gt2], [o1, o2], 0.2, 0, 3) # doctest:+ELLIPSIS
197 (0.1..., 0.75, 0, 2, 0, 8) 197 (0.1..., 0.75, 0, 2, 0, 8)
198 >>> computeClearMOT([gt2, gt1], [o2, o1], 0.2, 0, 3) # doctest:+ELLIPSIS 198 >>> computeClearMOT([gt2, gt1], [o2, o1], 0.2, 0, 3) # doctest:+ELLIPSIS
199 (0.1..., 0.75, 0, 2, 0, 8) 199 (0.1..., 0.75, 0, 2, 0, 8)