stream stock photo

This commit is contained in:
Şefik Serangil 2020-03-31 21:42:18 +03:00
parent e38c251051
commit bae9fb123d
3 changed files with 7 additions and 0 deletions

View File

@ -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
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB