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

CCTVCam

Known around here
Joined
Sep 25, 2017
Messages
2,660
Reaction score
3,480
Keep in mind those images happen at a one second interval. That can be self defeating if the motion is of short duration. I'm using 1 or 2 depending on the camera location and what I want detected. This is another case of how important it can be to have the iframe rate set the same as the frame rate since that insures a full frame every second and motion detection starts on an iframe.
I was just going to say has anyone tried increasing the ratio to 2 and seeing if it increases accuracy?

The penalty is going to be much larger recordings and possibly increased cpu as DS now has to analyse 2 frames (need to set it to 2 in DS settings as well).
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,436
Reaction score
47,561
Location
USA
I was just going to say has anyone tried increasing the ratio to 2 and seeing if it increases accuracy?

The penalty is going to be much larger recordings and possibly increased cpu as DS now has to analyse 2 frames (need to set it to 2 in DS settings as well).
I thought that as well and tried it, and I don't know about every Dahua cam, but on mine, it will not let you put in an iframe less than the FPS. If you set FPS at 15, the smallest iframe allowed is 15. If you bump it up to 30FPS, the minimum iframe is 30.

On my other camera that allowed me put in an iframe rate that was half the FPS, it didn't have an impact to the KEY, but this is a cheapo overview cam that I know will change the parameters to whatever they feel like! I tried that to see if I could get Deepstack to work with them but the camera would do whatever it felt like.

Maybe someone else can try with any different brand cameras and see if they can force a KEY to 2.00
 

hazzard8

n3wb
Joined
May 25, 2020
Messages
10
Reaction score
3
Location
Norway
Maybe someone else can try with any different brand cameras and see if they can force a KEY to 2.00
Tried to set i-frame on my Hikvision-camera to 10. Camera running at 20 FPS. This is the result (only tried first camera):

fpskey.JPG
There is something strange here. Not sure if it's the camera or anything else. Still running at 20 FPS, I get these results:
9 i-frames: 20.00/1.67 (same as 10 i-frames)
8 i-frames: 20.00/2.50
7 i-frames: 20.00/2.50
6 i-frames: 20.00/2.50
5 i-frames: 20.00/2.50
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Wouldn’t it be the substream you need to vary as it’s snaps from the substream that are being analysed.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
^^^ True, but the sub and main streams still need to match in terms of iframe and frame rates for recording to start at the right point.
 

tofu

Getting the hang of it
Joined
May 3, 2019
Messages
113
Reaction score
72
Location
NYC
I've noticed alert actions fire noticeably slower, even with "fire 'on alert' actions only when confirmed" disabled. Used to be near instantaneous, but now takes several seconds
Work around is to clone the camera. It seems bi will always process the ai first, whether or not alert firing is contingent on it
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,436
Reaction score
47,561
Location
USA
Tried to set i-frame on my Hikvision-camera to 10. Camera running at 20 FPS. This is the result (only tried first camera):

There is something strange here. Not sure if it's the camera or anything else. Still running at 20 FPS, I get these results:
9 i-frames: 20.00/1.67 (same as 10 i-frames)
8 i-frames: 20.00/2.50
7 i-frames: 20.00/2.50
6 i-frames: 20.00/2.50
5 i-frames: 20.00/2.50
Interesting, I couldn't get my older Hik to do that.

So in your scenario, either the camera itself will not allow the iframes to be set less than 8 with a 20 FPS and that is the highest ratio it will allow (40% of the FPS or a KEY of 2.50), or Blue Iris doesn't show past 2.50.

I am leaning towards the camera must not be accepting an iframes rate that is less than 40% of the FPS so instead of not allowing you to go lower, the camera then simply overrides your setting.

I would think BI simply accepts whatever setting is being provided to it as BI cannot change that setting in the camera. I guess maybe this could happen within BI if someone isn't using Direct to Disc and is doing re-encoding and BI may then be able to simply look at a frame rate at whatever frequency it chooses regardless of the camera setting (which depending on the camera setting could result in a large time between full frames then).
 

CCTVCam

Known around here
Joined
Sep 25, 2017
Messages
2,660
Reaction score
3,480
I thought that as well and tried it, and I don't know about every Dahua cam, but on mine, it will not let you put in an iframe less than the FPS. If you set FPS at 15, the smallest iframe allowed is 15. If you bump it up to 30FPS, the minimum iframe is 30.

On my other camera that allowed me put in an iframe rate that was half the FPS, it didn't have an impact to the KEY, but this is a cheapo overview cam that I know will change the parameters to whatever they feel like! I tried that to see if I could get Deepstack to work with them but the camera would do whatever it felt like.

Maybe someone else can try with any different brand cameras and see if they can force a KEY to 2.00
Maybe that's an artifical restriction to keep file size low just like the data rate restriction at the top end. An article on IVPM suggests Dahua limit the minimum on their cameras to 1 per second. That fits in with what you are reporting that you cannot set less than the frames per SECOND value.

The same article suggests that there's very little improvement in quality by increasing the i frame interval beyond this so maybe that's whyt it's limited. However, for Deepstack purposes, I have to wonder if it would make a difference.
 

beandip

n3wb
Joined
Apr 1, 2021
Messages
6
Reaction score
3
Location
North Carolina
I got Deepstack working in Blue Iris! I had to update Deepstack, then it worked in Windows. Like that other guy, I had an old version that required an activation key. Then I got greedy and tried it again in Linux, and it works in Linux as well. Face detection and registration doesn't work in Blue Iris with Linux Deepstack, but that's fine for me. I just need the object and person detection. Yayyy
 

Dan111

n3wb
Joined
Mar 15, 2021
Messages
27
Reaction score
9
Location
19382
There's a new release of BI, version 5.4.2.0, that may help with facial recognition.
I still even with the new release and using the cpu and gpu version have a camera further away from the street reporting nothing and the other always reporting confirmed alerts that's closer to the street. I changed the I frame settings and the key frames are set to 1 now as well and that didn't help either. Not sure why. It immediately says "nothing found" and for the other it immediately says what it found.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
@Dan111 I find that DeepStack does not detect well if the object size, contrast or lighting are not optimal. When it has a good amount of light it works fairly well, but it still misses dark objects pretty easily. As with everything YMMV.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Part of the problem I found was that when the image captured was from the substream DS wouldn’t be as reliable but an image from the mainstream would take more CPU and take longer to process.
 

Dan111

n3wb
Joined
Mar 15, 2021
Messages
27
Reaction score
9
Location
19382
@Dan111 I find that DeepStack does not detect well if the object size, contrast or lighting are not optimal. When it has a good amount of light it works fairly well, but it still misses dark objects pretty easily. As with everything YMMV.
Yep these are all day time issues I am having. I know it would have trouble at night with the distance it is away from the street although at 5am when it was dark is the only time it ever detected and never again. Somehow it detected once and it happened to be very dark hours after setting it up and it was not detecting anything until that one time and then decided never to work again. I at first was using the main streams and saw here I should add in substreams as it's supposed to be better maybe I should try for that camera to use only the mainstream?
 

Dave Lonsdale

Pulling my weight
Joined
Dec 3, 2015
Messages
456
Reaction score
195
Location
Congleton Edge, UK
Maybe that's an artifical restriction to keep file size low just like the data rate restriction at the top end. An article on IVPM suggests Dahua limit the minimum on their cameras to 1 per second. That fits in with what you are reporting that you cannot set less than the frames per SECOND value.

The same article suggests that there's very little improvement in quality by increasing the i frame interval beyond this so maybe that's whyt it's limited. However, for Deepstack purposes, I have to wonder if it would make a difference.
Easy for me to check if there's a limit using a new generation DS-2CD2087G2-LU Hikvision.
BI status window:-
Example 10_10 BI status.png
Camera:-
Example 10_10 video settings.png
But, four points:-
1. Saving in the camera is not enough. The camera "appears" OK but also needs a reboot or BI status shows garbage (maybe a FW bug in the camera)
2. Doesn't work with V5.5.160 build 201103, needs V5.5.160 build 210108
3. Doesn't work at 20fps
4. The bitrate is a lot higher than the camera's maximum setting, even allowing for BI's 10 network bits per byte and the camera using 8.

This was just to test the limit, I have no intention of using that setting.
 

sebastiantombs

Known around here
Joined
Dec 28, 2019
Messages
11,511
Reaction score
27,690
Location
New Jersey
I just shut DeepStack down The detection ability is terrible to non-existent at night and it misses too much during the day as well. With 5.4.2.0 I've started getting the herky-jerky playback syndrome. I'm also seeing problems with playback of clips not playing the correct clip. I may revert back to the last stable version of BI if it stays like this.
 

Ssayer

BIT Beta Team
Joined
Jan 5, 2016
Messages
19,580
Reaction score
70,738
Location
SE Michigan USA
Going for 3 hours so far. not trying to jinx myself, but the playback is spot on here. I'm not running it as a service (mentioning it in case that makes a difference). As to missing stuff at night, I've already mentioned my work around for that...
 

Ssayer

BIT Beta Team
Joined
Jan 5, 2016
Messages
19,580
Reaction score
70,738
Location
SE Michigan USA
I'd say that DS is getting around 85% of them during the day (did I mention that I have min confidence set at a whopping 4%?). But, that's why I've unticked Hide cancelled alerts and ticked Auto-flag confirmed alerts. I'm just going to keep running it this way so that, with updates, I'll know if it gets better/same/worse...
 
Top