Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
klorydryk
FacialRecoTrackingScore
Commits
87cefec3
Commit
87cefec3
authored
Apr 26, 2021
by
klorydryk
Browse files
Ajout thread sur la création de fenêtre par caméra
parent
7affb342
Changes
1
Hide whitespace changes
Inline
Side-by-side
trackmultiplefaces.py
View file @
87cefec3
...
...
@@ -8,7 +8,7 @@ import cv2
import
dlib
from
colour
import
Color
import
t
hread
ing
from
threading
import
T
hread
import
time
import
random
...
...
@@ -404,7 +404,7 @@ class facetracker:
if
start_thread
:
#Start a new thread that is used to simulate face recognition.
t
=
threading
.
Thread
(
target
=
self
.
doRecognizePerson
,
t
=
Thread
(
target
=
self
.
doRecognizePerson
,
args
=
(
faceNames
,
currentFaceID
))
t
.
start
()
...
...
@@ -626,13 +626,14 @@ class facetracker:
if
__name__
==
'__main__'
:
for
camera_id
in
list_available_cameras
():
camera
=
facetracker
(
camera_id
)
camera
.
detectAndTrackMultipleFaces
(
thread
=
Thread
(
target
=
camera
.
detectAndTrackMultipleFaces
,
args
=
{
# False: Names are directly printed on screen, no new thread
start_thread
=
False
,
'
start_thread
'
:
False
,
# Select only names with letters and whitespace. Any other value will select printable.
charset
=
"letters"
,
'
charset
'
:
"letters"
,
# If True, then rectangle color around people' face will turn red if dangerous
draw_person_dangerosity
=
True
,
'
draw_person_dangerosity
'
:
True
,
# Add a warning message if dangerous
add_warning_message
=
True
)
'add_warning_message'
:
True
,
})
thread
.
start
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment