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

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!!
 
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
 
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
 
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.
 
  • Like
Reactions: Tinbum
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..
 
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
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 .

 
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.
 
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.
 
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

  • Untitled.png
    Untitled.png
    16 KB · Views: 32
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!
 
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
 
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:
Hi,

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




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!
Drop the container docker and install SSH and WebTerminal addon in HA(remember to set a password before it can be started)
open the addon page and then run this command to start deepstack
Code:
docker run --restart=always -e VISION-DETECTION=true -v localstorage:/datastore -p 83:5000 --name deepstack deepquestai/deepstack

Screenshot 2020-09-19 072029.png

after you have setup the new docker it will show in portainer so you can manage it there if you want.

Note!
if you dont have deepstack already in docker you need to run this first

Code:
docker pull deepquestai/deepstack


UPDATE!
Was to happy way to early....still error in AI. But if i run it manually from a cmd and with curl all my attempt is success. Why?
Code:
[19.09.2020, 07:20:08.887]: Starting analysis of D:\aiinput\altansd.20200919_072008903.jpg
[19.09.2020, 07:20:08.900]: (1/6) Uploading image to DeepQuestAI Server
[19.09.2020, 07:20:08.950]: (2/6) Waiting for results
[19.09.2020, 07:20:09.029]: (3/6) Processing results:
[19.09.2020, 07:20:09.033]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[19.09.2020, 07:20:09.036]: ERROR: Processing the following image 'D:\aiinput\altansd.20200919_072008903.jpg' failed. Failure in AI Tool processing the image.
[19.09.2020, 07:20:13.820]:
[19.09.2020, 07:20:13.823]: Starting analysis of D:\aiinput\altansd.20200919_072013908.jpg
[19.09.2020, 07:20:13.826]: (1/6) Uploading image to DeepQuestAI Server
[19.09.2020, 07:20:13.833]: (2/6) Waiting for results
[19.09.2020, 07:20:13.837]: (3/6) Processing results:
[19.09.2020, 07:20:13.840]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[19.09.2020, 07:20:13.843]: ERROR: Processing the following image 'D:\aiinput\altansd.20200919_072013908.jpg' failed. Failure in AI Tool processing the image.
[19.09.2020, 07:26:24.238]:
[19.09.2020, 07:26:24.241]: Starting analysis of D:\aiinput\altansd.20200919_072624506.jpg
[19.09.2020, 07:26:24.244]: (1/6) Uploading image to DeepQuestAI Server
[19.09.2020, 07:26:24.252]: (2/6) Waiting for results
[19.09.2020, 07:26:24.255]: (3/6) Processing results:
[19.09.2020, 07:26:24.259]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[19.09.2020, 07:26:24.262]: ERROR: Processing the following image 'D:\aiinput\altansd.20200919_072624506.jpg' failed. Failure in AI Tool processing the image.
 

Attachments

  • 1600492584670.png
    1600492584670.png
    31.7 KB · Views: 32
Am I the only one who has had no luck with this? Aside from the fact that blue iris is generating a bunch of pictures every time there is motion, this AI seems to be very confused on what should be simple recognition.

Capture.PNG
 
Am I the only one who has had no luck with this? Aside from the fact that blue iris is generating a bunch of pictures every time there is motion, this AI seems to be very confused on what should be simple recognition.

I've found that the beta likes to find people all over the place that don't exist. If you run the VorlonCD version it'll mask them all out .
 
Hello All. Having an issue with masking, but only on one camera. I have checked and re checked the resolution is correct, i produced the mask the same for all comeras but for some reason this 1 camera will not show the mask? Any ideas? Thx.
 
Hello All. Having an issue with masking, but only on one camera. I have checked and re checked the resolution is correct, i produced the mask the same for all comeras but for some reason this 1 camera will not show the mask? Any ideas? Thx.
Wrong file type by accident?