Giter VIP home page Giter VIP logo

Comments (3)

forkineye avatar forkineye commented on July 18, 2024 1

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

from zmeventnotification.

forkineye avatar forkineye commented on July 18, 2024

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.

from zmeventnotification.

pliablepixels avatar pliablepixels commented on July 18, 2024

Thanks fixed.
Curious about your monitor-999 comment and use_sequence. How are they related?

from zmeventnotification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.