BilalSardar commited on
Commit
22dd0ae
1 Parent(s): 3169240

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -17,6 +17,7 @@ def faceEncodings(images):
17
  return encodeList
18
 
19
  def Attandance(text,video,image):
 
20
  names=[]
21
  path = text
22
  images = []
@@ -37,6 +38,10 @@ def Attandance(text,video,image):
37
  index=1
38
  while True:
39
  try:
 
 
 
 
40
  ret, frame = cap.read()
41
  #faces = cv2.resize(frame, (0, 0), None, 0.25, 0.25)
42
  faces = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
 
17
  return encodeList
18
 
19
  def Attandance(text,video,image):
20
+ int framecount=0
21
  names=[]
22
  path = text
23
  images = []
 
38
  index=1
39
  while True:
40
  try:
41
+ if framecount>4:
42
+ break
43
+ else:
44
+ framecount=framecount+1
45
  ret, frame = cap.read()
46
  #faces = cv2.resize(frame, (0, 0), None, 0.25, 0.25)
47
  faces = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)