Skip to content

Commit 2f7d8b0

Browse files
committed
Fixed a possible division by zero.
1 parent 400e12f commit 2f7d8b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def __init__(self, width, height, model_type=3, detection_threshold=0.6, thresho
531531

532532
# Multiple faces with single threads
533533
self.sessions = []
534-
self.max_workers = min(max_threads, max_faces)
534+
self.max_workers = max(min(max_threads, max_faces), 1)
535535
extra_threads = max_threads % self.max_workers
536536
for i in range(self.max_workers):
537537
options = onnxruntime.SessionOptions()

0 commit comments

Comments
 (0)