Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digit Processing not correct on Zenner watermeter #2628

Closed
rsch90 opened this issue Sep 25, 2023 · 1 comment
Closed

Digit Processing not correct on Zenner watermeter #2628

rsch90 opened this issue Sep 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@rsch90
Copy link

rsch90 commented Sep 25, 2023

The Problem

Digit recognition is sometimes way off with very clear picture and no confusion based on the taken image.
I have tried all kind of combinations with the different models and other config settings. The current config (below) delivers the best results at the moment. From time to time the recognition is still off by at least 1qm or even more (up to a couple of hundred qm). As I am transferring the data to Homeassistant this is always combines with unnecessary corrections within the statistics for the watermeter.

Version

v15.3.0 (Commit: 3fbff0a)

Logfile

[2d07h16m31s] 2023-09-25T22:34:58	<ERR>	[POSTPROC] main: Raw: 00089.29911, Value: , Status: Rate too high - Read: 89.29911 - Pre: 88.29214 - Rate: 1.00697
[2d07h46m33s] 2023-09-25T23:05:00	<ERR>	[POSTPROC] main: Raw: 00088.30421, Value: , Status: Neg. Rate - Read:  - Raw: 00088.30421 - Pre: 89.30420 
[2d07h51m30s] 2023-09-25T23:09:57	<ERR>	[POSTPROC] main: Raw: 00088.30420, Value: , Status: Neg. Rate - Read:  - Raw: 00088.30420 - Pre: 89.30420 
[0d00h00m00s] 2023-09-25T21:17:49	<INF>	[MAIN] =================================================
[0d00h00m00s] 2023-09-25T21:17:49	<INF>	[MAIN] ==================== Start ======================
[0d00h00m00s] 2023-09-25T21:17:49	<INF>	[MAIN] =================================================
[0d00h00m00s] 2023-09-25T21:17:49	<INF>	[MAIN] PSRAM size: 8388608 byte (8MB / 64MBit)
[0d00h00m00s] 2023-09-25T21:17:49	<INF>	[MAIN] Total heap: 4376759 byte
[0d00h00m04s] 2023-09-25T21:17:53	<INF>	[MAIN] Camera info: PID: 0x26, VER: 0x42, MIDL: 0x7f, MIDH: 0xa2
[0d00h00m04s] 2023-09-25T21:17:53	<INF>	[SDCARD] Basic R/W check started...
[0d00h00m04s] 2023-09-25T21:17:53	<INF>	[SDCARD] Basic R/W check successful
[0d00h00m04s] 2023-09-25T21:17:53	<INF>	[SNTP] TimeServer not defined, using default: pool.ntp.org
[0d00h00m04s] 2023-09-25T21:17:53	<INF>	[SNTP] Configuring NTP Client...
[0d00h00m04s] 2023-09-25T23:17:53	<INF>	[SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
[0d00h00m04s] 2023-09-25T23:17:53	<INF>	[SNTP] Time is already set: 2023-09-25 23:17:53
[0d00h00m04s] 2023-09-25T23:17:53	<INF>	[MAIN] CPU frequency: 160 MHz
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[SDCARD] Folder/file presence check started...
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[SDCARD] Folder/file presence check successful
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[MAIN] Tag: 'v15.3.0', Release: v15.3.0 (Commit: 3fbff0a), Date/Time: 2023-07-22 09:42, Web UI: Release: v15.3.0 (Commit: 3fbff0a)
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[MAIN] Reset reason: Via esp_restart
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[WLANINI] SSID: <Wifi SSID>
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[WLANINI] Password: XXXXXXXX
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[WLANINI] RSSIThreshold: -75
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[MAIN] WLAN config loaded, init WIFI...
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[WIFI] Automatic interface config --> Use DHCP service
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[WIFI] Set hostname to: watermeter
[0d00h00m05s] 2023-09-25T23:17:54	<INF>	[WIFI] Init successful
[0d00h00m08s] 2023-09-25T23:17:58	<INF>	[WIFI] Connected to: <WiFi SSID>, RSSI: -75
[0d00h00m09s] 2023-09-25T23:17:59	<INF>	[WIFI] Assigned IP: 192.168.xxx.xxx
[0d00h00m10s] 2023-09-25T23:17:59	<INF>	[SNTP] Time is synced with NTP Server pool.ntp.org: 2023-09-25 23:17:59
[0d00h00m11s] 2023-09-25T23:18:00	<INF>	[MAIN] Device info: CPU cores: 2, Chip revision: 300
[0d00h00m11s] 2023-09-25T23:18:00	<INF>	[MAIN] SD card info: Name: SL16G, Capacity: 14804MB, Free: 14473MB
[0d00h00m13s] 2023-09-25T23:18:02	<INF>	[MAIN] Initialization completed successfully
[0d00h00m16s] 2023-09-25T23:18:05	<INF>	[LOGFILE] Set log level to ERROR
[0d00h01m20s] 2023-09-25T23:19:10	<ERR>	[POSTPROC] main: Raw: 00089.30421, Value: , Status: Rate too high - Read: 89.30421 - Pre: 88.30420 - Rate: 1.00001
[0d00h00m00s] 2023-09-25T21:23:58	<INF>	[MAIN] =================================================
[0d00h00m00s] 2023-09-25T21:23:58	<INF>	[MAIN] ==================== Start ======================
[0d00h00m00s] 2023-09-25T21:23:58	<INF>	[MAIN] =================================================
[0d00h00m00s] 2023-09-25T21:23:58	<INF>	[MAIN] PSRAM size: 8388608 byte (8MB / 64MBit)
[0d00h00m00s] 2023-09-25T21:23:58	<INF>	[MAIN] Total heap: 4376759 byte
[0d00h00m04s] 2023-09-25T21:24:02	<INF>	[MAIN] Camera info: PID: 0x26, VER: 0x42, MIDL: 0x7f, MIDH: 0xa2
[0d00h00m04s] 2023-09-25T21:24:02	<INF>	[SDCARD] Basic R/W check started...
[0d00h00m04s] 2023-09-25T21:24:02	<INF>	[SDCARD] Basic R/W check successful
[0d00h00m04s] 2023-09-25T21:24:02	<INF>	[SNTP] TimeServer not defined, using default: pool.ntp.org
[0d00h00m04s] 2023-09-25T21:24:02	<INF>	[SNTP] Configuring NTP Client...
[0d00h00m04s] 2023-09-25T23:24:02	<INF>	[SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
[0d00h00m04s] 2023-09-25T23:24:02	<INF>	[SNTP] Time is already set: 2023-09-25 23:24:02
[0d00h00m04s] 2023-09-25T23:24:03	<INF>	[MAIN] CPU frequency: 160 MHz
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[SDCARD] Folder/file presence check started...
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[SDCARD] Folder/file presence check successful
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[MAIN] Tag: 'v15.3.0', Release: v15.3.0 (Commit: 3fbff0a), Date/Time: 2023-07-22 09:42, Web UI: Release: v15.3.0 (Commit: 3fbff0a)
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[MAIN] Reset reason: Via esp_restart
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[WLANINI] SSID: <WiFi SSID>
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[WLANINI] Password: XXXXXXXX
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[WLANINI] RSSIThreshold: -75
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[MAIN] WLAN config loaded, init WIFI...
[0d00h00m05s] 2023-09-25T23:24:03	<INF>	[WIFI] Automatic interface config --> Use DHCP service
[0d00h00m05s] 2023-09-25T23:24:04	<INF>	[WIFI] Set hostname to: watermeter
[0d00h00m05s] 2023-09-25T23:24:04	<INF>	[WIFI] Init successful
[0d00h00m09s] 2023-09-25T23:24:08	<INF>	[WIFI] Connected to: <WiFi SSID>, RSSI: -75
[0d00h00m11s] 2023-09-25T23:24:09	<INF>	[WIFI] Assigned IP: 192.168.xxx.xxx
[0d00h00m25s] 2023-09-25T23:24:24	<INF>	[MAIN] Device info: CPU cores: 2, Chip revision: 300
[0d00h00m25s] 2023-09-25T23:24:24	<INF>	[MAIN] SD card info: Name: SL16G, Capacity: 14804MB, Free: 14473MB
[0d00h00m27s] 2023-09-25T23:24:26	<INF>	[MAIN] Initialization completed successfully
[0d00h00m30s] 2023-09-25T23:24:28	<INF>	[LOGFILE] Set log level to ERROR
[0d00h01m33s] 2023-09-25T23:25:32	<ERR>	[POSTPROC] main: Raw: 0046N.30420, Value: , Status: Rate too high - Read: 468.30420 - Pre: 88.30420 - Rate: 380.00000
[0d00h00m00s] 2023-09-25T21:28:56	<INF>	[MAIN] =================================================
[0d00h00m00s] 2023-09-25T21:28:56	<INF>	[MAIN] ==================== Start ======================
[0d00h00m00s] 2023-09-25T21:28:56	<INF>	[MAIN] =================================================
[0d00h00m00s] 2023-09-25T21:28:56	<INF>	[MAIN] PSRAM size: 8388608 byte (8MB / 64MBit)
[0d00h00m00s] 2023-09-25T21:28:56	<INF>	[MAIN] Total heap: 4376891 byte
[0d00h00m04s] 2023-09-25T21:29:00	<INF>	[MAIN] Camera info: PID: 0x26, VER: 0x42, MIDL: 0x7f, MIDH: 0xa2
[0d00h00m04s] 2023-09-25T21:29:00	<INF>	[SDCARD] Basic R/W check started...
[0d00h00m04s] 2023-09-25T21:29:00	<INF>	[SDCARD] Basic R/W check successful
[0d00h00m04s] 2023-09-25T21:29:00	<INF>	[SNTP] TimeServer not defined, using default: pool.ntp.org
[0d00h00m04s] 2023-09-25T21:29:00	<INF>	[SNTP] Configuring NTP Client...
[0d00h00m04s] 2023-09-25T23:29:00	<INF>	[SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
[0d00h00m04s] 2023-09-25T23:29:00	<INF>	[SNTP] Time is already set: 2023-09-25 23:29:00
[0d00h00m04s] 2023-09-25T23:29:00	<INF>	[MAIN] CPU frequency: 160 MHz
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[SDCARD] Folder/file presence check started...
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[SDCARD] Folder/file presence check successful
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[MAIN] Tag: 'v15.3.0', Release: v15.3.0 (Commit: 3fbff0a), Date/Time: 2023-07-22 09:42, Web UI: Release: v15.3.0 (Commit: 3fbff0a)
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[MAIN] Reset reason: Via esp_restart
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[WLANINI] SSID: <WiFi SSID>
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[WLANINI] Password: XXXXXXXX
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[WLANINI] RSSIThreshold: -75
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[MAIN] WLAN config loaded, init WIFI...
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[WIFI] Automatic interface config --> Use DHCP service
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[WIFI] Set hostname to: watermeter
[0d00h00m05s] 2023-09-25T23:29:01	<INF>	[WIFI] Init successful
[0d00h00m08s] 2023-09-25T23:29:04	<INF>	[WIFI] Connected to: <WiFi SSID>, RSSI: -75
[0d00h00m10s] 2023-09-25T23:29:06	<INF>	[WIFI] Assigned IP: 192.168.xxx.xxx
[0d00h00m25s] 2023-09-25T23:29:21	<INF>	[MAIN] Device info: CPU cores: 2, Chip revision: 300
[0d00h00m25s] 2023-09-25T23:29:21	<INF>	[MAIN] SD card info: Name: SL16G, Capacity: 14804MB, Free: 14472MB
[0d00h00m27s] 2023-09-25T23:29:23	<INF>	[MAIN] Initialization completed successfully
[0d00h00m30s] 2023-09-25T23:29:25	<INF>	[LOGFILE] Set log level to ERROR
[0d00h01m35s] 2023-09-25T23:30:31	<ERR>	[POSTPROC] main: Raw: 00089.30421, Value: , Status: Rate too high - Read: 89.30421 - Pre: 88.30420 - Rate: 1.00001
[0d00h01m55s] 2023-09-25T23:30:51	<ERR>	[MQTT IF] Failed to publish topic 'homeassistant/sensor/watermeter/CPUtemp/config', skipping all MQTT publishings in this round!
[0d00h00m00s] 2023-09-25T21:34:33	<INF>	[MAIN] =================================================
[0d00h00m00s] 2023-09-25T21:34:33	<INF>	[MAIN] ==================== Start ======================
[0d00h00m00s] 2023-09-25T21:34:33	<INF>	[MAIN] =================================================
[0d00h00m00s] 2023-09-25T21:34:33	<INF>	[MAIN] PSRAM size: 8388608 byte (8MB / 64MBit)
[0d00h00m00s] 2023-09-25T21:34:33	<INF>	[MAIN] Total heap: 4376891 byte
[0d00h00m04s] 2023-09-25T21:34:37	<INF>	[MAIN] Camera info: PID: 0x26, VER: 0x42, MIDL: 0x7f, MIDH: 0xa2
[0d00h00m04s] 2023-09-25T21:34:37	<INF>	[SDCARD] Basic R/W check started...
[0d00h00m04s] 2023-09-25T21:34:37	<INF>	[SDCARD] Basic R/W check successful
[0d00h00m04s] 2023-09-25T21:34:37	<INF>	[SNTP] TimeServer not defined, using default: pool.ntp.org
[0d00h00m04s] 2023-09-25T21:34:37	<INF>	[SNTP] Configuring NTP Client...
[0d00h00m04s] 2023-09-25T23:34:37	<INF>	[SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
[0d00h00m04s] 2023-09-25T23:34:37	<INF>	[SNTP] Time is already set: 2023-09-25 23:34:37
[0d00h00m04s] 2023-09-25T23:34:37	<INF>	[MAIN] CPU frequency: 240 MHz
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[SDCARD] Folder/file presence check started...
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[SDCARD] Folder/file presence check successful
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[MAIN] Tag: 'v15.3.0', Release: v15.3.0 (Commit: 3fbff0a), Date/Time: 2023-07-22 09:42, Web UI: Release: v15.3.0 (Commit: 3fbff0a)
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[MAIN] Reset reason: Via esp_restart
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[WLANINI] SSID: <WiFi SSID>
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[WLANINI] Password: XXXXXXXX
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[WLANINI] RSSIThreshold: -75
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[MAIN] WLAN config loaded, init WIFI...
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[WIFI] Automatic interface config --> Use DHCP service
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[WIFI] Set hostname to: watermeter
[0d00h00m05s] 2023-09-25T23:34:38	<INF>	[WIFI] Init successful
[0d00h00m08s] 2023-09-25T23:34:41	<INF>	[WIFI] Connected to: <WiFi SSID>, RSSI: -80
[0d00h00m09s] 2023-09-25T23:34:42	<INF>	[WIFI] Assigned IP: 192.168.xxx.xxx
[0d00h00m09s] 2023-09-25T23:34:43	<INF>	[SNTP] Time is synced with NTP Server pool.ntp.org: 2023-09-25 23:34:43
[0d00h00m11s] 2023-09-25T23:34:44	<INF>	[MAIN] Device info: CPU cores: 2, Chip revision: 300
[0d00h00m11s] 2023-09-25T23:34:44	<INF>	[MAIN] SD card info: Name: SL16G, Capacity: 14804MB, Free: 14472MB
[0d00h00m13s] 2023-09-25T23:34:46	<INF>	[MAIN] Initialization completed successfully
[0d00h00m15s] 2023-09-25T23:34:49	<INF>	[LOGFILE] Set log level to ERROR
[0d00h01m06s] 2023-09-25T23:35:39	<ERR>	[POSTPROC] main: Raw: 00089.30420, Value: , Status: Rate too high - Read: 89.30420 - Pre: 88.30420 - Rate: 1.00000
[0d00h11m08s] 2023-09-25T23:45:41	<ERR>	[POSTPROC] main: Raw: 00089.30421, Value: , Status: Rate too high - Read: 89.30421 - Pre: 88.30420 - Rate: 1.00001

Expected Behavior

Better recognition result based on very good image quality of the digits.

Screenshots

IMG_0266
IMG_0267

Additional Context

Config:
[TakeImage]
RawImagesLocation = /log/source
WaitBeforeTakingPicture = 5
RawImagesRetention = 15
Demo = false
Brightness = 0
Contrast = 0
Saturation = 0
LEDIntensity = 6
ImageQuality = 12
ImageSize = VGA
FixedExposure = false

[Alignment]
InitialRotate = 0.0
InitialMirror = false
SearchFieldX = 20
SearchFieldY = 20
AlignmentAlgo = default
FlipImageSize = false
/config/ref0.jpg 294 239
/config/ref1.jpg 185 262

[Digits]
Model = /config/dig-class100-0165_s2_q.tflite
CNNGoodThreshold = 0.8
ROIImagesLocation = /log/digit
ROIImagesRetention = 3
main.dig1 [247 164 37 60 0](tel:247 164 37 60 0)
main.dig2 [279 164 37 60 0](tel:279 164 37 60 0)
main.dig3 [311 164 37 60 0](tel:311 164 37 60 0)
main.dig4 [343 164 37 60 0](tel:343 164 37 60 0)
main.dig5 [375 164 37 60 0](tel:375 164 37 60 0)

[Analog]
Model = /config/ana-cont_1207_s2_q.tflite
ROIImagesLocation = /log/analog
ROIImagesRetention = 3
main.ana1 [407 291 62 63](tel:407 291 62 63) false
main.ana2 [364 340 59 64](tel:364 340 59 64) false
main.ana3 [297 356 62 63](tel:297 356 62 63) false
main.ana4 [219 316 64 63](tel:219 316 64 63) false

[PostProcessing]
main.DecimalShift = 0
main.AnalogDigitalTransitionStart = 6
PreValueUse = true
PreValueAgeStartup = 720
main.AllowNegativeRates = false
main.MaxRateValue = 0.5
;main.MaxRateType = AbsoluteChange
main.ExtendedResolution = true
main.IgnoreLeadingNaN = false
ErrorMessage = true
CheckDigitIncreaseConsistency = true

[MQTT]
Uri = mqtt://192.168.xxx.xxx:1883
MainTopic = watermeter
;ClientID = watermeter
user =
password =
RetainMessages = true
HomeassistantDiscovery = true
MeterType = water_m3

;[InfluxDB]
;Uri = undefined
;Database = undefined
;user = undefined
;password = undefined
;main.Measurement = undefined
;main.Field =

;[InfluxDBv2]
;Uri = undefined
;Database = undefined
;Org = undefined
;Token = undefined
;main.Measurement = undefined
main.Field = undefined

;[GPIO]
;IO0 = input disabled 10 false false
;IO1 = input disabled 10 false false
;IO3 = input disabled 10 false false
;IO4 = built-in-led disabled 10 false false
;IO12 = input-pullup disabled 10 false false
;IO13 = input-pullup disabled 10 false false
LEDType = WS2812
LEDNumbers = 2
LEDColor = [150 150 150](tel:150 150 150)

[AutoTimer]
AutoStart = true
Interval = 5

[DataLogging]
DataLogActive = true
DataFilesRetention = 3

[Debug]
LogLevel = 1
LogfilesRetention = 3

[System]
TimeZone = CET-1CEST,M3.5.0,M10.5.0/3
;TimeServer = pool.ntp.org
;Hostname = undefined
RSSIThreshold = -75
CPUFrequency = 240
SetupMode = false

@rsch90 rsch90 added the bug Something isn't working label Sep 25, 2023
@caco3
Copy link
Collaborator

caco3 commented Sep 27, 2023

Your digital ROIs are far to large.

Please adjust according to the docs: https://jomjol.github.io/AI-on-the-edge-device-docs/ROI-Configuration/#how-to-setup-the-digit-rois-perfectly

Repository owner locked and limited conversation to collaborators Sep 27, 2023
@caco3 caco3 converted this issue into discussion #2633 Sep 27, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants