Smart Alerts - Motion & DeepStack

Samples of good tickets that lead to resolution for various topics.
Post Reply
varghesesa
Posts: 90
Joined: Thu Jul 11, 2019 9:52 pm

Smart Alerts - Motion & DeepStack

Post by varghesesa »

Introduction
In order to really help provide guidance on smarter alerts, a fair level of understanding and detail needs to be provided in the ticket.

Summary
While I may have preferred if the user provided the camera settings (camera settings -> general tab -> export), he did a really good job providing the detail needed to understand what he was trying to do in a concise manner. The combination of screenshots of relevant camera settings with his description made understanding clear.

Customer ticket

This is my second time trying to track down this issue. As a quick rehash of the issue:

I have cameras with multiple zones, A and B. A is a larger zone and contains everything where I want to detect motion. B is a smaller zone that overlaps on A. I want to analyze all motion with Deepstack and trigger an alert on all confirmed objects (person,car,truck,bus,motorcycle,bicycle) in zone A, but I want alert actions to only occur on zone B when a person is confirmed by Deepstack.

Under trigger, artificial intelligence.. I have all zones selected. That allows Deepstack to analyze all motion detections.

Under Alerts, Trigger sources and zones: I have all zones selected with "Any" in the drop-down. This should allow both A and B to create alerts when DS detects an object.

Under Alerts -> Actions -> On Alert: Each action has zones/sources set to "=AB" and the required objects set to 'person:50'. This should only fire the alert actions when the motion is detected in both zones A and B, correct?

smart alerts img1.png
smart alerts img1.png (11.18 KiB) Viewed 21207 times

A few minutes ago this alert caused my alert action to fire:
smart alerts img2.png
smart alerts img2.png (55.43 KiB) Viewed 21207 times

BI correctly identified this alert as motion A, but it fired the alert actions anyway.

Code: Select all

3 10/18/2021 1:52:38.552 PM FrontCam             MOTION_A
3 10/18/2021 1:52:38.670 PM Rear_PTZ             MOTION_A
3 10/18/2021 1:52:38.851 PM Front_Cam_247       GROUP
0 10/18/2021 1:52:38.852 PM Driveway             DeepStack: person:60% [2032,325 2085,468] 480ms
0 10/18/2021 1:52:42.620 PM FrontCam             DeepStack: person:59% [872,295 932,436] 332ms
10 10/18/2021 1:52:42.910 PM Server               ::: Connected
0 10/18/2021 1:52:43.035 PM FrontCam             Push: OK to BIApp
0 10/18/2021 1:52:45.451 PM FrontCam             SMS: xxx@.google.com with 1 attachment/s
This has happened multiple times today. I am running on 5.5.1.12 (10/17/2021).

It's windy today. Is it possible that the alerts are happening because there are shadows moving in zone B even though the detected object is not in zone B?

I'm going to try to switch my alert actions from "=" to "All" with zones A and B checked. It seems like those should produce the same results.


Comments / Feedback
This is my second time trying to track down this issue. As a quick rehash of the issue:

I have cameras with multiple zones, A and B. A is a larger zone and contains everything where I want to detect motion. B is a smaller zone that overlaps on A.
:idea:
Motion zones
While I would have preferred the camera settings (camera settings -> general tab -> export) in order to see the actual zones, the zones description will suffice since the concept of a larger zone (A) which contains the field of view of the camera and a smaller zone (B) that overlaps on A is a widely understood concept. Easy to grasp.

I want to analyze all motion with Deepstack and trigger an alert on all confirmed objects (person,car,truck,bus,motorcycle,bicycle) in zone A, but I want alert actions to only occur on zone B when a person is confirmed by Deepstack.
:idea:
Objective
Objective is clearly identified.
The use case is this camera faces the street and zone A detects cars and people passing by. Zone B is the approach to my front door and the alert actions push alerts to mobile devices when a person approaches the door. The user clearly states what he is trying to do.

Under trigger, artificial intelligence.. I have all zones selected. That allows Deepstack to analyze all motion detections.

Under Alerts, Trigger sources and zones: I have all zones selected with "Any" in the drop-down. This should allow both A and B to create alerts when DS detects an object.

Under Alerts -> Actions -> On Alert: Each action has zones/sources set to "=AB" and the required objects set to 'person:50'. This should only fire the alert actions when the motion is detected in both zones A and B, correct?
smart alerts img1.png
smart alerts img1.png (11.18 KiB) Viewed 21207 times

:idea:
Supporting evidence

The user describes his settings and his reasoning for the settings. Also asks to confirm his understanding. He also provides just the right screenshots to easily understand his setup. Again, I would have preferred to have his camera settings just to confirm my understanding.

A few minutes ago this alert caused my alert action to fire:

smart alerts img2.png
smart alerts img2.png (55.43 KiB) Viewed 21207 times

BI correctly identified this alert as motion A, but it fired the alert actions anyway.

Code: Select all

3 10/18/2021 1:52:38.552 PM FrontCam             MOTION_A
3 10/18/2021 1:52:38.670 PM Rear_PTZ             MOTION_A
3 10/18/2021 1:52:38.851 PM Front_Cam_247       GROUP
0 10/18/2021 1:52:38.852 PM Driveway             DeepStack: person:60% [2032,325 2085,468] 480ms
0 10/18/2021 1:52:42.620 PM FrontCam             DeepStack: person:59% [872,295 932,436] 332ms
10 10/18/2021 1:52:42.910 PM Server               ::: Connected
0 10/18/2021 1:52:43.035 PM FrontCam             Push: OK to BIApp
0 10/18/2021 1:52:45.451 PM FrontCam             SMS: xxx@.google.com with 1 attachment/s
This has happened multiple times today. I am running on 5.5.1.12 (10/17/2021).

It's windy today. Is it possible that the alerts are happening because there are shadows moving in zone B even though the detected object is not in zone B?

I'm going to try to switch my alert actions from "=" to "All" with zones A and B checked. It seems like those should produce the same results.
:idea:
Current Issue

Based on his understanding and his settings he then explains the issue.
A few minutes ago this alert caused my alert action to fire...
The Alert screenshot and Logs clearly and concisely explained the issue with evidence. He closes with additional thoughts and possible tests.


Support Response
:!: Below is further correspondence regarding the ticket and final resolution if you are curious. (optional read)

Interesting. Good analysis.
It's windy today. Is it possible that the alerts are happening because there are shadows moving in zone B even though the detected object is not in zone B?
I think you are right. No where do you specify the object from A moved to B or vice versa (A-B). So BI (I think) is alerting because there is Motion in A and B and a person was detected somewhere (A or B, in this case A).

What are the requirements?
  • You want to create alerts in the clip list when person/vehicles are in A
  • However, you only want alerts when person/vehicle are in B
So break it down by requirement.
The first requirement is simple. Your current settings are fine, i.e. create a Zone A and turn on DeepStack.

The second part is a little tricky (and brittle). You need to approximate how much time would be needed for a person to walk to Zone B or park the car and walk to Zone B. Say it should happen in 10s.

In the alert action map, you need to create a wait action = 10s.
Then create the alert action (push,etc). The logic for the Push action would be B only.
I think this would prevent the person on the street from alerting.

Alternatively, you can clone the camera.
Use the camera for requirement 1, i.e. create no alerts.
For the clone, create the alert for people in Zone B.

Keep me posted what works.

FYI, I go through a similar example in the Trigger webinar at 42:13.
See Case Study: Creating Triggers -> Alerts section.

Final Resolution
After consulting with engineering, we realized the current functionality cannot support his use case.

The user 's Push Notification (from email):
DeepStack Alert_push.png
DeepStack Alert_push.png (11.2 KiB) Viewed 21111 times

After more back and forth, more details about the Push notification.
DeepStack Alert_push settings.png
DeepStack Alert_push settings.png (3.6 KiB) Viewed 21111 times
The user understood the Push settings to mean only fire an alert if there is motion in A and B AND a person is identified in A and B.
Currently, DeepStack object detection is independent of motion zones.
What that means for this case is if there is Motion in A and B, then the alert logic passes the motion test.
Then in the frame that is sent to DeepStack is there a person identified in the image?
The key understanding here is the object does NOT have to be in A and B.
The object only needs to be in the image.
Thus BI sent the alert because there was motion in A and B and a person was identified in the frame.

However, engineering is working to associate the object with the Zone.
So if the alert map stated B and person, the Alert would be sent correctly when a person was found in Zone B.
(Notice how sharing a screenshot of the settings associated to my description provides instant clarity. Exactly what user did as well)

DeepStack Alert_push settings fix.png
DeepStack Alert_push settings fix.png (3.71 KiB) Viewed 21111 times
Post Reply