djdd87 / SynoAI

A Synology Surveillance Station notification system utilising DeepStack AI
GNU General Public License v3.0
208 stars 24 forks source link

Exclusions not working #180

Closed JohannCR closed 1 year ago

JohannCR commented 1 year ago

Hi, I can't seem to make the exclusion zones work. using "DrawMode": "off", "DrawExclusions": true,

And yet detected objects are drawn but not exclusion zones. Is there an error in my config ? Thanks

{
  "Logging": {
    "LogLevel": {
      "Default": "Debug",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Warning"
    }
  },
  "Url": "http://xxx:xxx",
  "User": "xxxx",
  "Password": "xxxx",
  "SaveOriginalSnapshot": "off",
  "DaysToKeepCaptures": 30,
  "AI": {
    "Type": "DeepStack",
    "Url": "http://xxx:xxx"
  },
  "Notifiers": [
    {
      "Type": "Webhook",
      "Url": "http://xxxx:xxx/api/webhook/mouvement_entree",
      "Cameras": ["Entree"],
      "Types": ["Person"]
    },
    {
        "Type": "Webhook",
        "Url": "http://xxxx:xxx/webapi/entry.cgi?api=SYNO.SurveillanceStation.Webhook&method=Incoming&version=1&token=xxxx",
        "Method":"GET",
        "Cameras": ["Entree"]
    },
    {
      "Type": "Webhook",
      "Url": "http://xxxx:xxxx/api/webhook/cat_front_door",
      "Cameras": ["Entree"],
      "Types": ["cat", "dog"]
    }
  ],
  "Cameras": [
    {
      "Name": "Entree",
      "Types": ["person", "cat", "dog"],
      "Threshold": 70,
      "DrawMode": "off",
      "DrawExclusions": true,
      "Wait": 500,
      "MinSizeX": 20,
      "MinSizeY": 20,
      "Exclusions": [
        {
            "Start": { "X": 1800, "Y": 400 },
            "End": { "X": 2350, "Y": 900 },
            "Mode": "Intersect"
        }
    ]
    }
  ]
}
djdd87 commented 1 year ago

I would expect that to work and draw the exclusion zones. Are you sure your image is high quality enough to be that many pixels? Can you try and set a test zone that's guaranteed to appear, e.g:

        {
            "Start": { "X": 0, "Y": 0},
            "End": { "X": 100, "Y": 100},
            "Mode": "Intersect"
        }
JohannCR commented 1 year ago

No change. And the person box is drawn while it shouldn't

djdd87 commented 1 year ago

Are you restarting SynoAI after changing the config values?

On Sat, 11 Feb 2023, 12:30 Johann, @.***> wrote:

No change. And the person box is drawn while it shouldn't

— Reply to this email directly, view it on GitHub https://github.com/djdd87/SynoAI/issues/180#issuecomment-1426753595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJAGOIEG2AULAJWWQQNEMDWW6A4XANCNFSM6AAAAAAUYTYWHY . You are receiving this because you commented.Message ID: @.***>

JohannCR commented 1 year ago

Yes of course. I'll check that my config is correctly saved and try by stopping and starting instead of restarting

JohannCR commented 1 year ago

Nope. No change. Config correctly saved and container restarted.

JohannCR commented 1 year ago

Maybe a config parameter variable type ? String/boolean

JohannCR commented 1 year ago

Do you need any log to help see what is going on ? Maybe the entire config (got other cameras, maybe there could be a conflict ?)

djdd87 commented 1 year ago

I've just seen why. You've put DrawMode and DrawExclusions against the camera config. They exist at the top level of the config, not under the camera.

https://github.com/djdd87/SynoAI#general-config

JohannCR commented 1 year ago

Damn I new I made some stupid mistake^^ Thanks for this, it works fine now !