Migration from 0.13 to 0.14-beta2 configuration error due to mask outside detection resolution #11928
-
Describe the problem you are havingWhile migrating to 0.14.0-beta2 from 0.13.2, it seems the masks were not correctly migrated, resulting in configuration errors and a rebooting container. Steps to reproduceHappens regardless of cleared database or not, so just paste the config and start the container i guess Version0.14.0-beta2 Frigate config filemqtt:
host: homeassistant_local.cnf.dk
user: user
password: passwd
birdseye:
enabled: True
mode: continuous
database:
path: /opt/database/database.db
logger:
default: info
rtmp:
enabled: False
detectors:
ov:
type: openvino
device: GPU
model:
path: /openvino-model/ssdlite_mobilenet_v2.xml
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
go2rtc:
streams:
chicks_outdoor:
- rtsp:https://surveillance:{FRIGATE_RTSP_PASS}@10.12.0.5:554/Streaming/Channels/101/
cameras:
chicks_outdoor:
ffmpeg:
hwaccel_args: preset-intel-qsv-h264
inputs:
- path: rtsp:https://127.0.0.1:8554/chicks_outdoor
roles:
- record
- path: rtsp:https://surveillance:{FRIGATE_RTSP_PASS}@10.12.0.5:554/Streaming/Channels/102/
roles:
- detect
detect:
enabled: True
zones:
chicken_floor:
coordinates: 960,232,1108,625,925,720,189,720,169,441,190,235,232,37,694,135
motion:
mask:
- 0,0,1280,0,1280,720,934,720,1104,644,969,237,700,130,238,31,210,111,173,343,168,720,0,720
- 829,213,828,344,542,322,537,178
- 692,233,777,87,711,59,574,170
- 833,282,951,118,910,87,742,228
objects:
track:
- person
- horse
- cat
- dog
- mouse
record:
enabled: True
retain:
days: 7
snapshots:
enabled: False Relevant log outputfrigate | 2024-06-13 10:17:15.734115893 [2024-06-13 10:17:15] frigate.app INFO : Starting Frigate (0.14.0-bccffe6)
frigate | 2024-06-13 10:17:15.743326005 [2024-06-13 10:17:15] frigate.util.config INFO : Checking if frigate config needs migration...
frigate | 2024-06-13 10:17:15.779582189 [2024-06-13 10:17:15] frigate.util.config INFO : copying config as backup...
frigate | 2024-06-13 10:17:15.823982521 [2024-06-13 10:17:15] frigate.util.config INFO : Migrating frigate config from 0.13 to 0.14...
frigate | 2024-06-13 10:17:15.855096919 [2024-06-13 10:17:15] frigate.util.config INFO : Migrating export file names...
frigate | 2024-06-13 10:17:15.884731267 [2024-06-13 10:17:15] frigate.util.config INFO : Finished frigate config migration...
frigate | 2024-06-13 10:17:16.101957177 [2024-06-13 10:17:16] frigate.util.services INFO : Automatically detected vaapi hwaccel for video decoding
frigate | 2024-06-13 10:17:17.238488672 2024/06/13 10:17:17 [error] 164#164: *2 connect() failed (111: Connection refused) while connecting to upstream, client: ::ffff:10.20.1.120, server: , request: "GET /api/stats HTTP/1.1", subrequest: "/auth", upstream: "http:https://127.0.0.1:5001/auth", host: "10.10.1.125:5000"
frigate | 2024-06-13 10:17:17.238495143 2024/06/13 10:17:17 [error] 164#164: *2 auth request unexpected status: 502 while sending to client, client: ::ffff:10.20.1.120, server: , request: "GET /api/stats HTTP/1.1", host: "10.10.1.125:5000"
frigate | 2024-06-13 10:17:22.238985871 2024/06/13 10:17:22 [error] 165#165: *4 connect() failed (111: Connection refused) while connecting to upstream, client: ::ffff:10.20.1.120, server: , request: "GET /api/stats HTTP/1.1", subrequest: "/auth", upstream: "http:https://127.0.0.1:5001/auth", host: "10.10.1.125:5000"
frigate | 2024-06-13 10:17:22.238990988 2024/06/13 10:17:22 [error] 165#165: *4 auth request unexpected status: 502 while sending to client, client: ::ffff:10.20.1.120, server: , request: "GET /api/stats HTTP/1.1", host: "10.10.1.125:5000"
frigate | 2024-06-13 10:17:22.720978524 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 1280,0 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721076169 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 1280,720 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721275236 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 934,720 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721279625 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 1104,644 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721297455 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 969,237 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721452985 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 700,130 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721468387 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 168,720 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721517891 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 0,720 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721580370 *************************************************************[2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 829,213 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721610352
frigate | 2024-06-13 10:17:22.721635195 *************************************************************
frigate | 2024-06-13 10:17:22.721645602 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 828,344 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721675775 *** Your config file is not valid! ***
frigate | 2024-06-13 10:17:22.721678188 *** Please check the docs at ***
frigate | 2024-06-13 10:17:22.721679928 *** https://docs.frigate.video/configuration/index ***
frigate | 2024-06-13 10:17:22.721681626 *************************************************************
frigate | 2024-06-13 10:17:22.721683219 *************************************************************
frigate | 2024-06-13 10:17:22.721701347 *** Config Validation Errors ***
frigate | 2024-06-13 10:17:22.721703312 *************************************************************
frigate | 2024-06-13 10:17:22.721704681 could not convert string to float: ''
frigate | 2024-06-13 10:17:22.721707048 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 692,233 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721781981 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 777,87 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721864138 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 711,59 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.721914874 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 833,282 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.722123609 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 951,118 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.722128047 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 910,87 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.722130995 [2024-06-13 10:17:22] frigate.util.config ERROR : Not applying mask due to invalid coordinates. 742,228 is outside of the detection resolution 640x360. Use the editor in the UI to correct the mask.
frigate | 2024-06-13 10:17:22.723500148 Traceback (most recent call last):
frigate | 2024-06-13 10:17:22.723504798 File "/opt/frigate/frigate/app.py", line 644, in start
frigate | 2024-06-13 10:17:22.723506680 self.init_config()
frigate | 2024-06-13 10:17:22.723508571 File "/opt/frigate/frigate/app.py", line 140, in init_config
frigate | 2024-06-13 10:17:22.723510448 self.config = user_config.runtime_config(self.plus_api)
frigate | 2024-06-13 10:17:22.723512470 File "/opt/frigate/frigate/config.py", line 1539, in runtime_config
frigate | 2024-06-13 10:17:22.723514288 camera_config.motion = RuntimeMotionConfig(
frigate | 2024-06-13 10:17:22.723516244 File "/opt/frigate/frigate/config.py", line 402, in __init__
frigate | 2024-06-13 10:17:22.723518071 config["mask"] = create_mask(frame_shape, mask)
frigate | 2024-06-13 10:17:22.723520079 File "/opt/frigate/frigate/util/image.py", line 723, in create_mask
frigate | 2024-06-13 10:17:22.723522645 add_mask(m, mask_img)
frigate | 2024-06-13 10:17:22.723524467 File "/opt/frigate/frigate/util/image.py", line 741, in add_mask
frigate | 2024-06-13 10:17:22.723565928 [
frigate | 2024-06-13 10:17:22.723568019 File "/opt/frigate/frigate/util/image.py", line 743, in <listcomp>
frigate | 2024-06-13 10:17:22.723570472 int(float(points[i]) * mask_img.shape[1]),
frigate | 2024-06-13 10:17:22.723572208 ValueError: could not convert string to float: ''
frigate | 2024-06-13 10:17:22.723593748
frigate | 2024-06-13 10:17:22.723595748 *************************************************************
frigate | 2024-06-13 10:17:22.723597517 *** End Config Validation Errors ***
frigate | 2024-06-13 10:17:22.723599570 *************************************************************
frigate | 2024-06-13 10:17:22.981143834 [INFO] Starting go2rtc healthcheck service...
frigate | 2024-06-13 10:17:24.150972890 [INFO] Service Frigate exited with code 1 (by signal 0) Operating systemDebian Install methodDocker Compose Network connectionWired Camera make and modelHikvision via RTSP Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
After having renamed the database (#11929) to I did some more testing, it appears to be specifically this mask that causes the stacktrace: |
Beta Was this translation helpful? Give feedback.
As the release notes say, Frigate 0.14 stores mask and zone coordinates in a relative format. The code attempts to convert your existing coordinates in your config and use them internally as relative values on startup. The database is not used to store mask/zone coordinates at all and is irrelevant to the problem.
As the log messages indicate, your camera's
detect
resolution is being auto-detected as 640x360, but all of your mask and zone coordinates are set up for 1280x720.There are a few possible solutions. You could remove all your masks/zones from your config, restart Frigate, and then use the new mask/zone editor in the UI to redesign them.
Another solution would be to set your came…