Motion detection rectangle orange vs yellow and actual trigger time

mikeL-

n3wb
Joined
Mar 8, 2021
Messages
2
Reaction score
2
Location
USA
Hello,
I was hoping somebody here might reply sooner than BI support. :)

I am trying to tune motion detection trigger and CPAI is disabled for now. The goal is to reduce the number of detection requests sent to CPAI.
Motion detection is enabled as the only trigger source. I am playing with "Min Obj Size" and "Min contrast". Object detection in Motion Sensor settings is enabled and I am also changing "Object travels" value.
"Tuning & Testing --> Analyze with motion detector" is also enabled.
When I play recorded clips, I see yellow and orange rectangles around moving objects. Mostly yellow rectangles and sometimes they turn orange.
1) What does the color mean?
Maybe orange means all detection requirements are met? i.e. size and contrast and travel distance and min duration are above threshold? Does orange rectangle mean it would trigger if it was live?
And yellow probably means some requirements are met, but not all? Maybe size and contrast are ok, but not travel distamce...
yellow.JPG
orange.JPG



A few more questions...

2) Does motion detector automatically operate on substream (when available) ? I don't see a setting for stream type.
During playback I can choose between main and sub stream, but not sure about normal live operation.

3) What are the units for "Min Obj size" in motion detector settings? I thought they are pixels, but not sure.
Please see the picture. Max possible value for me is 1100 and corresponding blue rectangle takes about 80% of the image.
I am guessing full image width would be about 1400-1500, but it does not match either main stream (2560x1440) or substream (704 x 576).
1450 pixels would match a diagonal of 1280x720 image, but I do not have a substream of that resolution.
MinObjSize_1100.JPG


4) Anybody uses Dahua camera ONVF triggers (instead of BI Motion Detector) to start CPAI detection?


Thanks!
Mike
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,141
Reaction score
49,011
Location
USA
You are correct on what the color means.

The corresponding rectangle you are showing above that is about 80% is because you have under object detection to RESET WHEN THE OBJECT IS xx%. Uncheck that box as that is only used to eliminate false triggers, but with AI, it really isn't needed now.

Regarding object size and the number, it really doesn't matter what the units are as every field of view is different. Simply draw a box the minimum size of the object you want it to trigger on.

Regarding Dahua IVS, whether to use BI AI is up to you, but of course, the AI in the camera may be more than sufficient for your needs without needing CPAI. Do you need the orange box around every object? Do you want to identify animals or logos? Or is just human or vehicle sufficient.

The camera AI is useful to many people, but BI has way more motion setting granularity than the cameras, and some people need that additional detail, especially if wanting AI for more than a car or person. For folks that want AI and alerts on animals or specifically a UPS truck then they need the additional AI.

There isn't really a best practice because every field of view is different and use case and needs are different.

To many here, BI motion without AI is more than adequate for what they do.

To many here, camera AI is more than adequate for what they do.

To many here, using the BI AI adds additional functionality that the above alone can not do.

It comes down to testing with each field of view and which one gives you the most consistent results.

If you decide to go with the camera AI, then set up the IVS rules within the camera and let it do its thing!

Go into the camera and set up smart plan with IVS, then go to the IVS screen and draw IVS rules (tripwire or intrusion box) and then select the AI you want it to trigger on (human or vehicle).

Then in BI, there are a few places you need to set this up in BI (assuming you already set up the IVS rules in the camera GUI):

In Camera configure setting check the box "Get ONVIF triggers".

Hit Find/Inspect on the camera setting to pull the coding for the triggers.

Go into Motion Setting and select the "Cameras digital input" box.

On the Alerts tab uncheck the Motions Zones tab (those are alerting you to any BI motion in those areas in Zones A thru H)

On the alerts tab set up how to be notified.


While some of that third party stuff is cool like tagging was it a dog or a bear, I don't need all that fancy stuff. If my camera triggers BI to tag an alert for human or vehicle and BI can accomplish what I need by way of a text or email or push or whatever, that is sufficient for my needs. I just want to be alerted if a person or vehicle is on my property and the camera AI does a fine job with that.

However, I do run BI AI on one camera so that it knocks out headlight shine so that the alert image includes the vehicle. The camera AI will trigger for a car, but the alert image was always just the headlights.

The true test....I have found the AI of the cameras to work even in a freakin blizzard....imagine how much the CPU would be maxing out sending all the snow pictures for analysis to CodeProject LOL. My non-AI cams in BI were triggering all night. This picture was ran through Deepstack (without the IVS or red lines on it) and it failed to recognize a person in the picture, but the camera AI did. This pic says it all and the video had the red box over it even in complete white out on the screen:

1679354257954.png


See this thread on how using just Dahua AI may be sufficient for your needs:

Who uses Dahua AI capable cameras? Reliable AI for triggering events? Pro's/con's?
 
Last edited:

mikeL-

n3wb
Joined
Mar 8, 2021
Messages
2
Reaction score
2
Location
USA
You are correct on what the color means.

The corresponding rectangle you are showing above that is about 80% is because you have under object detection to RESET WHEN THE OBJECT IS xx%. Uncheck that box as that is only used to eliminate false triggers, but with AI, it really isn't needed now.

Regarding object size and the number, it really doesn't matter what the units are as every field of view is different. Simply draw a box the minimum size of the object you want it to trigger on.

Regarding Dahua IVS, whether to use BI AI is up to you, but of course, the AI in the camera may be more than sufficient for your needs without needing CPAI. Do you need the orange box around every object? Do you want to identify animals or logos? Or is just human or vehicle sufficient.

The camera AI is useful to many people, but BI has way more motion setting granularity than the cameras, and some people need that additional detail, especially if wanting AI for more than a car or person. For folks that want AI and alerts on animals or specifically a UPS truck then they need the additional AI.

There isn't really a best practice because every field of view is different and use case and needs are different.

To many here, BI motion without AI is more than adequate for what they do.

To many here, camera AI is more than adequate for what they do.

To many here, using the BI AI adds additional functionality that the above alone can not do.

It comes down to testing with each field of view and which one gives you the most consistent results.

If you decide to go with the camera AI, then set up the IVS rules within the camera and let it do its thing!

Go into the camera and set up smart plan with IVS, then go to the IVS screen and draw IVS rules (tripwire or intrusion box) and then select the AI you want it to trigger on (human or vehicle).

Then in BI, there are a few places you need to set this up in BI (assuming you already set up the IVS rules in the camera GUI):

In Camera configure setting check the box "Get ONVIF triggers".

Hit Find/Inspect on the camera setting to pull the coding for the triggers.

Go into Motion Setting and select the "Cameras digital input" box.

On the Alerts tab uncheck the Motions Zones tab (those are alerting you to any BI motion in those areas in Zones A thru H)

On the alerts tab set up how to be notified.


While some of that third party stuff is cool like tagging was it a dog or a bear, I don't need all that fancy stuff. If my camera triggers BI to tag an alert for human or vehicle and BI can accomplish what I need by way of a text or email or push or whatever, that is sufficient for my needs. I just want to be alerted if a person or vehicle is on my property and the camera AI does a fine job with that.

However, I do run BI AI on one camera so that it knocks out headlight shine so that the alert image includes the vehicle. The camera AI will trigger for a car, but the alert image was always just the headlights.

The true test....I have found the AI of the cameras to work even in a freakin blizzard....imagine how much the CPU would be maxing out sending all the snow pictures for analysis to CodeProject LOL. My non-AI cams in BI were triggering all night. This picture was ran through Deepstack (without the IVS or red lines on it) and it failed to recognize a person in the picture, but the camera AI did. This pic says it all and the video had the red box over it even in complete white out on the screen:

1679354257954.png


See this thread on how using just Dahua AI may be sufficient for your needs:

Who uses Dahua AI capable cameras? Reliable AI for triggering events? Pro's/con's?
Thank you for the detailed response!

I have been using BI with 10-15 Dahua cameras for a couple of years. I record 4mp main streams from all of them 24/7 and some of them are setup to use IVS and trigger BI alerts.
I never used BI motion detector or AI on PC. After some hardware upgrades I have an extra PC with i9-9900k + Nvidia RTX 2070 which is much more powerful than my old 4-core BI PC and I decided to try CPAI. Dahua IVS is usually enough for my needs and I plan to keep using it for human and vehicle detection on some cameras. In addition, I have a couple of projects that would be easier to do with CPAI. For example, detection of birds and raccoons in the backyard and controlling directional water sprinklers to scare them away from my small KOI fish pond.
So far CPAI is working OK. Detection accuracy for animals is not great, but it works. It often says my cats are actually birds or dogs, but that is better than not detecting at all. I would prefer not to spray my cats with water, but they will survive. Detecting herons eating my fish is more important.
Detection times with new hardware is good. I see mostly 20ms to 40ms reported in CPAI log. But I still want to reduce the number of false detection requests. i.e. filter out some motion in BI motion detector. If I run 10 cameras on CPAI, I am afraid it might be too much for CPAI if they all send multiple requests at the same time. Not sure how good CPAI is with parallel request processing.
In some areas I have a lot of tree shadows and crazy amount of motion noise in windy conditions. I don't think it is possible for BI motion detector to filter out the shadows and keep detecting small animals reliably, but I want to find the best possible settings. There are no shadows near the pond, but I am intentionally testing detection in most complicated areas with trees. Just to know the limits.
I will need to test different custom models and see if there is a difference between "ipcam-combined" and "animal" and number of objects types specified for detection. For now I am just learning and tuning BI motion detector.

IVS detection you described is amazing. I will run CPAI and IVS detection in parallel at some point and try to compare performance.
 
Top