Skip to content

Commit f38e1d0

Browse files
committed
Removed debugging lines and unwanted lines
1 parent 4b804dc commit f38e1d0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

main.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from imutils.object_detection import non_max_suppression
88

99
subject_label = 1
10-
total_count = 0
11-
subject_one_count = 0
1210
font = cv2.FONT_HERSHEY_SIMPLEX
1311
list_of_videos = []
1412
cascade_path = "face_cascades/haarcascade_profileface.xml"
@@ -112,13 +110,12 @@ def put_label_on_face(frame, faces, labels):
112110
args = vars(ap.parse_args())
113111
path = args["videos"]
114112
for f in os.listdir(path):
115-
list_of_videos = glob.glob(os.path.join(os.path.abspath(path), f) + "/*.mp4")
113+
list_of_videos = glob.glob(os.path.join(os.path.abspath(path), f))
116114
print(os.path.join(os.path.abspath(path), f) + "*.mp4")
117115
print(list_of_videos)
118116
if os.path.exists("model.yaml"):
119117
recognizer.load("model.yaml")
120118
for video in list_of_videos:
121-
print("hello")
122119
camera = cv2.VideoCapture(os.path.join(path, video))
123120
while True:
124121
starttime = time.time()
@@ -133,10 +130,7 @@ def put_label_on_face(frame, faces, labels):
133130
frame_processed = draw_faces(frame_processed, faces)
134131
label = recognize_face(frame_orginal, faces)
135132
frame_processed = put_label_on_face(frame_processed, faces, label)
136-
for i in label:
137-
total_count = total_count + 1
138-
if i == 1:
139-
subject_one_count = subject_one_count + 1
133+
140134
cv2.imshow("window", frame_processed)
141135
key = cv2.waitKey(1) & 0xFF
142136
if key == ord("q"):

0 commit comments

Comments
 (0)