Skip to content

Commit d75c9a8

Browse files
committed
tpu face detection support
1 parent 954a413 commit d75c9a8

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

mlapiconfig.ini

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ ml_sequence= {
266266
'sequence': [{
267267
#First run on TPU with higher confidence
268268
#'maxsize':320,
269+
'name': 'TPU object detection',
270+
'enabled': 'no',
269271
'object_weights':'{{tpu_object_weights_mobiledet}}',
270272
'object_labels': '{{tpu_object_labels}}',
271273
'object_min_confidence': {{tpu_min_confidence}},
@@ -282,6 +284,8 @@ ml_sequence= {
282284
},
283285
{
284286
# YoloV4 on GPU if TPU fails (because sequence strategy is 'first')
287+
'name': 'CPU/GPU Yolov4 Object Detection',
288+
'enabled': 'yes',
285289
'object_config':'{{yolo4_object_config}}',
286290
'object_weights':'{{yolo4_object_weights}}',
287291
'object_labels': '{{yolo4_object_labels}}',
@@ -302,9 +306,11 @@ ml_sequence= {
302306
'face': {
303307
'general':{
304308
'pattern': '{{face_detection_pattern}}',
305-
'same_model_sequence_strategy': 'first'
309+
'same_model_sequence_strategy': 'union' # combine results below
306310
},
307311
'sequence': [{
312+
'name':'Face Recognition (Dlib)', # optional
313+
'enabled': 'yes', # optional
308314
'save_unknown_faces':'{{save_unknown_faces}}',
309315
'save_unknown_faces_leeway_pixels':{{save_unknown_faces_leeway_pixels}},
310316
'face_detection_framework': '{{face_detection_framework}}',
@@ -320,7 +326,15 @@ ml_sequence= {
320326
'cpu_max_processes': {{cpu_max_processes}},
321327
'cpu_max_lock_wait': {{cpu_max_lock_wait}},
322328
'max_size':800
323-
}]
329+
},
330+
{
331+
'name': 'Face Detection (TPU)',
332+
'enabled': 'no',
333+
'face_detection_framework': 'tpu',
334+
'face_weights':'/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2_face_quant_postprocess_edgetpu.tflite',
335+
'face_min_confidence': 0.3
336+
337+
}]
324338
},
325339

326340
'alpr': {
@@ -331,6 +345,8 @@ ml_sequence= {
331345

332346
},
333347
'sequence': [{
348+
'name': 'Platerecognizer Cloud Service',
349+
'enabled': 'yes',
334350
'alpr_api_type': '{{alpr_api_type}}',
335351
'alpr_service': '{{alpr_service}}',
336352
'alpr_key': '{{alpr_key}}',

modules/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "2.2.11"
1+
__version__ = "2.2.12"
22
VERSION=__version__

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ flask ~= 1.1.2
1111
progressbar33
1212
scikit_learn
1313
face_recognition
14-
pyzm>=0.3.40
14+
pyzm>=0.3.43
1515
portalocker
1616
bjoern

0 commit comments

Comments
 (0)