mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
stream stock photo
This commit is contained in:
parent
e38c251051
commit
bae9fb123d
@ -127,6 +127,7 @@ def analysis(db_path, model_name, distance_metric, enable_face_analysis = True):
|
||||
tic = time.time()
|
||||
|
||||
cap = cv2.VideoCapture(0) #webcam
|
||||
#cap = cv2.VideoCapture("C:/Users/IS96273/Desktop/skype-video-1.mp4") #video
|
||||
|
||||
while(True):
|
||||
ret, img = cap.read()
|
||||
@ -363,6 +364,7 @@ def analysis(db_path, model_name, distance_metric, enable_face_analysis = True):
|
||||
display_img = cv2.resize(display_img, (pivot_img_size, pivot_img_size))
|
||||
|
||||
label = employee_name.replace("_", "").replace(".jpg", "")+" ("+"{0:.2f}".format(best_distance)+")"
|
||||
#label = employee_name.replace("_", "").replace(".jpg", "")
|
||||
|
||||
try:
|
||||
if y - pivot_img_size > 0 and x + w + pivot_img_size < resolution_x:
|
||||
|
5
deepface/stream.py
Normal file
5
deepface/stream.py
Normal file
@ -0,0 +1,5 @@
|
||||
#from deepface import DeepFace
|
||||
|
||||
import DeepFace
|
||||
|
||||
DeepFace.stream("C:/Users/IS96273/Desktop/database")
|
BIN
icon/deepface-stream.jpg
Normal file
BIN
icon/deepface-stream.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 151 KiB |
Loading…
x
Reference in New Issue
Block a user