[tool] [tutorial] Free AI Person Detection for Blue Iris

barnyard

n3wb
Joined
Aug 9, 2020
Messages
24
Reaction score
5
Location
United States
You need the latest VorlonCD version. Then under the camera settings, see my screenshots below. Just customise the text to your liking. There are some variables you can use, as well as just the ability to type in what you want. It's awesome
 

Attachments

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
Thanks ... i have a old version .. now i see it. Thanks
 

ChrisX

Getting the hang of it
Joined
Nov 18, 2016
Messages
130
Reaction score
4
Can i use the memo / summary /memo / flag to use it on my BI Alert E-Mail ?
I will get a mail: %cam Alert with: person
 

Peter Myers

Young grasshopper
Joined
Dec 17, 2017
Messages
75
Reaction score
8
going to tackle the setting up Deep stack and AI tools to run when the computer reboots.. because it just did.. and blue iris turned back on as its running as a service, however we get no alerts do to deep stack and ai tools not having been started when the computer reboots.... starting my research now, but if anyone has a better direction to point me. let me know Thanks!!
 

Peter Myers

Young grasshopper
Joined
Dec 17, 2017
Messages
75
Reaction score
8
ok. got the AI tools to auto start no problem... got docker to autostart no problem.. just cant seem to figure out how to auto start the container... need more research
 

Peter Myers

Young grasshopper
Joined
Dec 17, 2017
Messages
75
Reaction score
8
oops...

ERROR: Can't write to cameras/history.csv!

i think i broke the ai, let me search if this has happened, in the mean time if someone already knows off the top of their head,.. a point in the correct direction would be helpfull.. Thanks
 

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
90
Reaction score
114
Location
massachusetts
oops...

ERROR: Can't write to cameras/history.csv!

i think i broke the ai, let me search if this has happened, in the mean time if someone already knows off the top of their head,.. a point in the correct direction would be helpfull.. Thanks
If running as a service, before starting the GUI for viewing history/settings, STOP the service. Although I still randomly get this error when multiple deepstack services process requests at the same time and all try to write to the file, or the file is being updated because of a deleted file. I'm working on converting the code for writing to history.csv to a SQLite db so when that is finished you shouldnt see that error any longer.
 

Peter Myers

Young grasshopper
Joined
Dec 17, 2017
Messages
75
Reaction score
8
i was able to resolve it.. had too many processes running, i restarted and progressed slower and was able to over come that issue

I now have.. BI, Deepstack on Docker for Windows and AI Tool all auto start upon the computer being turned on.. this includes a power loss.. when the computer power is restored the pc auto turns on as well..
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
Minor update to VorlonCD mod:

  • Ability to specify telegram captions when sending images [ Thank you @mayop ! - @barnyard ]
  • Ability to specify custom filename for image copy action [partial implementation for @aesterling 's request - No saving/merging of markup/detection rectangle yet]
  • Variables added - [Prefix], [ImageFilenameNoExt], [SummaryNonEscaped] (may not always work for filenames and urls)
  • Fix for dynamic mask history sometimes not getting purged

@Chris Dodge
First, thanks for the great work and making your project available to all of us.

Couple minor things I noticed:
Not sure if you are aware but the integrated masking feature is broken for cameras that show a vertical image instead of horizontal. For example, my doorbell camera.
The image is not masked in the correct place when drawing it in. It usually masks like 2 inches below the pointer.

Also, I reverted back to your 1.72 version because it's the only version that stops sending images to Deepstack after a trigger URL has been called. The newer versions continue sending images to Deepstack and spike my CPU.
 

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
90
Reaction score
114
Location
massachusetts
@Chris Dodge
First, thanks for the great work and making your project available to all of us.

Couple minor things I noticed:
Not sure if you are aware but the integrated masking feature is broken for cameras that show a vertical image instead of horizontal. For example, my doorbell camera.
The image is not masked in the correct place when drawing it in. It usually masks like 2 inches below the pointer.

Also, I reverted back to your 1.72 version because it's the only version that stops sending images to Deepstack after a trigger URL has been called. The newer versions continue sending images to Deepstack and spike my CPU.
My doorbell camera is vertical and always seems to show the detection rectangles correctly. There was a bug @Tinbum mentioned a few pages back that sounds exactly the same. Think it was only happening with a beta docker or PI version of Deepstack.

If you have Telegram enabled, it was likely causing the high cpu issue. I fixed that in the most recent release. If you still have trouble let me know.

Also added is the ability to merge detection annotations into the image before sending to telegram or copying .

 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
My doorbell camera is vertical and always seems to show the detection rectangles correctly. There was a bug @Tinbum mentioned a few pages back that sounds exactly the same. Think it was only happening with a beta docker or PI version of Deepstack.

If you have Telegram enabled, it was likely causing the high cpu issue. I fixed that in the most recent release. If you still have trouble let me know.

Also added is the ability to merge detection annotations into the image before sending to telegram or copying .

It was the pi version with me. the mask would be lower down if the object was near the top and higher up if near the bottom. Left and right were correct.
 

LopezEL

Getting the hang of it
Joined
Sep 30, 2019
Messages
97
Reaction score
90
Location
SC
It was the pi version with me. the mask would be lower down if the object was near the top and higher up if near the bottom. Left and right were correct.
This is exactly what it does for me. I'm running everything locally on the same windows 10 machine (Blue Iris, AITool, & Deepstack).
Once the mask is drawn in place, it works fine. It's just the drawing process that's a bit tedious since you have to guess where the pointer is actually going to draw.

I don't use Telegram. I have BI set to send me the flagged email notifications.
 

Eatoff

n3wb
Joined
Aug 28, 2020
Messages
19
Reaction score
3
Location
Australia
OK, after running this setup for a couple of weeks now, I have some questions/points. I have used both the dual camera setup, and the single camera setup.

Dual cameras:
pro:
- Can merge multiple short events into one event. So say someone is coming and going out of view a few times in quick succession, you can get the events merged through the continue event unless re-triggered option.

con:
-uses more RAM. I set up some cameras with this method that didnt actually have a substream to try out. So would get continuous recording at 1080 plus recording of events at 1080 (double up on disk space too, i know), but the ram usage was also higher. The dual cameras ram usage was approx 2.2GB for my setup. single camera with flagging is sitting at 1.35GB.

Single camera:
pro:
-love the detection data (person detected, 80% etc).
-less ram usage (as mentioned above)

con:
  • timeline is full of events. all the false triggers are there as events (attached screenshot). all the confirmed events are there with a flag.
  • multiple flags for a single event. Say im walking in and out of my driveway (re-trigger set at 3s) then as soon as I stop for 3 seconds and then move again, thats a separate event and flag. Is there any way to get this to work the same as the dual camera setup?

Other:
Is there a way to get a notification of an object in an area? example is camera over my driveway. i want events for every car and person going past, but i want a notification when a person is in my driveway. other than setting up a second camera is there a way to get this working?

Loving this setup though, and the Pi 4 with Intel NCS2 has been completely stable for me. My next step is getting the detections integrated into home assistant with images etc.
 

Attachments

Marc_Ant1

n3wb
Joined
Sep 15, 2020
Messages
1
Reaction score
0
Location
Canada
Hi,

I can't get AI Input (1.67) to work properly:

[17.09.2020, 21:44:20.033]: Starting analysis of C:\AI_input\doorbellsd.20200917_214419909.jpg
[17.09.2020, 21:44:20.085]: (1/6) Uploading image to DeepQuestAI Server
[17.09.2020, 21:44:20.237]: (2/6) Waiting for results
[17.09.2020, 21:44:20.453]: (3/6) Processing results:
[17.09.2020, 21:44:20.465]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[17.09.2020, 21:44:20.495]: ERROR: Processing the following image 'C:\AI_input\doorbellsd.20200917_214419909.jpg' failed. Failure in AI Tool processing the image.

Deepstack is activated and reachable
AI Input POST the image to Deepstack
[GIN] 2020/09/17 - 23:19:21 | 200 | 27.46µs | 192.168.0.200 | POST /v1/vision/detection,
[GIN] 2020/09/17 - 23:20:04 | 200 | 30.819µs | 192.168.0.200 | POST /v1/vision/detection,
[GIN] 2020/09/17 - 23:20:08 | 200 | 25.601µs | 192.168.0.200 | POST /v1/vision/detection,
[GIN] 2020/09/17 - 23:27:48 | 200 | 23.406µs | 192.168.0.200 | POST /v1/vision/detection,
[GIN] 2020/09/17 - 23:27:53 | 200 | 61.496µs | 192.168.0.200 | POST /v1/vision/detection,
[GIN] 2020/09/18 - 01:21:30 | 200 | 28.996µs | 192.168.0.200 | POST /v1/vision/detection,
[GIN] 2020/09/18 - 01:42:53 | 200 | 25.452µs | 192.168.0.200 | POST /v1/vision/detection,
[GIN] 2020/09/18 - 01:44:21 | 200 | 28.814µs | 192.168.0.200 | POST /v1/vision/detection,
[GIN] 2020/09/18 - 01:56:12 | 200 | 14.674443ms | 192.168.0.10 | GET /,
[GIN] 2020/09/18 - 01:56:12 | 200 | 250.325629ms | 192.168.0.10 | GET /assets/vendor/simple-line-icons/css/simple-line-icons.css,
[GIN] 2020/09/18 - 01:56:12 | 200 | 10.108289ms | 192.168.0.10 | GET /assets/device-mockups/device-mockups.min.css,
[GIN] 2020/09/18 - 01:56:12 | 200 | 15.824693ms | 192.168.0.10 | GET /assets/vendor/fontawesome-free/css/all.min.css,
[GIN] 2020/09/18 - 01:56:12 | 200 | 254.019158ms | 192.168.0.10 | GET /assets/vendor/bootstrap/css/bootstrap.min.css,
[GIN] 2020/09/18 - 01:56:12 | 200 | 10.205689ms | 192.168.0.10 | GET /assets/css/new-age.min.css,
[GIN] 2020/09/18 - 01:56:12 | 200 | 15.113805ms | 192.168.0.10 | GET /assets/img/deepstack.png,
[GIN] 2020/09/18 - 01:56:12 | 200 | 1.95221ms | 192.168.0.10 | GET /assets/img/loader.gif,
[GIN] 2020/09/18 - 01:56:12 | 200 | 1.884452ms | 192.168.0.10 | GET /assets/img/iot.jpg,
[GIN] 2020/09/18 - 01:56:12 | 200 | 996.118µs | 192.168.0.10 | GET /assets/img/dark-background.png,
[GIN] 2020/09/18 - 01:58:08 | 200 | 94.084µs | 192.168.0.200 | POST /v1/vision/detection,

Docker version is deepquestai/deepstack:noavx and Vision detection is set to true

I suppose i could adjust the time zone but I doubt it will solve my issue.

In case it matter, I'm running Portainer in a Proxmox VM and Windows 10 also in a VM.

I did search the thread because this issue does come out but no answer work in my case.


Thanks!
 

jompa68

n3wb
Joined
Sep 18, 2020
Messages
3
Reaction score
0
Location
Sweden
I have the same error like @Marc_Ant1
Running VirtualBox and Portainer

When running deepstack on my windows machine it works without any errors, but i prefer to use my docker deepstack
 

jompa68

n3wb
Joined
Sep 18, 2020
Messages
3
Reaction score
0
Location
Sweden
after some reading on this forum i found this post: [tool] [tutorial] Free AI Person Detection for Blue Iris
Looks that it is something with Virtualbox and avx/avx2 settings.
When i restart VM it works for few seconds to send a curl POST to deepstack until VM throughs out an message. Something with cpuset.....

Screenshot 2020-09-18 185949.png
As you can see in deepstack log it works a couple of times
Screenshot 2020-09-18 190018.png
 

DanTx

n3wb
Joined
Jul 6, 2018
Messages
3
Reaction score
0
Location
USA
Thanks for everyone posting on this thread. I was able to get everything up and running for a day, longer than the last few days.
With a dozen cameras I had issues with AItool failing and it seemed to be due to DeepstackAI (in a linux docker container) getting backed up and then just never able to catch up.

This may have been obvious to others, but the fix was deploy TWO more deepstack docker containers, give them different ports, and add those URLs to the AItool.
Now even with half the cameras sending images, between the three containers, they can keep up with the requests.

So if you are having problems with DeepstackAI processing images for a short time and then simply failing or not keeping up, run another instance of DeepstackAI and add it to AItool URL list.

Edit next day

Still having errors after the containers are running for several hours, the containers just start throwing errors per aitool.log
ERROR: A task was canceled. [TaskCanceledException] Mod: <DetectObjects>d__28 Line:875:40
and nothing gets processed and no triggers.

Restarted the deepstackai containers fixed it. Setup cron jobs to restart them on a schedule, will see if that keeps the triggers flowing.
 
Last edited:
Top