[Bug]: train_face cv2.error #18529
-
Checklist
Describe the problem you are havingOpening an image in the Explore/Person section then pressing the Train Face button results in
Steps to reproduce
Version0.16.0-f141b58 In which browser(s) are you experiencing the issue with?No response Frigate config fileauth:
enabled: true
reset_admin_password: false
mqtt:
enabled: true
host: mqtt.primergy.lan
port: 1883
topic_prefix: frigate
client_id: frigate
user: '{FRIGATE_MQTT_USER}'
password: '{FRIGATE_MQTT_PASSWORD}'
stats_interval: 30
detectors:
coral:
type: edgetpu
device: usb
face_recognition:
enabled: true
unknown_score: 0.8
detection_threshold: 0.7
recognition_threshold: 0.9
min_area: 500
save_attempts: 500
blur_confidence_filter: true
model_size: large
model:
path: plus://xxx
logger:
default: info
ffmpeg:
hwaccel_args: auto
birdseye:
enabled: true
restream: true
width: 1280
height: 720
quality: 10
mode: objects
inactivity_threshold: 15
layout:
scaling_factor: 1
max_cameras: 4
detect:
enabled: true
width: 2688
height: 1512
fps: 10
min_initialized: 5
max_disappeared: 50
stationary:
interval: 10
threshold: 50
max_frames:
objects:
person: 1800
cat: 360
objects:
track:
- person
- face
- car
- cat
- dog
- bicycle
# https://docs.frigate.video/plus/first_model/#step-4-adjust-your-object-filters-for-higher-scores
filters:
person:
min_score: .75
threshold: .85
face:
min_score: .7
car:
min_score: .7
threshold: .8
dog:
min_score: .7
threshold: .8
cat:
min_score: .7
threshold: .8
package:
min_score: .65
threshold: .9
license_plate:
min_score: .7
bicycle:
min_score: .6
threshold: .7
gls:
min_score: .75
dpd:
min_score: .75
dhl:
min_score: .75
waste_bin:
min_score: .7
threshold: .8
review:
alerts:
labels:
- person
- car
- cat
- dog
motion:
threshold: 30
lightning_threshold: 0.7
contour_area: 10
frame_alpha: 0.010
frame_height: 152
improve_contrast: true
mqtt_off_delay: 30
record:
enabled: true
expire_interval: 60
sync_recordings: false
retain:
days: 15
mode: all
alerts:
pre_capture: 5
post_capture: 5
detections:
pre_capture: 5
post_capture: 5
snapshots:
enabled: true
clean_copy: true
timestamp: false
bounding_box: false
crop: false
required_zones: []
retain:
default: 15
objects:
person: 15
go2rtc:
streams:
utcafront_bal:
- rtsp://{FRIGATE_NVR_USER}:{FRIGATE_NVR_PASSWORD}@{FRIGATE_NVR_HOST}:554/cam/realmonitor?channel=4&subtype=0
utcafront_jobb:
- rtsp://{FRIGATE_NVR_USER}:{FRIGATE_NVR_PASSWORD}@{FRIGATE_NVR_HOST}:554/cam/realmonitor?channel=1&subtype=0
elso_bejarat:
- rtsp://{FRIGATE_NVR_USER}:{FRIGATE_NVR_PASSWORD}@{FRIGATE_NVR_HOST}:554/cam/realmonitor?channel=3&subtype=0
hatso_bejarat:
- rtsp://{FRIGATE_NVR_USER}:{FRIGATE_NVR_PASSWORD}@{FRIGATE_NVR_HOST}:554/cam/realmonitor?channel=2&subtype=0
utcafront_bal_sub:
- rtsp://{FRIGATE_NVR_USER}:{FRIGATE_NVR_PASSWORD}@{FRIGATE_NVR_HOST}:554/cam/realmonitor?channel=4&subtype=1
webrtc:
candidates:
- 192.168.88.12:8555
- stun:8555
live:
height: 1080
quality: 12
timestamp_style:
position: tl
format: '%Y-%m-%d %H:%M:%S'
color:
red: 255
green: 255
blue: 255
thickness: 2
effect: solid
cameras:
utcafront_bal:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/utcafront_bal
input_args: preset-rtsp-restream
roles:
- detect
- record
live:
streams:
utcafront_bal: utcafront_bal
snapshots:
enabled: true
required_zones:
- utca
- kapu
- elokert
record:
enabled: true
genai:
enabled: true
use_snapshot: false
objects:
- person
required_zones:
- kapu
- elokert
best_image_timeout: 15
motion:
threshold: 30
lightning_threshold: 0.7
contour_area: 10
improve_contrast: true
mask: 0.849,0.036,1,0.039,1,0.076,0.849,0.071
objects:
track:
- person
- face
- car
- license_plate
- bicycle
- cat
- dog
- waste_bin
- gls
- dpd
- dhl
filters:
cat:
min_score: 0.8
threshold: 0.9
zones:
utca:
coordinates:
0.681,0.17,0.472,0.143,0.436,0.171,0.661,0.196,0.645,0.235,0.796,0.266,0.913,0.303,1,0.339,1,0.272,0.924,0.24,0.806,0.202
inertia: 3
loitering_time: 15
objects:
- person
- face
- car
- license_plate
- waste_bin
kapu:
coordinates: 0.386,0.233,0.628,0.264,0.66,0.196,0.436,0.171
inertia: 3
loitering_time: 2
objects:
- person
- face
- car
- license_plate
elokert:
coordinates:
0.386,0.233,0.628,0.264,0.853,0.321,1,0.38,1,1,0,1,0,0.707,0.127,0.519,0.258,0.352
inertia: 3
loitering_time: 0
mqtt:
enabled: true
timestamp: false
bounding_box: false
crop: true
height: 1520
quality: 90
required_zones:
- kapu
- elokert
birdseye:
order: 0
mode: continuous
review:
alerts:
required_zones:
- utca
- kapu
- elokert
detections:
required_zones:
- utca
- kapu
- elokert
ui:
order: 2
dashboard: true
detect:
annotation_offset: -850
utcafront_jobb:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/utcafront_jobb
input_args: preset-rtsp-restream
roles:
- detect
- record
live:
streams:
utcafront_jobb: utcafront_jobb
snapshots:
enabled: true
record:
enabled: true
genai:
enabled: false
use_snapshot: true
objects:
- person
required_zones:
- kert
best_image_timeout: 15
motion:
threshold: 40
contour_area: 10
improve_contrast: true
mask:
- 0.492,0,0.495,0.238,0.739,0.563,0.881,0.57,1,0.499,1,0
- 0,0.168,0.021,0.128,0.066,0.166,0.067,0.32,0,0.329
objects:
track:
- person
- face
- car
- license_plate
- cat
- dog
zones:
kert:
coordinates: 0,0.329,0.304,0.289,0.587,0.31,0.999,0.5,1,1,0,1
inertia: 3
loitering_time: 0
objects:
- person
- face
- cat
- dog
mqtt:
enabled: true
timestamp: false
bounding_box: false
crop: true
height: 1520
birdseye:
order: 1
mode: objects
ui:
order: 3
dashboard: true
review:
alerts:
required_zones: kert
detections:
required_zones: kert
elso_bejarat:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/elso_bejarat
input_args: preset-rtsp-restream
roles:
- record
- detect
live:
streams:
elso_bejarat: elso_bejarat
snapshots:
enabled: true
required_zones:
- udvar
record:
enabled: true
genai:
enabled: false
use_snapshot: true
objects:
- person
required_zones:
- udvar
best_image_timeout: 15
motion:
mask: 0,0,0,0.854,0.277,0.548,0.618,0.238,0.606,0.057,1,0.053,1,0
threshold: 25
contour_area: 10
improve_contrast: true
zones:
udvar:
coordinates: 0,1,0.308,0.625,0.697,0.2,0.908,0.197,0.921,0.558,1,0.565,1,1
inertia: 3
loitering_time: 0
objects:
- person
- face
- cat
- dog
mqtt:
enabled: true
timestamp: false
bounding_box: false
crop: true
height: 1520
required_zones:
- udvar
birdseye:
order: 2
mode: objects
review:
alerts:
required_zones: udvar
detections:
required_zones: udvar
ui:
order: 1
dashboard: true
hatso_bejarat:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/hatso_bejarat
input_args: preset-rtsp-restream
roles:
- record
- detect
live:
streams:
hatso_bejarat: hatso_bejarat
snapshots:
enabled: true
crop: true
required_zones:
- hatso_kert
record:
enabled: true
genai:
enabled: false
use_snapshot: true
objects:
- person
required_zones:
- hatso_kert
best_image_timeout: 15
motion:
mask: 0.172,0,0,0,0,0.07,0.172,0.071
threshold: 40
lightning_threshold: 0.8
contour_area: 10
improve_contrast: true
zones:
hatso_kert:
coordinates:
0,1,0,0,0.488,0.035,0.706,0.082,0.853,0.159,1,0.252,1,1,0.852,1,0.874,0.915,0.681,0.817,0.577,1
inertia: 3
objects:
- person
- face
- car
- dog
- cat
- bicycle
loitering_time: 1
Hatso_bejarati_ajto:
coordinates: 0.874,0.915,0.681,0.817,0.577,1,0.852,1
loitering_time: 0
objects:
- person
- dog
- cat
inertia: 3
mqtt:
enabled: true
timestamp: false
bounding_box: false
crop: true
height: 1520
quality: 90
required_zones:
- hatso_kert
birdseye:
order: 3
mode: objects
review:
alerts:
required_zones: hatso_kert
detections:
required_zones: hatso_kert
ui:
order: 0
dashboard: true
ui:
timezone: Europe/Budapest
time_format: browser
date_style: short
time_style: medium
strftime_fmt: '%Y-%m-%d %H:%M'
telemetry:
version_check: true
stats:
amd_gpu_stats: true
intel_gpu_stats: true
network_bandwidth: false
camera_groups:
Minden_kamera:
order: 1
icon: LuCamera
cameras:
- elso_bejarat
- hatso_bejarat
- utcafront_bal
- utcafront_jobb
birdseye:
order: 2
icon: LuBird
cameras: birdseye
version: 0.16-0
semantic_search:
enabled: false
reindex: false
model_size: small
lpr:
enabled: false
classification:
bird:
enabled: false docker-compose file or Docker CLI commandservices:
frigate:
container_name: frigate
network_mode: bridge
# privileged: true # this may not be necessary for all setups
restart: unless-stopped
# image: ghcr.io/blakeblackshear/frigate:stable
image: ghcr.io/blakeblackshear/frigate:0.16.0-beta3-tensorrt
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu, utility, video, compute]
shm_size: "768mb"
devices:
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
volumes:
- /etc/localtime:/etc/localtime:ro
- /docker/frigate:/config
- /data/frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "1984:1984" # go2rtc
- "8971:8971"
- "5000:5000"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
PLUS_API_KEY: ${FRIGATE_PLUS_API_KEY}
FRIGATE_RTSP_PASSWORD: ${FRIGATE_RTSP_PASSWORD}
FRIGATE_NVR_HOST: ${FRIGATE_NVR_HOST}
FRIGATE_NVR_USER: ${FRIGATE_NVR_USER}
FRIGATE_NVR_PASSWORD: ${FRIGATE_NVR_PASSWORD}
FRIGATE_MQTT_USER: ${FRIGATE_MQTT_USER}
FRIGATE_MQTT_PASSWORD: ${FRIGATE_MQTT_PASSWORD}
cap_add:
- SYS_ADMIN
labels:
criticality: low Relevant Frigate log output2025-06-02 14:16:04.185614270 [ WARN:[email protected]] global cap.cpp:175 open VIDEOIO(CV_IMAGES): raised OpenCV exception:
2025-06-02 14:16:04.185617585
2025-06-02 14:16:04.185619820 OpenCV(4.11.0) /io/opencv/modules/videoio/src/cap_images.cpp:267: error: (-215:Assertion failed) number < max_number in function 'icvExtractPattern'
2025-06-02 14:16:04.185620916
2025-06-02 14:16:04.185621883
2025-06-02 14:16:04.217325731 [2025-06-02 14:16:04] frigate.record.maintainer WARNING : Failed to probe corrupt segment /tmp/cache/utcafront_bal@20250602141502+0200.mp4
2025-06-02 14:16:04.217329815 [2025-06-02 14:16:04] frigate.record.maintainer WARNING : Discarding a corrupt recording segment: /tmp/cache/utcafront_bal@20250602141502+0200.mp4
2025-06-02 14:16:04.520713000 ERROR: Exception in ASGI application
2025-06-02 14:16:04.520716549 + Exception Group Traceback (most recent call last):
2025-06-02 14:16:04.520718357 | File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 76, in collapse_excgroups
2025-06-02 14:16:04.520719422 | yield
2025-06-02 14:16:04.520721062 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 186, in __call__
2025-06-02 14:16:04.520722419 | async with anyio.create_task_group() as task_group:
2025-06-02 14:16:04.520723984 | File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 772, in __aexit__
2025-06-02 14:16:04.520725086 | raise BaseExceptionGroup(
2025-06-02 14:16:04.520726422 | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
2025-06-02 14:16:04.520727599 +-+---------------- 1 ----------------
2025-06-02 14:16:04.520728796 | Traceback (most recent call last):
2025-06-02 14:16:04.520730433 | File "/usr/local/lib/python3.11/dist-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
2025-06-02 14:16:04.520731744 | result = await app( # type: ignore[func-returns-value]
2025-06-02 14:16:04.520733079 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.520734876 | File "/usr/local/lib/python3.11/dist-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
2025-06-02 14:16:04.520737085 | return await self.app(scope, receive, send)
2025-06-02 14:16:04.520738296 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.520739878 | File "/usr/local/lib/python3.11/dist-packages/fastapi/applications.py", line 1054, in __call__
2025-06-02 14:16:04.520776750 | await super().__call__(scope, receive, send)
2025-06-02 14:16:04.520778577 | File "/usr/local/lib/python3.11/dist-packages/starlette/applications.py", line 113, in __call__
2025-06-02 14:16:04.520779891 | await self.middleware_stack(scope, receive, send)
2025-06-02 14:16:04.520781668 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/errors.py", line 187, in __call__
2025-06-02 14:16:04.520782685 | raise exc
2025-06-02 14:16:04.520784288 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/errors.py", line 165, in __call__
2025-06-02 14:16:04.520805861 | await self.app(scope, receive, _send)
2025-06-02 14:16:04.520807649 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-06-02 14:16:04.520808788 | with collapse_excgroups():
2025-06-02 14:16:04.520810149 | File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-06-02 14:16:04.520811555 | self.gen.throw(typ, value, traceback)
2025-06-02 14:16:04.520813195 | File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-06-02 14:16:04.520814232 | raise exc
2025-06-02 14:16:04.520815860 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-06-02 14:16:04.520817266 | response = await self.dispatch_func(request, call_next)
2025-06-02 14:16:04.520818628 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.520820167 | File "/usr/local/lib/python3.11/dist-packages/slowapi/middleware.py", line 124, in dispatch
2025-06-02 14:16:04.520821335 | return await call_next(request)
2025-06-02 14:16:04.520822505 | ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.520844986 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-06-02 14:16:04.520846121 | raise app_exc
2025-06-02 14:16:04.520847683 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-06-02 14:16:04.520849062 | await self.app(scope, receive_or_disconnect, send_no_error)
2025-06-02 14:16:04.520850675 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-06-02 14:16:04.520851963 | with collapse_excgroups():
2025-06-02 14:16:04.520853339 | File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-06-02 14:16:04.520854533 | self.gen.throw(typ, value, traceback)
2025-06-02 14:16:04.520856169 | File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-06-02 14:16:04.520857186 | raise exc
2025-06-02 14:16:04.520858785 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-06-02 14:16:04.520882166 | response = await self.dispatch_func(request, call_next)
2025-06-02 14:16:04.520883637 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.520885109 | File "/opt/frigate/frigate/api/fastapi_app.py", line 89, in frigate_middleware
2025-06-02 14:16:04.520886299 | response = await call_next(request)
2025-06-02 14:16:04.520887474 | ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.520889086 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-06-02 14:16:04.520890168 | raise app_exc
2025-06-02 14:16:04.520891965 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-06-02 14:16:04.520893323 | await self.app(scope, receive_or_disconnect, send_no_error)
2025-06-02 14:16:04.520894943 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-06-02 14:16:04.520896092 | with collapse_excgroups():
2025-06-02 14:16:04.520897502 | File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-06-02 14:16:04.520898695 | self.gen.throw(typ, value, traceback)
2025-06-02 14:16:04.520900262 | File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-06-02 14:16:04.520901371 | raise exc
2025-06-02 14:16:04.520902925 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-06-02 14:16:04.520904268 | response = await self.dispatch_func(request, call_next)
2025-06-02 14:16:04.520905603 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.520907351 | File "/usr/local/lib/python3.11/dist-packages/starlette_context/middleware/context_middleware.py", line 78, in dispatch
2025-06-02 14:16:04.520908517 | response = await call_next(request)
2025-06-02 14:16:04.520909699 | ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.520911260 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-06-02 14:16:04.520912336 | raise app_exc
2025-06-02 14:16:04.520913881 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-06-02 14:16:04.520915206 | await self.app(scope, receive_or_disconnect, send_no_error)
2025-06-02 14:16:04.520916865 | File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
2025-06-02 14:16:04.520918326 | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2025-06-02 14:16:04.520919993 | File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-06-02 14:16:04.520921010 | raise exc
2025-06-02 14:16:04.520922688 | File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-06-02 14:16:04.520923876 | await app(scope, receive, sender)
2025-06-02 14:16:04.520952256 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 715, in __call__
2025-06-02 14:16:04.520953667 | await self.middleware_stack(scope, receive, send)
2025-06-02 14:16:04.520955196 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 735, in app
2025-06-02 14:16:04.520956424 | await route.handle(scope, receive, send)
2025-06-02 14:16:04.520971311 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 288, in handle
2025-06-02 14:16:04.520972507 | await self.app(scope, receive, send)
2025-06-02 14:16:04.520974006 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 76, in app
2025-06-02 14:16:04.520975434 | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2025-06-02 14:16:04.520977049 | File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-06-02 14:16:04.520978064 | raise exc
2025-06-02 14:16:04.521005963 | File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-06-02 14:16:04.521007281 | await app(scope, receive, sender)
2025-06-02 14:16:04.521008795 | File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 73, in app
2025-06-02 14:16:04.521009943 | response = await f(request)
2025-06-02 14:16:04.521011049 | ^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521012587 | File "/usr/local/lib/python3.11/dist-packages/fastapi/routing.py", line 301, in app
2025-06-02 14:16:04.521013830 | raw_response = await run_endpoint_function(
2025-06-02 14:16:04.521015044 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521016701 | File "/usr/local/lib/python3.11/dist-packages/fastapi/routing.py", line 214, in run_endpoint_function
2025-06-02 14:16:04.521018020 | return await run_in_threadpool(dependant.call, **values)
2025-06-02 14:16:04.521019353 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521020993 | File "/usr/local/lib/python3.11/dist-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2025-06-02 14:16:04.521050135 | return await anyio.to_thread.run_sync(func, *args)
2025-06-02 14:16:04.521051624 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521053107 | File "/usr/local/lib/python3.11/dist-packages/anyio/to_thread.py", line 56, in run_sync
2025-06-02 14:16:04.521054452 | return await get_async_backend().run_sync_in_worker_thread(
2025-06-02 14:16:04.521055831 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521057530 | File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
2025-06-02 14:16:04.521058616 | return await future
2025-06-02 14:16:04.521059644 | ^^^^^^^^^^^^
2025-06-02 14:16:04.521061170 | File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 967, in run
2025-06-02 14:16:04.521062322 | result = context.run(func, *args)
2025-06-02 14:16:04.521063478 | ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521064893 | File "/opt/frigate/frigate/api/classification.py", line 157, in train_face
2025-06-02 14:16:04.521066246 | cv2.imwrite(os.path.join(new_file_folder, new_name), face)
2025-06-02 14:16:04.521159262 | cv2.error: OpenCV(4.11.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:929: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'
2025-06-02 14:16:04.521160544 |
2025-06-02 14:16:04.521161747 +------------------------------------
2025-06-02 14:16:04.521162676
2025-06-02 14:16:04.521164054 During handling of the above exception, another exception occurred:
2025-06-02 14:16:04.521164984
2025-06-02 14:16:04.521166140 Traceback (most recent call last):
2025-06-02 14:16:04.521167750 File "/usr/local/lib/python3.11/dist-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
2025-06-02 14:16:04.521169026 result = await app( # type: ignore[func-returns-value]
2025-06-02 14:16:04.521170320 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521171926 File "/usr/local/lib/python3.11/dist-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
2025-06-02 14:16:04.521173122 return await self.app(scope, receive, send)
2025-06-02 14:16:04.521174321 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521175887 File "/usr/local/lib/python3.11/dist-packages/fastapi/applications.py", line 1054, in __call__
2025-06-02 14:16:04.521177067 await super().__call__(scope, receive, send)
2025-06-02 14:16:04.521178661 File "/usr/local/lib/python3.11/dist-packages/starlette/applications.py", line 113, in __call__
2025-06-02 14:16:04.521179906 await self.middleware_stack(scope, receive, send)
2025-06-02 14:16:04.521181571 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/errors.py", line 187, in __call__
2025-06-02 14:16:04.521182578 raise exc
2025-06-02 14:16:04.521184171 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/errors.py", line 165, in __call__
2025-06-02 14:16:04.521185339 await self.app(scope, receive, _send)
2025-06-02 14:16:04.521186890 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-06-02 14:16:04.521187955 with collapse_excgroups():
2025-06-02 14:16:04.521189224 File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-06-02 14:16:04.521190355 self.gen.throw(typ, value, traceback)
2025-06-02 14:16:04.521191897 File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-06-02 14:16:04.521192854 raise exc
2025-06-02 14:16:04.521194364 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-06-02 14:16:04.521195610 response = await self.dispatch_func(request, call_next)
2025-06-02 14:16:04.521196885 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521198444 File "/usr/local/lib/python3.11/dist-packages/slowapi/middleware.py", line 124, in dispatch
2025-06-02 14:16:04.521199558 return await call_next(request)
2025-06-02 14:16:04.521200685 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521202269 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-06-02 14:16:04.521203278 raise app_exc
2025-06-02 14:16:04.521204811 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-06-02 14:16:04.521206081 await self.app(scope, receive_or_disconnect, send_no_error)
2025-06-02 14:16:04.521207680 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-06-02 14:16:04.521208776 with collapse_excgroups():
2025-06-02 14:16:04.521210072 File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-06-02 14:16:04.521211212 self.gen.throw(typ, value, traceback)
2025-06-02 14:16:04.521212775 File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-06-02 14:16:04.521213766 raise exc
2025-06-02 14:16:04.521215259 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-06-02 14:16:04.521216516 response = await self.dispatch_func(request, call_next)
2025-06-02 14:16:04.521217775 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521219197 File "/opt/frigate/frigate/api/fastapi_app.py", line 89, in frigate_middleware
2025-06-02 14:16:04.521220356 response = await call_next(request)
2025-06-02 14:16:04.521221524 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521223097 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-06-02 14:16:04.521224066 raise app_exc
2025-06-02 14:16:04.521225582 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-06-02 14:16:04.521226883 await self.app(scope, receive_or_disconnect, send_no_error)
2025-06-02 14:16:04.521228386 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 185, in __call__
2025-06-02 14:16:04.521229483 with collapse_excgroups():
2025-06-02 14:16:04.521230790 File "/usr/lib/python3.11/contextlib.py", line 155, in __exit__
2025-06-02 14:16:04.521231962 self.gen.throw(typ, value, traceback)
2025-06-02 14:16:04.521233558 File "/usr/local/lib/python3.11/dist-packages/starlette/_utils.py", line 82, in collapse_excgroups
2025-06-02 14:16:04.521234525 raise exc
2025-06-02 14:16:04.521236095 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 187, in __call__
2025-06-02 14:16:04.521237357 response = await self.dispatch_func(request, call_next)
2025-06-02 14:16:04.521238636 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521240281 File "/usr/local/lib/python3.11/dist-packages/starlette_context/middleware/context_middleware.py", line 78, in dispatch
2025-06-02 14:16:04.521241395 response = await call_next(request)
2025-06-02 14:16:04.521242543 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521244123 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 163, in call_next
2025-06-02 14:16:04.521245109 raise app_exc
2025-06-02 14:16:04.521246653 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/base.py", line 149, in coro
2025-06-02 14:16:04.521247977 await self.app(scope, receive_or_disconnect, send_no_error)
2025-06-02 14:16:04.521249563 File "/usr/local/lib/python3.11/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__
2025-06-02 14:16:04.521250906 await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
2025-06-02 14:16:04.521252427 File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-06-02 14:16:04.521253383 raise exc
2025-06-02 14:16:04.521255006 File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-06-02 14:16:04.521256116 await app(scope, receive, sender)
2025-06-02 14:16:04.521257602 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 715, in __call__
2025-06-02 14:16:04.521258802 await self.middleware_stack(scope, receive, send)
2025-06-02 14:16:04.521260289 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 735, in app
2025-06-02 14:16:04.521261470 await route.handle(scope, receive, send)
2025-06-02 14:16:04.521262977 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 288, in handle
2025-06-02 14:16:04.521264119 await self.app(scope, receive, send)
2025-06-02 14:16:04.521265582 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 76, in app
2025-06-02 14:16:04.521266979 await wrap_app_handling_exceptions(app, request)(scope, receive, send)
2025-06-02 14:16:04.521268569 File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
2025-06-02 14:16:04.521269541 raise exc
2025-06-02 14:16:04.521271121 File "/usr/local/lib/python3.11/dist-packages/starlette/_exception_handler.py", line 42, in wrapped_app
2025-06-02 14:16:04.521272236 await app(scope, receive, sender)
2025-06-02 14:16:04.521273722 File "/usr/local/lib/python3.11/dist-packages/starlette/routing.py", line 73, in app
2025-06-02 14:16:04.521274812 response = await f(request)
2025-06-02 14:16:04.521275880 ^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521277318 File "/usr/local/lib/python3.11/dist-packages/fastapi/routing.py", line 301, in app
2025-06-02 14:16:04.521278486 raw_response = await run_endpoint_function(
2025-06-02 14:16:04.521279623 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521281166 File "/usr/local/lib/python3.11/dist-packages/fastapi/routing.py", line 214, in run_endpoint_function
2025-06-02 14:16:04.521282442 return await run_in_threadpool(dependant.call, **values)
2025-06-02 14:16:04.521283707 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521285298 File "/usr/local/lib/python3.11/dist-packages/starlette/concurrency.py", line 39, in run_in_threadpool
2025-06-02 14:16:04.521286550 return await anyio.to_thread.run_sync(func, *args)
2025-06-02 14:16:04.521287811 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521289300 File "/usr/local/lib/python3.11/dist-packages/anyio/to_thread.py", line 56, in run_sync
2025-06-02 14:16:04.521290591 return await get_async_backend().run_sync_in_worker_thread(
2025-06-02 14:16:04.521291896 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521293588 File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
2025-06-02 14:16:04.521294612 return await future
2025-06-02 14:16:04.521295634 ^^^^^^^^^^^^
2025-06-02 14:16:04.521297132 File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 967, in run
2025-06-02 14:16:04.521298228 result = context.run(func, *args)
2025-06-02 14:16:04.521299346 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-02 14:16:04.521309794 File "/opt/frigate/frigate/api/classification.py", line 157, in train_face
2025-06-02 14:16:04.521311177 cv2.imwrite(os.path.join(new_file_folder, new_name), face)
2025-06-02 14:16:04.521313046 cv2.error: OpenCV(4.11.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:929: error: (-215:Assertion failed) !_img.empty() in function 'imwrite' Relevant go2rtc log output2025-06-02 14:14:19.278396257 [INFO] Preparing new go2rtc config...
2025-06-02 14:14:19.737707579 [INFO] Starting go2rtc...
2025-06-02 14:14:19.837253570 14:14:19.837 INF go2rtc platform=linux/amd64 revision=fa580c5 version=1.9.9
2025-06-02 14:14:19.837269519 14:14:19.837 INF config path=/dev/shm/go2rtc.yaml
2025-06-02 14:14:19.838039280 14:14:19.837 INF [api] listen addr=:1984
2025-06-02 14:14:19.838041475 14:14:19.837 INF [rtsp] listen addr=:8554
2025-06-02 14:14:19.838539075 14:14:19.838 INF [webrtc] listen addr=:8555
2025-06-02 14:14:28.662606503 [INFO] Starting go2rtc healthcheck service... Operating systemDebian Install methodDocker Compose Network connectionWired Camera make and modelDahua Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulThe snapshots has face clearly visible, about 1-1.5 m away from the camera. Some snapshots don't produce this error while some do. Retrying to train, restarting Frigate then retrying doesn't solve the issue. |
Beta Was this translation helpful? Give feedback.
Answered by
NickM-27
Jun 2, 2025
Replies: 1 comment
-
Thanks! This will be fixed in the next beta |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
NickM-27
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! This will be fixed in the next beta