5.4.7 - May 25, 2021 - Support for DeepStack custom model files

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,133
Reaction score
1,242
Location
SF Bay Area
Just received an email from Ken that 5.4.7.7 (today) will enable toggling of DeepStack models by profile and/or schedule. Yea!

Edit: I emailed him Sunday just to inquire if this was on his roadmap.
 
Last edited:

m_listed

Getting the hang of it
Joined
Jun 11, 2016
Messages
176
Reaction score
57
Was informed by Ken that 5.4.7.7 will only check the Face endpoint if it detects a person, meaning DeepStack CPU usage should be cut down by up to half for most alerts. Interested in how he'll implement it (re-check the same image for a Face if it has a Person in it, or only check future images from the same trigger?).
 

m_listed

Getting the hang of it
Joined
Jun 11, 2016
Messages
176
Reaction score
57
One of the new 5.4.7.x releases added a feature where your app push notification attachment image sizes are set in a more sane manner, and also gives you the ability to switch the size between "Autosize", "960x480", and "480x480" in order to avoid the hated black bars on top of or along the sides of the alert images. I wish there was an option to have it just size to whatever the native resolution aspect ratio is, which works for iOS but apparently Android can't handle notification images besides these two aspect ratios of 2:1 and 1:1, so Ken seems to have used the lowest common denominator of Android to avoid having to detect phone types.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,004
Reaction score
48,765
Location
USA
I have mentioned this in the other threads, but thought I should mention it here as well.

For me, from 5.4.7.0 and forward, DeepStack isn't working for me. I rollback to 5.4.6.3 and all is good again.

Something else I noticed with the most recent updates is this menu, the alert lightning bolt stays orange all the time, and since DS isn't working, none of my cameras using DS will show it triggered, even for the cancelled alerts unless I go to that folder.

1622679533838.png

If I rollback, the lightning bolt goes back to grey/white and the camera will keep the trigger lightning bolt in the top right corner of the camera frame until I select it.

Is anyone else seeing that behavior? It was nice to be able to simply log in in the morning and see quickly which cameras had a trigger and now that isn't the case unless I rollback.

And my ONVIF trigger isn't working anymore.
 
Last edited:

beepsilver

Getting comfortable
Joined
Mar 9, 2014
Messages
863
Reaction score
982
Location
Nebraska
Now that we're able to differentiate custom models by Blue Iris profile, how do we make it work so we don't get "people" and "person" in the analysis?

Having BI point to C:\Deepstack\MyModels where the custom model 'dark.pt' is stored results in proper analysis alongside Deepstack's default model...this without having to specify 'dark' in camera properties/Artificial Intelligence.

Thinking out loud here, if a person uses two BI profiles, profile one for day and profile two for night, 'dark' should be entered in profile two under the custom model location. How then do we prevent Deepstack's default model(s) from interacting?
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,133
Reaction score
1,242
Location
SF Bay Area
Now that we're able to differentiate custom models by Blue Iris profile, how do we make it work so we don't get "people" and "person" in the analysis?

Having BI point to C:\Deepstack\MyModels where the custom model 'dark.pt' is stored results in proper analysis alongside Deepstack's default model...this without having to specify 'dark' in camera properties/Artificial Intelligence.

Thinking out loud here, if a person uses two BI profiles, profile one for day and profile two for night, 'dark' should be entered in profile two under the custom model location. How then do we prevent Deepstack's default model(s) from interacting?
I had similar questions and have sent them to Ken. Personally I’d like to have finer control of which of the following model(s) are active per camera profile... the default 'objects' model, the optional 'faces' model, and each of the 'custom' models in the MyModels folder.
 
Last edited:

Gary R.

Young grasshopper
Joined
Aug 6, 2017
Messages
48
Reaction score
11
Okay, after suffering 16 hours of FIOS being down, I got on here this morning and have reread everything twice I think. I didn't realize until I looked that I needed to ADD the My Models folder to my drive, I thought that BI already did that. So after doing that, I added three .PT files to it to test out. Still getting the log file entry that DeepStack Alert canceled nothing found, after I rebooted the computer. I remember reading something about training? Also, I was under the impression that BI ran everything, but do I need to run some code with DEEPSTACK to have it see the PT files, or whatever? Do I need to add the PT files to the custom models for the camera's. I think I am close, any help would be greatly appreciated.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,004
Reaction score
48,765
Location
USA
Okay, after suffering 16 hours of FIOS being down, I got on here this morning and have reread everything twice I think. I didn't realize until I looked that I needed to ADD the My Models folder to my drive, I thought that BI already did that. So after doing that, I added three .PT files to it to test out. Still getting the log file entry that DeepStack Alert canceled nothing found, after I rebooted the computer. I remember reading something about training? Also, I was under the impression that BI ran everything, but do I need to run some code with DEEPSTACK to have it see the PT files, or whatever? Do I need to add the PT files to the custom models for the camera's. I think I am close, any help would be greatly appreciated.
BI runs it all. A version a few back, folks would put the custom model in the sharedfiles directory. It was hit or miss for people - it worked for some and not others. They do not work in my case for some reason.

The MyModels directory was then added to move the custom models to its own directory.

The 5.4.7.7 version allows you to specify which custom models to use on a per camera basis (or in profiles on a per camera basis). This to is hit or miss for some people.

You do not have to do any training unless you are creating your own custom model. That would be done outside of BI and when complete, you would simply add that .PT model to the MyModels directory.

So after you download the DeepStack for CPU and run the executable, then go into BI main settings (gear top left) and go to AI and check for it to use DeepStack, your custom models directory, if you want faces, and then if it says start now, select it.

If it says stop, that means it is running and it has a test button that will open up a browser and a screen will pop up that says activated if it is working.

Then you go to each camera you want to use DeepStack and go to trigger and then AI and then turn Deepstack on and set up the parameters you want to use - how many images are sent to DS, interval for those pics, confidence level, and if you want to force it to use a custom model. Select burn images if you want to see the AI rectangles around objects in your clips.

Then watch and see if it works.

For many people it works great on latest version. For some reason mine isn't working, but as soon as I rollback to the latest critical version, it all works again and I haven't changed a thing.

So if yours isn't working, rollback to the latest stable BI version and it should work then.
 

Gary R.

Young grasshopper
Joined
Aug 6, 2017
Messages
48
Reaction score
11
BI runs it all. A version a few back, folks would put the custom model in the sharedfiles directory. It was hit or miss for people - it worked for some and not others. They do not work in my case for some reason.

The MyModels directory was then added to move the custom models to its own directory.

The 5.4.7.7 version allows you to specify which custom models to use on a per camera basis (or in profiles on a per camera basis). This to is hit or miss for some people.

You do not have to do any training unless you are creating your own custom model. That would be done outside of BI and when complete, you would simply add that .PT model to the MyModels directory.

So after you download the DeepStack for CPU and run the executable, then go into BI main settings (gear top left) and go to AI and check for it to use DeepStack, your custom models directory, if you want faces, and then if it says start now, select it.

If it says stop, that means it is running and it has a test button that will open up a browser and a screen will pop up that says activated if it is working.

Then you go to each camera you want to use DeepStack and go to trigger and then AI and then turn Deepstack on and set up the parameters you want to use - how many images are sent to DS, interval for those pics, confidence level, and if you want to force it to use a custom model. Select burn images if you want to see the AI rectangles around objects in your clips.

Then watch and see if it works.

For many people it works great on latest version. For some reason mine isn't working, but as soon as I rollback to the latest critical version, it all works again and I haven't changed a thing.

So if yours isn't working, rollback to the latest stable BI version and it should work then.

I keep getting the log file entry Nothing found. Annoying. The camera's trigger when I have DeepStack turned off. Why do I want to use this again. LOL. How many real time images do you send, and how many seconds do you have setup. I went back one rollback. Didn't help.
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,004
Reaction score
48,765
Location
USA
I do 10 and 1 second intervals.

If yours are not working, go back to the latest critical and stable update and it should start working for you.
 

Gary R.

Young grasshopper
Joined
Aug 6, 2017
Messages
48
Reaction score
11
I do 10 and 1 second intervals.

If yours are not working, go back to the latest critical and stable update and it should start working for you.
So I went back to the most stable as you recommended. I started getting the alerts, but the log still said nothing found. What am I missing?
 

kc8tmv

Getting the hang of it
Joined
May 27, 2017
Messages
177
Reaction score
82
Location
Cincinnati, Ohio
Did you try adding a SMS or Email alert with &JSON in it to see the full JSON message? This helped me in troubleshooting.
 

Gary R.

Young grasshopper
Joined
Aug 6, 2017
Messages
48
Reaction score
11
Did you try adding a SMS or Email alert with &JSON in it to see the full JSON message? This helped me in troubleshooting.
Well, the alerts are not working again. Must have been lag time between starting the server, etc back up. I setup an email alert, but what is &JSON?

I will get emails with pictures of the car or truck going by, just not the alerts. Weird.
 
Last edited:

kc8tmv

Getting the hang of it
Joined
May 27, 2017
Messages
177
Reaction score
82
Location
Cincinnati, Ohio
The &JSON will send you something that looks like this:
You can see WHICH models it is hitting. "objects" = build in DeepStack, "faces" = facial reccognition, "dark" = ExDark model

[{"api":"objects","found":{"success":true,"predictions":[{"confidence":0.87821174,"label":"person","y_min":1429,"x_min":1,"y_max":2301,"x_max":594}]}},
{"api":"faces","found":{"success":true,"predictions":[]}},
{"api":"dark","found":{"success":true,"predictions":[{"confidence":0.8619002,"label":"People","y_min":1412,"x_min":16,"y_max":2304,"x_max":637}]}}]
 

Gary R.

Young grasshopper
Joined
Aug 6, 2017
Messages
48
Reaction score
11
The &JSON will send you something that looks like this:
You can see WHICH models it is hitting. "objects" = build in DeepStack, "faces" = facial reccognition, "dark" = ExDark model

[{"api":"objects","found":{"success":true,"predictions":[{"confidence":0.87821174,"label":"person","y_min":1429,"x_min":1,"y_max":2301,"x_max":594}]}},
{"api":"faces","found":{"success":true,"predictions":[]}},
{"api":"dark","found":{"success":true,"predictions":[{"confidence":0.8619002,"label":"People","y_min":1412,"x_min":16,"y_max":2304,"x_max":637}]}}]
I started over and uninstalled the DEEPSTACK program. I an not sure it came up right after I reinstalled it. Just came up with a black screen, and had no configuration for what I wanted, like ports, etc. That's the CPU version, I had the other version installed before. Rebooting everything. NADA. When I do the test in browser, it pulls up a page at that port number. Sounds like it should be working.
 

Gary R.

Young grasshopper
Joined
Aug 6, 2017
Messages
48
Reaction score
11
I started over and uninstalled the DEEPSTACK program. I an not sure it came up right after I reinstalled it. Just came up with a black screen, and had no configuration for what I wanted, like ports, etc. That's the CPU version, I had the other version installed before. Rebooting everything. NADA. When I do the test in browser, it pulls up a page at that port number. Sounds like it should be working.
I think it started working, I got this email with a truck highlighted.
 

Attachments

105437

BIT Beta Team
Joined
Jun 8, 2015
Messages
2,046
Reaction score
951
I have mentioned this in the other threads, but thought I should mention it here as well.

For me, from 5.4.7.0 and forward, DeepStack isn't working for me. I rollback to 5.4.6.3 and all is good again.

Something else I noticed with the most recent updates is this menu, the alert lightning bolt stays orange all the time, and since DS isn't working, none of my cameras using DS will show it triggered, even for the cancelled alerts unless I go to that folder.

View attachment 91334

If I rollback, the lightning bolt goes back to grey/white and the camera will keep the trigger lightning bolt in the top right corner of the camera frame until I select it.

Is anyone else seeing that behavior? It was nice to be able to simply log in in the morning and see quickly which cameras had a trigger and now that isn't the case unless I rollback.

And my ONVIF trigger isn't working anymore.
I'm on the latest version, my lightning bolt stays orange but everything as far as BI and Deepstack are working as expected.
 
Top