Synology Surveillance Station with Deepstack AI

rnatalli

Getting the hang of it
Joined
Aug 7, 2016
Messages
140
Reaction score
31
I thought I would share something I came across and tested recently. I personally still feel Blue Iris is a better option due to its pricing and customizability, but for those of you with a Synology NAS who like to tinker, this may work if you just need a couple of cameras. I did not come up with this and the original link is below, but added a few notes along the way. Note, this only works on intel-based Synology NAS boxes with a minimum of 4GB of RAM.

Synology Surveillance Station - AI Motion Detection
  • Setup Action Rules in Surveillance Station for each camera as described in the blog post.
  • Install Docker on the NAS.
  • Install the Deepquestai/Deepstack (Tag: noavx or cpu-x3-beta) image and obtain free API as described in the blog post. Don’t forget to add the API key after setting up the Docker image by using the link to the NAS as described in the blog post.
  • Create the following folders on the NAS: /docker/sssAi/Config and /docker/sssAi/CaptureDir
  • Create the cameras.json and settings.json files using code in the blog and upload to the /docker/sssAi/Config directory created in the previous step. A couple notes, tweak the URL so “Incoming” is \”Incoming\” . May also need to switch https:// to http:// and 5001 to 5000 depending on the NAS setup. The settings.json file may include other items for object detection found at this link: Object Detection
  • Now with everything in place, go back to Docker and install sssAi as described in the blog post. An additional note, also mount /docker/sssAi/CaptureDir to /CaptureDir
  • Under each camera in Surveillance Station, go to Recording Settings --> Schedule and change to either Continuous or Delete entirely. Ensure Motion Detection (Green) is not present on the schedule; otherwise, it will record for both the general motion event from Surveillance Station and the AI recording which is duplicative.
  • Under Notifications in Surveillance Station, change the Rules to only receive an alert for Action Rule (System) and not Motion detected (Camera). Tailor this however you like.
Caveats:
  • This still depends on either the Camera or Surveillance Station detecting the original motion so tweak the sensitivities and thresholds.
  • Because this depends on a motion event from Surveillance Station, if it detects motion such as wind moving tree branches, it will send a snapshot to the AI for analysis. This could prove problematic if you have a camera pointed at the driveway for instance as the AI will detect a car and trigger a recording as it looks at the entire frame. Again, messing with the motion detection is key. If you don’t care about detecting cars, simply remove that object from the settings.json file and set it to only detect “person."
 

GonzoCam

n3wb
Joined
Nov 7, 2017
Messages
2
Reaction score
0
Thanks for your post! It is an exciting addition, but proving difficult.

Can you clarify what the username and password in the settings.json file is for? Is this the login for the Surveillance Station? For the camera?

I went through your instructions with the original blog post and the sssAi immediately crashes.
 

rnatalli

Getting the hang of it
Joined
Aug 7, 2016
Messages
140
Reaction score
31
Thanks for your post! It is an exciting addition, but proving difficult.

Can you clarify what the username and password in the settings.json file is for? Is this the login for the Surveillance Station? For the camera?

I went through your instructions with the original blog post and the sssAi immediately crashes.
It’s your DSM login information. Also, go with the cpu-x3-beta docker image as it seems to work better and use less resources.


Sent from my iPhone using Tapatalk
 
Last edited:

GonzoCam

n3wb
Joined
Nov 7, 2017
Messages
2
Reaction score
0
I was able to get it working with the cpu-x3-beta docker image. Thanks

Now I need to work on the speed. It is taking my system 7 seconds to process the image. By that time, the person is out of the frame and the screenshot I get from the action rule is worthless. I'm on continuous recording, but hate to have to review each alert to find out who triggered it.

Any tips? I'm on a DS218+.
 

rnatalli

Getting the hang of it
Joined
Aug 7, 2016
Messages
140
Reaction score
31
7 seconds seems like a lot. Is mode set to Low? How much RAM in the unit? I think the 218+ uses a dual-core processor so may just be too much for it.


Sent from my iPhone using Tapatalk
 
Last edited:

Mr_milo

n3wb
Joined
Feb 10, 2021
Messages
9
Reaction score
6
Location
California
If this was done on an AMD based Synology, (DS1621+) could you run deepstack on a RPi4 with an Intel neural compute stick or a Jetson Nano? If so, do you think it would help / speed up the image process times?
 
Top