Closed forkineye closed 3 years ago
Further research led me to the [ml]
config section. I was going off the monitor-999 example in the config which was not applicable since use_sequence
was enabled. After creating my own key and setting it for model_sequence
, I resolved my issue. I did notice an error in the following section of the docs though: https://github.com/pliablepixels/zmeventnotification/blame/master/docs/guides/hooks.rst#L334. If the key value is quoted, it will generate nested quotes in processing and fail. For example:
06/25/21 14:12:45 zmesdetect_m1[93393] DBG2 zm_detect.py:329 [using ml_sequence]
06/25/21 14:12:45 zmesdetect_m1[93393] FAT zm_detect.py:554 [Unrecoverable error:invalid syntax (<unknown>, line 3) Traceback:Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 549, in <module>
main_handler()
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 333, in main_handler
ml_options = ast.literal_eval(ml_options)
File "/usr/lib/python3.8/ast.py", line 59, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/usr/lib/python3.8/ast.py", line 47, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 3
'model_sequence': ''object,face'',
^
SyntaxError: invalid syntax
]
Here's the config that worked for me:
# Driveway
[monitor-1]
model_seq=object,face
# Porch
[monitor-2]
model_seq=object,face
# Street
[monitor-3]
model_seq=object,face,alpr
# Living Room
[monitor-4]
model_seq=object,face
[ml]
...
ml_sequence= {
'general': {
'model_sequence': '{{model_seq}}',
...
So, my issue is fixed, but I'll leave this open in case you want to update the example and doc. Thanks for the all the work you've put in on this project.
Thanks fixed. Curious about your monitor-999 comment and use_sequence. How are they related?
In the monitor-999 example, there is detection_sequece=object,alpr
- https://github.com/pliablepixels/zmeventnotification/blob/master/hook/objectconfig.ini#L368
However, model_sequence
is set to 'object,face,alpr'
and since use_sequence
is enabled, the detection sequence used for monitor-999 would be ignored - https://github.com/pliablepixels/zmeventnotification/blob/master/hook/objectconfig.ini#L403
Configuration
I'm running dlandon/zoneminder.machine.learning Event Server version: 6.1.23 Hooks version (if you are using Object Detection): app - 6.1.23, pyzm - 0.3.48 Are you using MLAPI? (Y/N): No The version of ZoneMinder you are using: 1.36.5
What is the nature of your issue
Monitor overrides in objectconfig.ini being applied but not working for
detection_sequence
Details
I have detection_sequence overrides for every monitor, and only monitor-3 should have alpr. The log file shows it picking up the override, however in execution it is still running an alpr check. I originally had
object,face
under[general]
andobject,face,alpr
under[monitor-3]
, but that didn't work either. Tried have nothing under[general]
and setting each monitor explicitly and still no joy. Is this a bug or am I just doing something wrong?objectconfig.ini
Debug Logs
Truncated, can post full if needed