[Bug]: Face detection with negative score : Unable to handle embeddings request too many values to unpack #20456
-
Checklist
Describe the problem you are havingReprocess a face fails with "Unable to handle embeddings request too many values to unpack" Happens mostly with new faces or with a new installation. The names in clips/faces/train are wrongly named with double dash: The split fails because there is 6 instead of 5 values https://github.com/blakeblackshear/frigate/blob/v0.16.1/frigate/data_processing/real_time/face.py#L402 The problem is most likely because write_face_attempt get a negative score Steps to reproduce
Version0.16.1 In which browser(s) are you experiencing the issue with?Chromium 140.0.7339.127 Frigate config fileauth:
enabled: true
cameras:
doorbell:
detect:
enabled: true
height: 1920
width: 2560
fps: 5
ffmpeg:
inputs:
- input_args: preset-rtsp-restream-low-latency
path: rtsp://127.0.0.1:8554/doorbell
roles:
- record
- detect
live:
streams:
doorbell: doorbell
motion:
contour_area: 10
improve_contrast: true
mask: 0,0,0,0.25,0.455,0.474,0.611,0.515,0.653,0.512,1,0.497,1,0
threshold: 25
snapshots:
bounding_box: true
enabled: true
retain:
default: 3
objects:
person: 7
timestamp: true
detectors:
coral0:
device: pci:0
type: edgetpu
coral1:
device: pci:1
type: edgetpu
face_recognition:
enabled: true
model_size: large
ffmpeg:
hwaccel_args: preset-intel-qsv-h264
model:
path: plus://
mqtt:
enabled: false
objects:
filters:
car:
min_score: 0.65
threshold: 0.85
cat:
min_score: 0.65
threshold: 0.8
dog:
min_score: 0.7
threshold: 0.9
face:
min_score: 0.5
threshold: 0.7
package:
min_score: 0.65
threshold: 0.9
person:
min_score: 0.65
threshold: 0.85
track:
- person
- face
- dog
- cat
- fox
- badger
- car
- deer
- bird
- package
#- waste_bin
- hedgehog
- bus
- tractor
record:
alerts:
post_capture: 10
pre_capture: 5
retain:
days: 30
mode: active_objects
detections:
post_capture: 10
pre_capture: 5
retain:
days: 30
mode: active_objects
enabled: true
retain:
days: 5
mode: motion
detect:
enabled: true
go2rtc:
streams:
doorbell:
- rtsp://user:passowrd@ip/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif#backchannel=0
version: 0.16-0docker-compose file or Docker CLI commandpodman systemdRelevant Frigate log outputOct 13 09:45:39 SERVER-01 frigate[578642]: 2025-10-13 09:45:39.071764288 10.125.0.134 - - [13/Oct/2025:09:45:39 +0200] "POST /api/faces/reprocess HTTP/1.1" 200 2 "https://10.125.0.12:8971/faces" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
Oct 13 09:45:39 SERVER-01 frigate[578642]: 2025-10-13 09:45:39.092857443 10.125.0.134 - - [13/Oct/2025:09:45:39 +0200] "GET /api/faces HTTP/1.1" 200 5897 "https://10.125.0.12:8971/faces" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056737112 [2025-10-13 09:45:41] frigate.embeddings.maintainer ERROR : Unable to handle embeddings request too many values to unpack (expected 5)
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056742944 Traceback (most recent call last):
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056745949 File "/opt/frigate/frigate/embeddings/maintainer.py", line 222, in _handle_request
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056748197 resp = processor.handle_request(topic, data)
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056750148 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056752501 File "/opt/frigate/frigate/data_processing/real_time/face.py", line 402, in handle_request
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056754563 (id_time, id_rand, timestamp, _, _) = current_file.split("-")
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056756265 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 13 09:45:41 SERVER-01 frigate[578642]: 2025-10-13 09:45:41.056758202 ValueError: too many values to unpack (expected 5)Relevant go2rtc log output-Operating systemOther Linux Install methodDocker CLI Network connectionWired Camera make and modelAmcrest AD410 Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
The issue you're experiencing appears to be related to how Frigate handles face recognition file naming when faces receive negative scores. Based on the error message and the file naming pattern you've shown, this is a bug where the face recognition system is creating filenames with additional dashes that break the expected parsing format. The face recognition system expects face files to follow a specific naming convention for processing (1). When the system encounters faces with negative scores, it appears to be generating filenames that don't conform to the expected 5-part format (separated by dashes), causing the "too many values to unpack" error during reprocessing. For face recognition to work properly, you need to ensure that To troubleshoot this issue:
face_recognition:
enabled: true
model_size: large
The face recognition system is designed to save face recognition attempts for training purposes, with a default of 100 saved attempts (1). If the file naming is corrupted due to negative scores, this can prevent proper reprocessing of faces. This appears to be a software bug that should be reported to the Frigate development team, as the face recognition system should handle negative scores gracefully without breaking the file naming convention. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, I believe this has already been fixed for 0.17 |
Beta Was this translation helpful? Give feedback.
-
|
Are you sure @NickM-27 ? |
Beta Was this translation helpful? Give feedback.

looks like I never pushed that fix up, will be fixed in the latest PR