djdd87 / SynoAI

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

Add night mode using deepstack EX dark (add support for custom models) #117

Open RejEdm opened 2 years ago

RejEdm commented 2 years ago

Hello djdd87, as requested, I am adding this request as an issue.

I have noticed at night time, deepstack is not as effective at detecting people and objects. Having the ability to have deepstack EX Dark run at night would be great. I realize with the time change that might be an issue. The other problem with time is the fact that docker on Synology logs are never the correct time even with TZ set for my timezone. I have googled online and this appears to be an issue with docker on Synology.

I am wondering if it would be possible to have deepstack and deepstack exdark running and configured in the app settings.json? Having deepstack run during the day and deepstack exdark run at night?

djdd87 commented 2 years ago

The incorrect times on logs is indeed a Docker/Synology issue as it always logs in UTC, even though the container is correctly running in the defined TZ.

My suggestion would be to support the additional AI and then have some sort of defined schedule.

JohannCR commented 2 years ago

I second that ! Been having a lot of false positive at night... That's to be expected, but It would be really nice to be able to switch AI. Also is it possible to run both at the same time ? Say if there's a camera in a (most of the time) dark room for example. Or maybe it would need to run 2 instances of synoAI for that ?

By the way, that would be a good first step to add EXdark compatibility, so that we could run two instances to test it out ;-)

djdd87 commented 2 years ago

I don't see any reason why I can't run the same data through multiple AIs simultaneously. I'd just need to make it wait for all requests to return, then combine the results.

JohannCR commented 2 years ago

Any update on this ? Been woken up a fair amount by false positives at night 😂🤣

djdd87 commented 2 years ago

I've not had any time for ages to work on this. Family, work, etc. Hoping I'll find some time in the next few months.

Neogx commented 2 years ago

wow I didn't know they made deep stack for the night pretty cool.

djdd87 commented 2 years ago

I misunderstood how the night time version worked for DeepStack - I assumed it was a different AI, but turns out it's just custom models. So really this is a task to add support for custom models and to allow them to run on a schedule.

So what I need to do is to allow multiple AIs to be specified with a custom path set, or some sort of configuration on the types to tell the AI to use custom models. (And probably all on a configurable schedule.)