comparison trafficintelligence/moving.py @ 1218:1f0b1fc172f8

adding COCO person and vehicle types
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sat, 17 Jun 2023 08:48:22 -0400
parents 5038c357b57f
children 8a626226793e
comparison
equal deleted inserted replaced
1217:5038c357b57f 1218:1f0b1fc172f8
1356 1356
1357 userTypeNames = ['unknown', 1357 userTypeNames = ['unknown',
1358 'car', 1358 'car',
1359 'pedestrian', 1359 'pedestrian',
1360 'motorcycle', 1360 'motorcycle',
1361 'bicycle', 1361 'cyclist',
1362 'bus', 1362 'bus',
1363 'truck', 1363 'truck',
1364 'automated'] 1364 'automated']
1365
1366 coco2UserTypes = {1: 2, 2: 4, 3: 1, 6: 5, 8: 6}
1367 cocoUserTypeNames = {1: person,
1368 2: bicycle,
1369 3: car,
1370 4: motorcycle,
1371 6: bus,
1372 7: train,
1373 8: truck}
1365 1374
1366 userType2Num = utils.inverseEnumeration(userTypeNames) 1375 userType2Num = utils.inverseEnumeration(userTypeNames)
1367 1376
1368 class CarClassifier: 1377 class CarClassifier:
1369 def predict(self, hog): 1378 def predict(self, hog):