Skip to content

Commit a64c6a3

Browse files
committed
feat: optimize ArducamCamera configuration and enhance performance settings in FacialRecognition
1 parent dcb15a4 commit a64c6a3

4 files changed

+3
-4
lines changed
179 Bytes
Binary file not shown.

camera/arducam_camera.py

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def initialize(self):
2020
config = self.camera.create_preview_configuration(
2121
main={"format": "RGB888", "size": (1280, 720)}
2222
)
23-
config = self.camera.create_preview_configuration(main={"size": (1280, 720)})
2423
self.camera.configure(config)
2524
self.camera.start()
2625

enhanced_liveness_detector.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def __init__(self,
1212
blink_threshold: float = 0.3,
1313
blink_consec_frames: int = 3,
1414
movement_threshold: float = 1.5,
15-
texture_threshold: float = 30):
15+
texture_threshold: float = 25):
1616
"""
1717
Enhanced liveness detector with multiple anti-spoofing techniques.
1818
"""

facial_recognition.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ def __init__(self, known_faces_dir="known_faces", use_camera=True, input_image=N
2727
signal.signal(signal.SIGTERM, self._signal_handler)
2828

2929
# Performance settings
30-
self.process_every_n_frames = 2 # Process every other frame
30+
self.process_every_n_frames = 1 # Process every frame
3131
self.frame_count = 0
3232
self.recognition_threshold = 0.6
33-
self.target_fps = 10
33+
self.target_fps = 30
3434
self.frame_time = 1.0 / self.target_fps
3535

3636
# Challenge tracking

0 commit comments

Comments
 (0)