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

CamCrazy

Pulling my weight
Joined
Aug 23, 2017
Messages
378
Reaction score
169
Location
UK
I finally got the GTX 1660 installed along with a WD Purple Pro, the latter is a bit noisier than I had hoped, that is off topic though! Anyway, after some teething troubles setting up Deepstack GPU and it not starting with Blue Iris, I've got some very initial impressions. I believe High mode in Deepstack seems not so good at night, Medium is where I am at now. Processing time is quicker, a lot quicker in the day. Night processing is quite long but I had '+ real-time images' set to 15-30 and accuracy seems significantly better than when using the CPU processing.

Also observed that Blue Iris doesn't seem to show the deepstack processing activity so much in the alert list now, they just appear, assume this is a speed thing. Also my alert list doesn't auto scroll to the top which is annoying, not sure if this is Deepstack GPU related or Blue Iris. Update, it seems you need to have the 'Now' option toggled on Blue Iris timeline for this to work, I am sure previously it defaulted to this even after playing an alert clip, unsure if this is by design or not - annoying since previously never gave it a second thought.

GPU spikes to 20-30% briefly when 3-4 cameras get triggered at once, CPU spikes to 50-60% briefly presumably processing the motion. Previously using CPU for Deepstack the processor would spike right to 100% and sit there causing processing issues with I assume Deepstack and motion in Blue Iris.

All in all some good results, I might play with pushing the '+ real-time images' up during the day and check the results, during the night when using custom model the processing times are up in the 1000's potentially, during the day with above settings they are always very low 100's. Will see how things progress, oh and that Purple Pro drive does sing a bit when spun up but then I should've seen that coming :facepalm:
 
Last edited:

dimammx

Young grasshopper
Joined
Apr 9, 2015
Messages
56
Reaction score
23
Are you guys able to run default objects detection and exDark models at the same time, it seams like when i enable default objects and custom model folder that has exDark model. Deepstack just crashes, i get error -1, and 100 in blueIris. I tried running deepstack outside of BI using
"deepstack --VISION-DETECTION True --MODELSTORE-DETECTION "C:/DeepStack/models" --MODE High -PORT 8111" But it shows no activity in shell window when exDark model is in custom model folder.
Any Ideas?
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
7,261
Reaction score
11,383
Location
USA
Yes you can run both at the same time if you have a fast enough machine.

The dark model needs to be in it's own separate folder.

The 100 is a timed out error.

Go into the logs and see what your ms times were prior to running the dark model.

Also, most have found that a reboot of the computer once adding the custom model does wonders to get it to work.
 

dimammx

Young grasshopper
Joined
Apr 9, 2015
Messages
56
Reaction score
23
With just objects and license_plate model i average 150ms (for running objects and lp 70+80 ) when i get 100 error it is 14400+ and nothing ever gets processed.
I run GPU version of deepstack on GTX970
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
7,261
Reaction score
11,383
Location
USA
OK, that is a decent time, except for the ones that are timing out.

Post some screenshots of your settings. Something isn't right.
 

dimammx

Young grasshopper
Joined
Apr 9, 2015
Messages
56
Reaction score
23
So right now i run it like this "deepstack --VISION-DETECTION True --MODELSTORE-DETECTION "C:/DeepStack/models" --MODE High --PORT 8111" in power shell for more visibility with following BI settings.
If i only keep license_plate model in custom model folder it works just fine. Same way when running deepstack in BI, i can have custom model and default objects only when exDark model is removed from folder, or i can run custom models with exDark model present but "default objects detection" box has to be un checked in BI.
camera_ai.PNG
general_bi_ai.PNG
folder.PNG
powershell.PNG
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
7,261
Reaction score
11,383
Location
USA
OK, some have experienced that trying to run images through more than one custom model times out.

So under custom models box above under AI, put in the ones that are not license plate cams license_plate:0 and for the camera that is for plates, put in dark:0

The :0 tells BI not to use that model, so see if it runs then.

You may also wanna try going down from high and go to med or low. Many of us have found comparable % running LOW. Of course your field of view helps determine that.

Many have found that unchecking the use mainstream provides significant performance enhancements as well (and for many it appears needs to be unchecked to have it analyze more than 3 images).
 
Last edited:

dimammx

Young grasshopper
Joined
Apr 9, 2015
Messages
56
Reaction score
23
OK, some have experienced that trying to run images through more than one custom folder times out.

So under custom models box above under AI, put in the ones that are not license plate cams license_plate:0 and for the camera that is for plates, put in dark:0

The :0 tells BI not to use that model, so see if it runs then.

You may also wanna try going down from high and go to med or low. Many of us have found comparable % running LOW. Of course your field of view helps determine that.

Many have found that unchecking the use mainstream provides significant performance enhancements as well (and for many it appears needs to be unchecked to have it analyze more than 3 images).
You are on to something, i tried to do the opposite, i removed license_plate model, and ran exDark with Default objects and it worked just fine, so I think it is a number of models that causes the issue. As I also mentioned I can run 2custom models( exDark, licens_plates) and NO Default object just fine.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
7,261
Reaction score
11,383
Location
USA
I have found that the dark model produces a higher percentage than the default objects even during the day, so I would say if you see something similar, then run with the NO default!

I tried to get the license_plate model to work and never could - do you have a similar field of view to the creator of that model? Or did you have some trick you needed to do to get it to work? What is in your to confirm box? Maybe post a screenshot of that AI menu.
 

dimammx

Young grasshopper
Joined
Apr 9, 2015
Messages
56
Reaction score
23
I have found that the dark model produces a higher percentage than the default objects even during the day, so I would say if you see something similar, then run with the NO default!

I tried to get the license_plate model to work and never could - do you have a similar field of view to the creator of that model? Or did you have some trick you needed to do to get it to work? What is in your to confirm box? Maybe post a screenshot of that AI menu.
If by "get it to work" you mean to detect plates than sadly no :( ; I do have 2 cams for LPR and one kind of matches the angle but field of view is wider. So far no reliable detection, i am thinking of training my own model based on images from my cams. Otherwise this happens ::rofl: btw not from LPR camera
funny_lpr.PNG
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
7,261
Reaction score
11,383
Location
USA
That's funny lol.

Yeah I may create a custom model as well.
 

Ronron

n3wb
Joined
Oct 29, 2021
Messages
1
Reaction score
0
Location
Hungary
There is something wrong with the way the "Custom models" field works at camera settings.

You wrote "object:0" as a parameter, in my experience such a parameter doesn't work, only "objects:0". Try it;)

If I enable the "Use custom models folder" in the "AI settings" tab and copy the "dark.pt" file into the appropriate folder, the "Custom models" field works for me as shown in the following way:

  • I just type "objects" - in this case it only uses the basic daylight algorithm. dark:0 switch doesn't work, no effect. Just typing "objects", turns off the use of "dark.pt". (according to documentation this is not how it should work)"
  • I leave the "Custom models" field empty, then both the daytime "objects" and the night-time "dark" analysis run
  • if I type "objects:0,dark", only the "dark" night analysis runs. If I just type "objects:0" without the "dark" parameter, then no analysis will run. Try it out!
Is something completely misunderstood, or do these parameters really work in such an illogical way? (and not as the documentation refers to it) Help me! :)



Here's what I've done:
Enabled face recognition
Enabled 'dark' in MyModels
Using High mode

Put people in the to confirm box, removed person from that box, placed dark in the models box...BI reported People in the thumbnail image after I went out and triggered the camera. (People or people both worked. However, no red icon of a person in the thumbnail...seems to only be present when person is reported.

Using the exact same configuration with the understanding that putting dark in the custom models box forces BI to only use that model, I put person in the to cancel box and triggered the camera...nothing. BI canceled the alert. BI must still be using the default model even though using dark by itself should force BI to only use that model. The default model seems to take precedence over any custom models. So I took it another step...

I put people in the confirm box and put dark,object:0,face:0,faces:0,yolov5m:0,scene:0 in the custom models...triggered, alerted, People reported (I used lowercase p for people). With identical settings, I added person to the cancel box, no alert after triggering, overriding the dark model.

Face recognition and the dark model don't seem to conflict in this BI version.

I haven't tried logos so I don't know if it works or causes the quick flashing of burn boxes during analysis of video playback.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
7,261
Reaction score
11,383
Location
USA
Went from 5.5.1.6 to latest version and the "objects:dark:0" type statements no longer work. Gonna try the method above next.
 

wittaj

Known around here
Joined
Apr 28, 2019
Messages
7,261
Reaction score
11,383
Location
USA
yep not working here either.

Weird thing is in the DS tab that shows which pictures it sent, it clearly labels it a person yet doesn't tag it. Putting together a file now to send to BI.
 

105437

BIT Beta Team
Joined
Jun 8, 2015
Messages
1,353
Reaction score
400
yep not working here either.

Weird thing is in the DS tab that shows which pictures it sent, it clearly labels it a person yet doesn't tag it. Putting together a file now to send to BI.
I sent a request this morning showing how this didn't work and asked for the best way to configure the regular objects model only for daytime profile and the dark model only for night profile.

Hopefully, we'll get a response and fix soon.
 
Top