You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/hooks.rst
+6-38Lines changed: 6 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -608,46 +608,14 @@ Like this:
608
608
609
609
Exceptions when using mlapi
610
610
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
611
-
If you are using the remote mlapi server, it gets a little murkier (and I need to clean this up) when it comes to
612
-
per monitor setting. ``objectconfig.ini`` allows you to override attributes on a per monitor basis. However, mlapi
613
-
has no concept of 'per monitor' settings (yet). It loads a config once and sits in memory, doing ML for whatever zm_detect
614
-
throws at it.
611
+
If you are using the remote mlapi server, then a lot of these settings migrate to ``mlapiconfig.ini``
612
+
Specifically, when ``zm_detect.py`` sees ``ml_gateway`` in its ``[remote]`` section, it passes on
613
+
the detection work to mlapi. The sequence then flows like this:
615
614
616
-
So as a hack (for now), zm_detect passes the following attributes in a structure called ``ml_overrides`` to mlapi.
617
-
mlapi then goes about replacing its own values with these overrides. The following are sent as overrides:
618
-
619
-
- ``model_sequence`` (inside the ``ml_sequence`` structure in objectconfig.ini)
620
-
- ``pattern`` (inside ``ml_sequence->object,face,alpr`` structure in objectconfig.ini)
621
-
622
-
**In other words, these values from objectconfig.ini will override whatever you put in mlapiconfig.ini**
623
-
624
-
So let's suppose you want to change ``model_sequence`` on a per monitor basis using mlapi, then:
625
-
626
-
In objectconfig.ini:
627
-
628
-
::
629
-
630
-
ml_sequence= {
631
-
'general': {
632
-
'model_sequence': '{{my_sequence}}',
633
-
<etc>
634
-
635
-
And then override ``my_sequence`` on a per monitor basis in objectconfig.ini:
636
-
637
-
::
638
-
639
-
[monitor-1]
640
-
my_sequence=face,object,alpr
641
-
642
-
[monitor-2]
643
-
my_sequence=face,object
644
-
645
-
646
-
The same holds true for ``pattern``
647
-
648
-
I am going to clean this up so that mlapiconfig.ini supports a notion of per monitor settings and has a way
649
-
to reload parameters based on monitors. Some time. And when I do, you'll see this section disappear.
615
+
- If ``mlapiconfig.ini`` has monitor specific sections, those are used (including polygons inside those sections). If not, the values in ``objectconfig.ini`` are used
616
+
- If ``mlapiconfig.ini`` has ``ml_sequence`` and ``stream_sequence``, those are used. If not, the values in ``objectconfig.ini`` are used
650
617
618
+
To keep things simple, when using mlapi, specify ``ml_sequence``, ``stream_sequence`` and monitor specific settings in ``mlapiconfig.ini``
0 commit comments