Spaces:
Running
Running
Commit
·
b1a3048
1
Parent(s):
a50c577
Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,10 @@ def faceEncodings(images):
|
|
17 |
return encodeList
|
18 |
|
19 |
def Attandance(text,video,image):
|
|
|
|
|
|
|
|
|
20 |
framecount=0
|
21 |
names=[]
|
22 |
path = text
|
@@ -38,7 +42,10 @@ def Attandance(text,video,image):
|
|
38 |
index=1
|
39 |
while True:
|
40 |
try:
|
41 |
-
|
|
|
|
|
|
|
42 |
pass
|
43 |
else:
|
44 |
framecount=framecount+1
|
|
|
17 |
return encodeList
|
18 |
|
19 |
def Attandance(text,video,image):
|
20 |
+
data=cv2.VideoCapture(video)
|
21 |
+
totalframescount = data.get(cv2.CAP_PROP_FRAME_COUNT)
|
22 |
+
fps = data.get(cv2.CAP_PROP_FPS)
|
23 |
+
seconds = round(totalframescount / fps)
|
24 |
framecount=0
|
25 |
names=[]
|
26 |
path = text
|
|
|
42 |
index=1
|
43 |
while True:
|
44 |
try:
|
45 |
+
|
46 |
+
if framecount>totalframescount:
|
47 |
+
break
|
48 |
+
elif framecount%20==0:
|
49 |
pass
|
50 |
else:
|
51 |
framecount=framecount+1
|