Hell Yeah! Direct Deepstack Integration - 5.4.0 - March 31, 2021

I just realised I didn't have an "=" before True in my command. Just ran it again with that and the CMD returned the following -
-----------------------------------------
DeepStack: Version 2021.02.1
flag provided but not defined: -Port
Usage of deepstack:
-ADMIN-KEY string
admin key to secure admin endpoints
-API-KEY string
api key to secure endpoints
-MODE string
performance mode (default "Medium")
-MODELSTORE-DETECTION string
path to custom detection models (default "/modelstore/detection/")
-PORT int
port (default 5000)
-TIMEOUT float
request timeout in seconds (default 60)
-VISION-DETECTION string
enable object detection
-VISION-FACE string
enable face detection
-VISION-SCENE string
enable scene recognition
-----------------------------------------------
Will keep playing with it in the morning - 2am here time for sleep.
Thanks for your help.
Looks like you are almost there. That error indicates something is wrong with the --port flag.
 
Looks like you are almost there. That error indicates something is wrong with the --port flag.
Wholy crap! Might have it - "PORT" supposed to be in all caps. Maybe? Got this now -

-------------
DeepStack: Version 2021.02.1
/v1/vision/detection
---------------------------------------
---------------------------------------
v1/backup
---------------------------------------
v1/restore
 
I am getting the you do not have permissions to install deepstack cpudeepstack.PNG
 
Last edited:
Wholy crap! Might have it - "PORT" supposed to be in all caps. Maybe? Got this now -

-------------
DeepStack: Version 2021.02.1
/v1/vision/detection
---------------------------------------
---------------------------------------
v1/backup
---------------------------------------
v1/restore
That looks how it should for Object Detection, which is the API BI is using currently :)
 
  • Like
Reactions: sebastiantombs
This is great stuff! I really appreciate it.

I have one question though... When an alert occurs, I have set up BI to publish a MQTT message. I would like to use the DeepStack "detection text" or whatever it's called, e.g. "person:82%, cat :46%" as the MQTT message payload. It would be easy if there was a macro (variable text that is substituted based on context) holding that specific value (like the &PLATE macro containing the license plate captured with ALPR if configured) but I haven't found an entry for that in the documentation yet. Any ideas?
 
  • Like
Reactions: hikky_b and JNDATHP
Wow, seems like more addon coming.

5.4.1.0 DeepStack facial recognition, DeepStack object classification, UI3 update, Many other minor updates and fixes.

Installing the update now.

1617479184231.png


5.4.1 - April 3, 2021
Support for DeepStack facial recognition. Maintain the face list from the AI page in
Settings.
Alerts may now be cancelled with specific DeepStack labels. It’s now possible to Alert only
when “unknown” faces appear or only when there is NOT a dog present, etc.
 
Last edited:
Wow, seems like more addon coming.

5.4.1.0 DeepStack facial recognition, DeepStack object classification, UI3 update, Many other minor updates and fixes.

Installing the update now.

View attachment 86049


5.4.1 - April 3, 2021
Support for DeepStack facial recognition. Maintain the face list from the AI page in
Settings.
Alerts may now be cancelled with specific DeepStack labels. It’s now possible to Alert only
when “unknown” faces appear or only when there is NOT a dog present, etc.
I'm continuously having a camera that sees the same thing another does just further away say "nothing found" and before the update it would be under cancelled alerts when I clearly see a car or a person pass in the video. The other camera with a similar view that's closer to the street always alerts. I tried the gpu version and switched to the cpu version with the same results. The camera in question successfully alerted once and is continuously not being confirmed. After the update both cameras alerts are now being cancelled for some reason as I'm looking at it live I see people walking by and cars driving in broad daylight and it says nothing found.
 
So far it seems like, You have to add manually the faces jpg under AI and faces. Add only way I think to add is for me was to create a folder under C:\Program Files\Blue Iris 5

Called "Faces" Then Add the faces there and label I am guessing. Now it be nice if DeepStack can Create the faces library once it see one automatically. Again do not see much documentation yet at least if this is how it works.
 
What are you talking about? That is simply a false statement. Blue iris is very stable. I have over 20 machines with BI that run rock solid. The crashing that some users report is often related to using an intel driver with a memory leak or user error or those who install a new release before its marked as stable. You need to understand that there a many thousands of blue iris users. Probably well over 100k. If a handful of users report an issue on a user forum its not something to be "concerned" about.


That's good to hear. I was concerned because in a recent thread a user mentioned that there were a lot of reboots in the logs and some established members on here has said it wasn't unusual for BI to restart. If it's the case that it's not an issue then great news. BI is on my shopping list.
 
  • Like
Reactions: fenderman
I'm continuously having a camera that sees the same thing another does just further away say "nothing found" and before the update it would be under cancelled alerts when I clearly see a car or a person pass in the video. The other camera with a similar view that's closer to the street always alerts. I tried the gpu version and switched to the cpu version with the same results. The camera in question successfully alerted once and is continuously not being confirmed. After the update both cameras alerts are now being cancelled for some reason as I'm looking at it live I see people walking by and cars driving in broad daylight and it says nothing found.
Same issue here. It seems to be running, but I'm getting 100% alert cancellation even when lower minimum confidence
 
In the CPU versus GPU arena, I'm still on 5.4.0.1. I uninstalled the GPU version and switched to the CPU version a few hours ago. So far I see no major difference between the two. It's still missing obvious targets, vehicles, but I have noticed a pattern. If it's a dark color vehicle, black, dark green, dark blue, it missed about half to 3/4 of them. It does well with light colors though. There has also been an increase of about 6% on the CPU when it idles and that can pop up to 20% when Python is analyzing snapshots. I think I'll skip the current update.
 
  • Like
Reactions: beandip
It is worth pointing out in this thread the same issue that some folks will experience now that Deepstack is integrated with Blue Iris and thus people that have tried to use certain types of cameras with the other 3rd party apps are already aware of this, or will become aware of LOL:

Here is why Blue Iris and Reolinks (and many other cheapo cameras) do not work well together and are disaster for something like Deepstack.

This was a screenshot of a member here where they had set these cameras to 15FPS within the cameras (and I suspect they were missing motion that they did not know they were missing....):

1617133192782.png


Now look at they key - that is the iframes. Blue Iris works best when the FPS and the iframes match. Now this is a ratio, so it should be a 1 if it matches the FPS. The iframes not matching (that you cannot fix or change with a reolink) is why they miss motion in Blue Iris and why people have problems. This is mainly why people are having issues with these cameras and there are many threads showing the issues people have with this manufacturer and Blue Iris. It is these same games that make the camera look great as a still image or video but turn to crap once motion is introduced.

The Blue Iris developer has indicated that for best reliability, sub stream frame rate should be equal to the main stream frame rate and these cameras cannot do that and there is nothing you can do about that with these cameras... The iframe rates (something these cameras do not allow you to set) should equal the FPS, but at worse case be no more than double. This example shows the cameras going down to a keyrate of 0.25 means that the iframe rates are over 4 times the FPS and that is why motion detection is a disaster with these cameras and Blue Iris...A value of 0.5 or less is considered insufficient to trust for motion triggers reliably...try to use Deepstack Integration and it will be useless in a lot of situations...

Compounding the matter even worse...motion detection is based on the substream and look at the substream FPS - they dropped down to below 6 FPS (even though it was set to 15FPS in the camera) with an iframe/key rate of 0.25 - you will miss motion most of the time with that issue...

Blue Iris is great and works with probably more camera brands than most VMS programs, but there are brands that don't work well or not at all - Rings, Arlos, Nest, Some Zmodo cams use proprietary systems and cannot be used with Blue Iris, and for a lot of people Reolink doesn't work well either.

Now compare above to mine and cameras that follow industry standards that allow you to actually set parameters and they don't manipulate them. You will see that my FPS match what I set in the camera, and the 1.00 key means the iframe matches the FPS:

1614139197822.png


The same can be said for a variety of cameras that do not let you set certain parameters or manipulate them. If you are trying this new Deepstack Integration and AI is being missed, check the key rate in this screen and see if your camera is at 1.00 and if it isn't that is a leading indicator as to probably why the AI isn't working.
Hello wittaj
I‘ve only now discovered there’s a “deepstack” function and just roughly browsing this thread. I am always interested in reading your posts when I come across them but so far as I know, you have here a significant misconception. You are saying that the “key” in the BI Status “FPS/key” column is the ratio of fps to iframes. The number in the “key“ column is the iframe interval in seconds and not a ratio. So, when you see a fps/key of 20.00/1.00, there are 20 frames in between each iframe. For them to match, it would be 20/.05
So, if I am correct, this rather undermines your sweeping statement about motion detection being a disaster etc...

edit...
Said slightly wrong - “key” is the number of key frames per second. So I should have stated 20/20 and not 20/.05
Sorry! Am I right this time?
 
Last edited:
  • Like
Reactions: beandip
Hello wittaj
I‘ve only now discovered there’s a “deepstack” function and just roughly browsing this thread. I am always interested in reading your posts when I come across them but so far as I know, you have here a significant misconception. You are saying that the “key” in the BI Status “FPS/key” column is the ratio of fps to iframes. The number in the “key“ column is the iframe interval in seconds and not a ratio. So, when you see a fps/key of 20.00/1.00, there are 20 frames in between each iframe. For them to match, it would be 20/.05
So, if I am correct, this rather undermines your sweeping statement about motion detection being a disaster etc...

edit...
Said slightly wrong - “key” is the number of key frames per second. So I should have stated 20/20 and not 20/.05
Sorry! Am I right this time?

Nope. Test it with a Hik or Dahua and see what happens... When the FPS and iframes match, the Key is 1.00

I just did mine right now:

When I make mine 15FPS and 15 iframes, the Key in Blue Iris is 1.00, so it reads 15/1.00
When I make mine 15 FPS and 30 iframes, the Key in Blue Iris is 0.50, so it reads 15/0.50
When I make mine 15 FPS and 60 iframes, the Key in Blue Iris is 0.25, so it reads 15/0.25

And then if I set a prebuffer time to 0 seconds - with 60iframes I miss the motion altogether....
 
To my understanding key frames are full frames and are expressed as a ratio, as @wittaj said. When they match a key frame is sent every matching number of frames. The frames in between the key frames do not contain full frame information and only what the camera "sees" as having changed since the last key frame. The result is that when they match a full frame is sent once every second.

Another update just popped up, 5.4.1.1
 
  • Like
Reactions: tech101
Well, at 21:00 local, I just "walk tested" 15 cameras that are outside. The results are less than spectacular. While BI motion detection caught me in every one DeepStack was somewhere in the 25-33% range. It definitely seems to be a matter of contrast, but I can't rely on it to filter potential false triggers since it misses so many real triggers. The detection of vehicles using the CPU version is slightly, as in it now catches one out of five, better but not enough to tie up those additional CPU cycles that the CPU version needs..
 
  • Sad
Reactions: D0T-C0M
Ok, still can't get this new Deepstack implementation to work. I uninstalled it and re-installed it all, entered the command below into PowerShell and it seemed to work in there. The 3 bottom (GIN) lines were each created when I accessed the "Faces" button in BI main settings AI tab.
------------------
PS C:\WINDOWS\system32> c:\Deepstack\deepstack --VISION-SCENE=True --VISION-DETECTION=True --VISION-FACE=True --MODE High --PORT 82
DeepStack: Version 2021.02.1
/v1/vision/face
---------------------------------------
/v1/vision/face/recognize
---------------------------------------
/v1/vision/face/register
---------------------------------------
/v1/vision/face/match
---------------------------------------
/v1/vision/face/list
---------------------------------------
/v1/vision/face/delete
---------------------------------------
/v1/vision/detection
---------------------------------------
/v1/vision/scene
---------------------------------------
---------------------------------------
v1/backup
---------------------------------------
v1/restore
[GIN] 2021/04/04 - 12:35:47 |←[97;42m 200 ←[0m| 976µs | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/face/list
[GIN] 2021/04/04 - 12:36:59 |←[97;42m 200 ←[0m| 0s | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/face/list
[GIN] 2021/04/04 - 12:40:40 |←[97;42m 200 ←[0m| 0s | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/face/list
-------------------------------------------------------

So it looks like BI is talking to the Deepstack server, but still getting nothing from any of my cameras.
Camera Trigger settings have Deepstack ticked and settings as below - what am I missing??
Cam Trigger AI.jpg
 
Ok, still can't get this new Deepstack implementation to work. I uninstalled it and re-installed it all, entered the command below into PowerShell and it seemed to work in there. The 3 bottom (GIN) lines were each created when I accessed the "Faces" button in BI main settings AI tab.
------------------
PS C:\WINDOWS\system32> c:\Deepstack\deepstack --VISION-SCENE=True --VISION-DETECTION=True --VISION-FACE=True --MODE High --PORT 82
DeepStack: Version 2021.02.1
/v1/vision/face
---------------------------------------
/v1/vision/face/recognize
---------------------------------------
/v1/vision/face/register
---------------------------------------
/v1/vision/face/match
---------------------------------------
/v1/vision/face/list
---------------------------------------
/v1/vision/face/delete
---------------------------------------
/v1/vision/detection
---------------------------------------
/v1/vision/scene
---------------------------------------
---------------------------------------
v1/backup
---------------------------------------
v1/restore
[GIN] 2021/04/04 - 12:35:47 |←[97;42m 200 ←[0m| 976µs | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/face/list
[GIN] 2021/04/04 - 12:36:59 |←[97;42m 200 ←[0m| 0s | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/face/list
[GIN] 2021/04/04 - 12:40:40 |←[97;42m 200 ←[0m| 0s | 127.0.0.1 |←[97;46m POST ←[0m /v1/vision/face/list
-------------------------------------------------------

So it looks like BI is talking to the Deepstack server, but still getting nothing from any of my cameras.
Camera Trigger settings have Deepstack ticked and settings as below - what am I missing??
View attachment 86065
Have you turned on the AI in the general blue Iris setting? There is a new AI tab there as well. You set the port there.