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

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
I disabled deepstack for the time being as it was pegging my CPU at 100%, quite surprised, not the greatest but not a bad CPU i5-6500.

Might look at running it in socket for Windows to see if as posted above that runs any better.
Let me know if running in Docker in Windows improves the CPU usage. I had to move Deepstack to another server for the same reason. It was running on a Xeon E5-2960 V2 10 core with Hyper-threading and was maxing out the CPU.


Sent from my iPhone using Tapatalk
 
Joined
Jun 12, 2020
Messages
12
Reaction score
3
Location
Indiana
I think I’ve finally gotten AI Tool to process and trigger consistently and within a reasonable time. However I’m still having issues with MQTT.

So my MQTT is on a different server (Synology NAS) than Blue Iris and AI Tool (Windows Server). My MQTT topics are received by NodeRed and Home Assistant.

  • MQTT test button from setup works
  • AI Tool triggers the cameras to record with motion
  • MQTT test button from individual camera works

    An AI Tool trigger from motion DOES NOT trigger the MQTT payload, or push notifications for that matter
I don’t know what I’m missing or where the disconnect is coming from. Anyone have any ideas?

UPDATE: I set up an MQTT for some other cameras I have which are not running on AI Tool. The MQTT triggered as it should. So since it is not a connection between Blue Iris and MQTT it must be related to AI Tool. I am currently using AI Tool 1.64 because 1.65 was causing errors writing to history.csv.

@GentlePumpkin do you have any ideas why AI Tool would trigger a recording in BI but somehow prevent alerts using MQTT or push notificaiton?
 
Last edited:

neile

Getting the hang of it
Joined
May 15, 2020
Messages
132
Reaction score
67
This is very likely a BlueIris configuration issue, not an AI Tool issue @CommittotheIndian. Before I wrote my own system from scratch that supported MQTT natively I had MQTT events firing from BlueIris when AI Tool kicked it to say motion happened.

FWIW, MQTT support at the AI end, without having to go through BlueIris to get it, is one of the main reasons I came up with my alternate approach. The AI detection causes an MQTT message to Home Assistant and NodeRed is responsible for deciding when to tell BlueIris to start recording based on that MQTT message.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Got a bit of a hurdle with part 2 of my plan, installed docker for Windows and it complains that virtualisation isn’t enabled. Problem is my BI PC is in the attic and headless so I’d need to get out the ladder, then take a screen up there etc.
 

neile

Getting the hang of it
Joined
May 15, 2020
Messages
132
Reaction score
67
Got a bit of a hurdle with part 2 of my plan, installed docker for Windows and it complains that virtualisation isn’t enabled. Problem is my BI PC is in the attic and headless so I’d need to get out the ladder, then take a screen up there etc.
Oof :( I feel some of your pain, I had the same problem with the PC I built for BlueIris. I didn't have to drag a ladder out and go in the attic, but I did have to disconnect it all and drag it over to my office with a monitor and keyboard. Then I spent 30 minutes online trying to find out how to enable the setting on my AMD CPU. It was named some sort of obscure unrelated thing in the performance options!

I will say that having a PC in the house with Docker on it really does open up a bunch of possibilities beyond just AI. Yesterday I migrated my Unifi controller software from a Synology to the BlueIris PC as a Docker container and now have trivial ability to upgrade when new releases come out. I should have done it months ago. Once Windows Subsystem for Linux 2 supports USB devices I'll be moving my Home Assistant install to the PC as well from the Raspberry Pi it is currently on.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Being really lazy I’ve found a HP util which claims to be able to make changes to the BIOS, will be useful if it works.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
The util actually works, just enabled virtualisation and virtualisation direct i/o and restarted the PC

Do I need WSL 2 installed and enabled?
 

neile

Getting the hang of it
Joined
May 15, 2020
Messages
132
Reaction score
67
The util actually works, just enabled virtualisation and virtualisation direct i/o and restarted the PC

Do I need WSL 2 installed and enabled?
You don't but since you're doing install/upgrades anyway I would. Make sure you're on Windows 10 version 2004, then install WSL2 and enable it. You may want it down the line and it is amazing :)
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Right have DeepStack running within Docker, can access the DQAI webpage using localhost and the port number but I'm getting the following errors in the log file for AI Tools?

[22.06.2020, 15:46:56.117]: Starting analysis of C:\BlueIris\AI-Input/AI-Drive1_C.20200622_154656086.jpg
[22.06.2020, 15:46:56.123]: System.IO.IOException | The process cannot access the file 'C:\BlueIris\AI-Input\AI-Drive1_C.20200622_154656086.jpg' because it is being used by another process. (code: -2147024864 )
[22.06.2020, 15:46:56.129]: Could not access file - will retry after 10 ms delay
[22.06.2020, 15:46:56.157]: Retrying image processing - retry 1
[22.06.2020, 15:46:56.163]: (1/6) Uploading image to DeepQuestAI Server
[22.06.2020, 15:46:56.174]: (2/6) Waiting for results
[22.06.2020, 15:46:56.178]: (3/6) Processing results:
[22.06.2020, 15:46:56.184]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[22.06.2020, 15:46:56.188]: ERROR: Processing the following image 'C:\BlueIris\AI-Input/AI-Drive1_C.20200622_154656086.jpg' failed. Failure in AI Tool processing the image.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Right got it working, I thought that if I didn’t specify the type of detection it would just work but it need VISION-DETECTION set to true.

Struggling to now get docker to auto start, works fine when I’m logged on, tried using NSSM to create a service to start the desktop but I then can’t access the DQAI web server.
 

pmcross

Pulling my weight
Joined
Jan 16, 2017
Messages
371
Reaction score
185
Location
Pennsylvania
Right got it working, I thought that if I didn’t specify the type of detection it would just work but it need VISION-DETECTION set to true.

Struggling to now get docker to auto start, works fine when I’m logged on, tried using NSSM to create a service to start the desktop but I then can’t access the DQAI web server.
How is your CPU usage now that you're on Docker?
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
When I looked it was at around 35% so much better but I’ve not managed to get it to auto start after which I’ll start doing some proper testing and monitoring.
 

arg07

n3wb
Joined
Jun 16, 2020
Messages
8
Reaction score
0
Location
Toronto
I'm finding that most of the time the system is tagging things as false alerts even though they are not. Here is one example of a car driving by. Why would that be happening

1592849785848.png
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Managed to get it all working with docker and the container now auto starting when windows boots.

How can I reset the stats so that I can now start to check and monitor?
 

arg07

n3wb
Joined
Jun 16, 2020
Messages
8
Reaction score
0
Location
Toronto
Looks to me like it hasn’t detected the car as there’s no box around it.
Yes. That's exactly my point. I would have thought the system would pick up cars and label them as such, however the vast majority of the time, they are labeled as false alerts.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
I’ve had something similar when playing around with it, it flagged most of the cars in the pic except the ones further away which appeared smaller.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
How can I reset the stats? I checked the file history.csv and for me that has nothing in it except the csv file column headings.
 
Joined
Jun 12, 2020
Messages
12
Reaction score
3
Location
Indiana
I think I’ve finally gotten AI Tool to process and trigger consistently and within a reasonable time. However I’m still having issues with MQTT.

So my MQTT is on a different server (Synology NAS) than Blue Iris and AI Tool (Windows Server). My MQTT topics are received by NodeRed and Home Assistant.

  • MQTT test button from setup works
  • AI Tool triggers the cameras to record with motion
  • MQTT test button from individual camera works

    An AI Tool trigger from motion DOES NOT trigger the MQTT payload, or push notifications for that matter
I don’t know what I’m missing or where the disconnect is coming from. Anyone have any ideas?

UPDATE: I set up an MQTT for some other cameras I have which are not running on AI Tool. The MQTT triggered as it should. So since it is not a connection between Blue Iris and MQTT it must be related to AI Tool. I am currently using AI Tool 1.64 because 1.65 was causing errors writing to history.csv.

@GentlePumpkin do you have any ideas why AI Tool would trigger a recording in BI but somehow prevent alerts using MQTT or push notificaiton?
I was able to fix my MQTT &push notification issue! I'm not sure if this is the only setting that needed changed but it's the one that worked. I unchecked motion zones and only checked Extern in the alert page. This got everything working.

Screen Shot 2020-06-22 at 6.01.39 PM.png
 

Clabs1

n3wb
Joined
Jun 23, 2020
Messages
1
Reaction score
1
Location
UK
I'm finding that most of the time the system is tagging things as false alerts even though they are not. Here is one example of a car driving by. Why would that be happening

View attachment 64375
It could be that the car is obscured by the timestamp so Deepstack doesn't recognise it. Can you disable the time stamp or move the camera a bit so it's not over that section?
 
Top