-
Notifications
You must be signed in to change notification settings - Fork 27
Description
In the SecuritySystem class, when YOLOv5 detects any accessories (e.g., mask, sunglasses, cap, scarf, etc.), the system displays a warning message and plays a voice alert, but the 10-second face recognition countdown timer is not reset.
As a result, when the person removes the accessory, the countdown resumes from where it left off instead of starting fresh.
This can cause incorrect scan completions or false security triggers.
Approach: Reset the timer and start it from the beginning once a face covering is detected.
Code snippet to be modified:
In the get_frame module:
accessories = self.detect_accessories(frame)
if accessories:
self.current_status = f"⚠️ Please remove: {', '.join(accessories).title()}"
speak_event("remove_accessory", f"Please remove: {', '.join(accessories)}")
self.status_color = '#ff0000'
return frame