-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added two configuration parameters. Deleted "Delay" configuration par…
…ameter Added new config parameter "Path" inside the "AI" section on appsettings.json allowing to change the path used by Synoai to send the snapshot and wait for results from Deepstack, useful if you want to change the included objects detection model into a custom one: Path: Default value is "v1/vision/detection" for standard deepstack trained model. I.E.: If you want to use a third party / custom module, like the DeepStack Dark Scene Objects Detection, you will need this value to be "v1/vision/custom/dark" Added new config parameter "MaxSnapshots" inside the general section on appsettings.json. Default value is 1. Max value is 254. Upon receiving a Motion detect trigger from Synology Surveillance Station, this parameter controls how many snapshots SynoAI will keep retrieving and analyzing until it finds a valid object. Then it stops and returns an alert notification. This greatly enhances the detection capability in certain scenarios (like mine) because: First limitation comes from Synology: The fastest you can trigger a motion event is "one each 5 seconds". BUT ny DS920+ can process a 640x480 snapshot at about 650 ms ... even with Deepstack configured at "Medium" quality! So inside those 5 seconds, I could actually inspect like 7 or even 8 frames for the object I want to be alerted upon ("Person"). In my scenario, some person can walk from side to side of the camera field in LESS than 5 seconds. Usually, motion detection from SSS will detect a person entering the frame from a side where only his / her head is visible. If SynoAI takes that snapshot only and sends it to Deepstack, it will not detect a person. But if I keep retrieving frames inside those 5 seconds, the person will finally appear "whole body" at 2nd or 3rd frame and Deepstack is able to discover that person. So I greatly increased the chances of detecting people by letting SynoAI to take several snapshots once a motion is detected, instead of letting SSS to dictate the timing for each snapshot. Actually I increased SSS triggering event call from 5 seconds into 20 seconds. So now when I get a motion triggering alert from SSS, SynoAI takes control of the situation and starts taking up to 20 snapshots, inside that 20 second windows. Two benefits: 1) It can detect persons which where missed on the earlier scenario of "one snapshot each 5 seconds" 2) If someone is standing in front of the camera, I can get ONE notification each 20 seconds because SSS now triggers the motion event each 20 seconds and SynoAI returns a notification when it first detects a person and STOPS for that run Lastly, I deleted the configuration parameter "DELAY" since actually the delay is given by the triggering event configured in Synology Surveillance Station; being mínimum 5 seconds, so there is no actual need for SynoAI to also take care of Delay.
- Loading branch information
Showing
4 changed files
with
85 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
"Password": "", | ||
"AllowInsecureUrl": false, | ||
|
||
"Delay": 5000, | ||
"DrawMode": "Matches", | ||
|
||
"AI": { | ||
|