Skip to content
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

Postprocessing Problem after update to v11.3.1 of digital digits #1028

Closed
k3067e3 opened this issue Sep 18, 2022 · 14 comments
Closed

Postprocessing Problem after update to v11.3.1 of digital digits #1028

k3067e3 opened this issue Sep 18, 2022 · 14 comments

Comments

@k3067e3
Copy link

k3067e3 commented Sep 18, 2022

In RAW value digital digits are ok, but not after postprocessing.

RAW Value 0034N.6839
After postprocessing Rate too high - Read: 694.6839 - Pre: 347.6781

Find log attached:

2022-09-18T10:19:17: task_autodoFlow - next round - Round #3
2022-09-18T10:19:17: FlowControll.doFlow - ClassFlowMakeImage
2022-09-18T10:19:25: FlowControll.doFlow - ClassFlowAlignment
2022-09-18T10:19:40: FlowControll.doFlow - ClassFlowCNNGeneral
2022-09-18T10:19:40: ClassFlowCNNGeneral::doFlow nach Alignment
2022-09-18T10:19:42: FlowControll.doFlow - ClassFlowCNNGeneral
2022-09-18T10:19:43: ClassFlowCNNGeneral::doFlow nach Alignment
2022-09-18T10:19:54: FlowControll.doFlow - ClassFlowPostProcessing
2022-09-18T10:19:54: ClassFlowCNNGeneral::getReadout _analog=0, _extendedResolution=0, prev=-1
2022-09-18T10:19:54: ClassFlowCNNGeneral::ZeigerEvalAnalogNeu - kein Vorgänger - Ergebnis = 9 zahl: 9.100000 ziffer_vorgaenger = -1 AnalogFehler = 3.000000
2022-09-18T10:19:54: ClassFlowCNNGeneral::ZeigerEvalAnalogNeu - Zahl uneindeutig, Korrektur nach unten - Ergebnis = 3 zahl: 3.900000 ziffer_vorgaenger = 9 AnalogFehler = 3.000000
2022-09-18T10:19:54: ClassFlowCNNGeneral::ZeigerEvalAnalogNeu - Zahl eindeutig, keine Korrektur notwendig - Ergebnis = 8 zahl: 8.300000 ziffer_vorgaenger = 3 AnalogFehler = 3.000000
2022-09-18T10:19:54: ClassFlowCNNGeneral::ZeigerEvalAnalogNeu - Zahl uneindeutig, Korrektur nach unten - Ergebnis = 6 zahl: 6.700000 ziffer_vorgaenger = 8 AnalogFehler = 3.000000
2022-09-18T10:19:54: ClassFlowCNNGeneral::getReadout _analog=0, _extendedResolution=0, prev=6
2022-09-18T10:19:54: FlowControll.doFlow - ClassFlowMQTT
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=5653, wasserzaehler/connection, connected
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=57777, wasserzaehler/connection, connected
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=44960, wasserzaehler/uptime, 642
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=16504, wasserzaehler/freeMem, 3074027
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=34415, wasserzaehler/wifiRSSI, -85
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=8246, wasserzaehler/CPUtemp, 59.444443
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=34187, wasserzaehler/main/error, Rate too high - Read: 694.6839 - Pre: 347.6781
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=46477, wasserzaehler/main/raw, 0034N.6839
2022-09-18T10:19:54: MQTT - sent publish successful in MQTTPublish, msg_id=50001, wasserzaehler/main/json, {"value":"","raw":"0034N.6839","error":"Rate too high - Read: 694.6839 - Pre: 347.6781","rate":"","timestamp":""}
2022-09-18T10:19:54: task_autodoFlow - round done
2022-09-18T10:19:54: CPU Temperature: 60.6
2022-09-18T10:20:04: info_get_handler
2022-09-18T10:20:06: handler_wasserzaehler - Start
2022-09-18T10:20:06: handler_wasserzaehler - Start
2022-09-18T10:20:06: handler_wasserzaehler - Start
2022-09-18T10:20:06: handler_wasserzaehler - Start
2022-09-18T10:20:06: handler_prevalue - Start
2022-09-18T10:20:06: handler_prevalue - Start
2022-09-18T10:20:06: handler_cputemp - Start
2022-09-18T10:20:06: handler_cputemp - End
2022-09-18T10:20:06: handler_rssi - Start
2022-09-18T10:20:06: handler_rssi - End
2022-09-18T10:20:06: handler_prevalue - Start
2022-09-18T10:20:06: handler_prevalue - Start
2022-09-18T10:20:06: handler_rssi - Start
2022-09-18T10:20:06: handler_rssi - End
2022-09-18T10:20:08: handler_cputemp - Start
2022-09-18T10:20:08: handler_cputemp - End
2022-09-18T10:20:13: info_get_handler
2022-09-18T10:20:14: download_get_handler
2022-09-18T10:20:15: handler_editflow - Start
2022-09-18T10:22:23: info_get_handler
2022-09-18T10:22:23: info_get_handler
2022-09-18T10:22:23: info_get_handler
2022-09-18T10:22:24: info_get_handler
2022-09-18T10:22:24: info_get_handler
2022-09-18_10h26_50

2022-09-18T10:22:24: info_get_handler
2022-09-18T10:22:24: info_get_handler
2022-09-18T10:22:24: info_get_handler
2022-09-18T10:22:46: download_get_handler
2022-09-18T10:22:49: download_get_handler

@jroegner
Copy link

Exactly the same here

@jomjol
Copy link
Owner

jomjol commented Sep 18, 2022

Can you post your config.ini and do a testrund with deactiviated checkdigitconsistency ?

@k3067e3
Copy link
Author

k3067e3 commented Sep 18, 2022

Config.ini with activated checkdigitconsistency

[MakeImage]
;LogImageLocation = /log/source
WaitBeforeTakingPicture = 5
;LogfileRetentionInDays = 15
Brightness = 0
Contrast = 0
Saturation = 0
LEDIntensity = 5
ImageQuality = 12
ImageSize = VGA
FixedExposure = false

[Alignment]
InitialRotate = -1
InitialMirror = false
SearchFieldX = 20
SearchFieldY = 20
AlignmentAlgo = default
FlipImageSize = false
/config/ref0.jpg 152 160
/config/ref1.jpg 286 368

[Digits]
Model = /config/dig-class11_1411_s2_q.tflite
;CNNGoodThreshold =
;LogImageLocation = /log/digit
;LogfileRetentionInDays = 3
main.dig1 241 116 18 38
main.dig2 269 116 18 38
main.dig3 297 116 18 38
main.dig4 326 116 18 38
main.dig5 355 116 18 38

[Analog]
Model = /config/ana-class100_0120_s1_q.tflite
;LogImageLocation = /log/analog
;LogfileRetentionInDays = 3
main.ana1 359 211 82 82
main.ana2 307 286 82 82
main.ana3 217 293 82 82
main.ana4 154 228 82 82

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

[MQTT]
Uri = mqtt://10.76.0.85:1883
MainTopic = wasserzaehler
ClientID = wasser
user = openhabian
;password = PASSWORD
;SetRetainFlag = true

;[InfluxDB]
;Uri = undefined
;Database =
;Measurement = undefined
;user = undefined
;password = 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

[AutoTimer]
AutoStart = true
Intervall = 5

[Debug]
Logfile = true
LogfileRetentionInDays = 3

[System]
TimeZone = CET-1CEST,M3.5.0,M10.5.0/3
;TimeServer = undefined
;AutoAdjustSummertime = false
;Hostname = undefined
SetupMode = false

@k3067e3
Copy link
Author

k3067e3 commented Sep 18, 2022

With deactivated checkdigitconsistency
2022-09-18_11h31_59

@jroegner
Copy link

`[MakeImage]
;LogImageLocation = /log/source
WaitBeforeTakingPicture = 5
;LogfileRetentionInDays = 15
Brightness = -2
Contrast = 2
Saturation = 0
LEDIntensity = 3
ImageQuality = 5
ImageSize = VGA
FixedExposure = false

[Alignment]
InitialRotate = 88.5
InitialMirror = false
SearchFieldX = 20
SearchFieldY = 20
AlignmentAlgo = default
FlipImageSize = false
/config/ref0.jpg 171 201
/config/ref1.jpg 410 162

[Digits]
Model = /config/dig-s2-q-20220211.tflite
;CNNGoodThreshold =
;LogImageLocation = /log/digit
;LogfileRetentionInDays = 3
main.dig1 224 149 24 43 false
main.dig2 260 149 24 43 false
main.dig3 296 151 24 43 false
main.dig4 333 152 24 43 false
main.dig5 367 151 24 43 false

[Analog]
Model = /config/ana0910s3_longq.tflite
;LogImageLocation = /log/analog
;LogfileRetentionInDays = 3
main.ana1 401 230 68 68 false
main.ana2 361 310 68 68 false
main.ana3 287 342 68 68 false
main.ana4 190 307 68 68 false

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

[MQTT]
Uri = mqtt://XXX
MainTopic = XXX
ClientID = XXX
user = XXX
password = XXX
;SetRetainFlag = true

;[InfluxDB]
;Uri = undefined
;Database = undefined
;Measurement = undefined
;user = undefined
;password = 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

[AutoTimer]
AutoStart = true
Intervall = 4.85

[Debug]
Logfile = true
LogfileRetentionInDays = 3

[System]
TimeZone = CET-1CEST,M3.5.0,M10.5.0/3
;TimeServer = undefined
;AutoAdjustSummertime = false
;Hostname = undefined
SetupMode = false`

@Plawasan
Copy link

Plawasan commented Sep 18, 2022

Also getting some algo issues from good recognition - Result should be 169.35935

image

image

@jomjol
Copy link
Owner

jomjol commented Sep 18, 2022

@k3067e3 : can you post a longer part of the log file from several rounds where the problem is also present?

@k3067e3
Copy link
Author

k3067e3 commented Sep 18, 2022

@jomjol

log_2022-09-18.txt

2022-09-18T09:52:01: task_autodoFlow - next round - Round #5648 was working before update

2022-09-18T10:00:13: task_autodoFlow - next round - Round #1 after update first time error

2022-09-18T11:30:33: task_autodoFlow - next round - Round #1 after checkdigitconsistency = false

2022-09-18T12:47:59: task_autodoFlow - next round - Round #1 after checkdigitconsistency = true

2022-09-18T12:50:29: task_autodoFlow - next round - Round #1 after checkdigitconsistency = false

@PetrMa
Copy link

PetrMa commented Sep 20, 2022

I have the same issue with 11.3.1
with the disabled check consistency it is OK but with the enable function I have this scren error:
image

@caco3
Copy link
Collaborator

caco3 commented Sep 20, 2022

@PetrMa
Copy link

PetrMa commented Sep 20, 2022

@caco3 you mean this?
https://github.com/jomjol/AI-on-the-edge-device/actions/runs/3085302812

I'm not sure because the files are named as 11.2.0 not 11.3.1

@caco3
Copy link
Collaborator

caco3 commented Sep 20, 2022

yes, those files are ok. I didn't update the naming yet.

@Gert05
Copy link

Gert05 commented Sep 21, 2022

Similar problem here. 875196.9 recognized as 875197.9.
Would it be an idea to let last_digit = round(last_digit_raw - analog_raw/10) = round(6.8-0.9)=6?

image

@PetrMa
Copy link

PetrMa commented Sep 21, 2022

@PetrMa You could try an unstable, experimental build, see https://github.com/jomjol/AI-on-the-edge-device/wiki/Install-a-rolling-%28unstable%29-release

Hi @caco3 ,
yeap, that help me. Thanks

@jomjol jomjol closed this as completed Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants