Why isn't Deepstack correctly identifying cars?

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
That's correct. It didn't pick up either of the cars. The white truck was parked and the black SUV was moving.



Even at night?

That depends. Sometimes it will, sometimes it won't. Every situation, camera view, is different.

AI is not an exact science by any means and is not a plug and play application. You need to spend some time fooling with settings, both for motion detection and AI detection, with one camera to gain enough experience to be able to make adjustments to tune both for good detection. Also, remember that running a trigger through DeepStack after the fact does not necessarily reflect what happens in real time. It's more of a guide than an exact replication.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
495
Reaction score
79
Location
Australia
That depends. Sometimes it will, sometimes it won't. Every situation, camera view, is different.
Oh I just meant is it as good as the default recognition for night.

If I want to experiment with the exdark models, what are the names for the objects I should be using?
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
495
Reaction score
79
Location
Australia
Ok here's what I did:

  • In the AI tab of general settings, I unchecked 'Default object detection',
  • checked 'use custom model folder' and pointed it to the correct folder with the combined.pt & dark.pt files.
  • Set 'mode' to 'low'.

In each camera, I have two profiles. One for day and one for night.

In the day profile, I set the following in the 'artificial intelligence' settings:
  • To confirm: 'Person, cat, dog, car, bus,
  • To cancel: <nothing>
  • Custom Models: 'combined,dark:0'
  • Mark as vehicle: Car, bus

In the night profile, I set the following:
  • To confirm: 'People, Cat, Dog, Car, Bus,
  • To cancel: <nothing>
  • Custom Models: 'combined:0,dark'
  • Mark as vehicle: Car, bus

Here's my problem. The combined.pt file works really well during the day. I'm getting ~100ms analysis times and it seems to be really accurate.

However, as soon as the cameras switch to the night profile and it switches to the dark.pt models, the analysis times shoot through the roof. I'm getting ~3000ms+ on each snapshot.

At first I thought I hadn't set the custom models properly and it was analysing two different model sets, but nope! Looks like it's just going off the dark.pt models.

Any ideas?
1652515470184.png
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
The custom models should be "objects:0,combined,dark". That will insure objects, the default model, won't be used and will enable both combined and dark at night. You will need to add the objects for combined to the night profile.

Again, at night it gets very tricky achieving a balance of brightness, contrast and gain that let DeepStack successfully detect objects. Add in the bloom from headlights, even with HLLC set high or at maximum, and it gets to be a daunting process.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,429
Reaction score
47,550
Location
USA
And B/W with infrared becomes even more difficult to get it to work at night, especially along the edges of the field of view.
 

eeeeesh

BIT Beta Team
Joined
Jan 5, 2017
Messages
402
Reaction score
672
In that case confirm that in the settings you have it telling DeepStack to use the proper Zone and that the Zone is yellow up in that area.

If you are not using the whole field of view, then ideally, you should have Zone A be the whole field of view and then another Zone for just that area say Zone B and then tell DeepStack to analyze Zone B.

Provided all that is set up correctly, then it is a field of view issue and trying to do too much with one camera. Maybe tweaking some brightness and contrast may help, but the edge of images can be problematic.
I currently have all the zones checked for DeepStack. Should I change it to be just the one that includes the entire FOV (my Zone G)?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,429
Reaction score
47,550
Location
USA
I currently have all the zones checked for DeepStack. Should I change it to be just the one that includes the entire FOV (my Zone G)?
That is based on what you are trying to accomplish with the FOV. All checked doesn't hurt anything, but if you had a FOV where you only want part of the image to be used for analysis, then you would want to limit which ones.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
495
Reaction score
79
Location
Australia
The custom models should be "objects:0,combined,dark".
But as you can see, there's only one model used in the analysis. My understanding is that if I uncheck 'use default object detection' in the general AI settings, I won't have to type 'objects:0' in my cameras. Isn't this correct? Also, by s'wtiching on' both 'combined' and 'dark', aren't I essentially using both models 100% of the time?

You will need to add the objects for combined to the night profile.
What does this mean exactly? How do I do this?
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
DeepStack is case sensitive and punctuation sensitive. The objects in the dark model use a capital letter for the first letter of the object, IE "People" rather than "people". It makes a difference.

To be honest, I started with DeepStack when it was first integrated with BI and the only way to stop DS from using the default model was to use "objects:0". There may be a new feature that disables that globally that I never noticed and my BI machine died an ugly death on Friday so I can't go look at it right now.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
No, not really. I don't see any real differences with the two models. At night detection times do become longer simply because the contrast and brightness change making analysis a longer process. Typical daytime times are in the 50-100ms range versus 200-300ms at night. All that depends on views, lighting, contrast and brightness. There is no magic formula that I am aware of.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
495
Reaction score
79
Location
Australia
Yeah except I highly doubt that any amount of brightness/contrast disparity could possibly lead to analysis times of 2000ms+.
Either I'm doing something wrong, or there is something wrong with my BI install/machine.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
Try dropping back the version of DeepStack one version if you're running the latest release. That may help. I had to do that to get reasonable detection times. I don't remember offhand what the dates are and like I said the BI machine is DOA at the moment so I can't check it for you.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
Just got another of my cameras doing the same thing. The motion detection has clearly triggered (and motion is shown by the yellow trailing area) and this time, DS has identified a parked car in my driveway, however the old woman walking very slowly just behind it is ignored. She isn't even detected as a valid object.

View attachment 127936
I was just looking back in the thread and looked at this one a little more closely. The pedestrian in the background is relatively small compared to the vehicle and is out of focus or so far away that sharpness is greatly reduced. Either way, focus or sharpness, it's just not good enough for DS to get a solid analysis in real time. See if you can improve the quality of the background focus by adjusting the camera. Again, remember that DeepStack uses a static image, not a moving video image, for analysis.

If you're not already saving DeepStack analysis details for each capture, start doing so. It will provide some better insight into what is going on, real time, versus running video through analysis after the fact.
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
Any other ideas why the dark models specifically take way too long to analyze?
You may want to try the custom model in this thread:

The classes are not in english, but it is by far the best custom model I have found so far.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
495
Reaction score
79
Location
Australia
The classes are not in english, but it is by far the best custom model I have found so far.
Looks like a few people are reporting that half the time, the model doesn't detect anything. Is that your experience also?
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
Looks like a few people are reporting that half the time, the model doesn't detect anything. Is that your experience also?
Nope, the only issue I’ve had is that it doesn’t work with my LPR camera at night.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,429
Reaction score
47,550
Location
USA
I wouldn't expect it to work for LPR unless you have enough light that it can make out the car.

All my LPR sees is head/tail lights and the plate, so a custom model would need to be made/used for that.
 

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
495
Reaction score
79
Location
Australia
Can anyone tell me why my DS alerts from a particular camera at night all read 'occupied'?

1653053094593.png

There is clearly a person in the top left of the frame, moving from left to right, and yet the only thing that the .dat file shows is that it detected my bbq (which it labelled 'chair'). Keep in mind I have it only set to detect People and Cats (using dark.pt). Clearly, there's no issue with the motion detection, as it successfully triggers the camera. DS is just choosing not to detect it, and is detecting irrelevant static objects instead.

Here's the log.

1653053159932.png

Could this just be a problem with the dark.pt file giving me long analysis times (which I'm still yet to figure out why, since combined.pt gives ~150ms most of the time)? Or is there anything else I can try?
 
Top