AI motion detection with BlueIris: an alternate approach

Hallo is it possible to store an annotateImage in a extra directory?

If i get a positive detecten of an interesting object, i would ike to store the Image with annotate of the object in a extra directory (Storeing them for same days)
It would be helpful to check why sometimes an object is detecting which i can't find in the video.

The annotated image is stored temporarily and available via the web server through a direct URL access, however there is no way to see a directory of all the images. I'll look at exposing that so you could at least hit the web server and see all the images.

I don't have plans to add storing them in folders by day.
 
For my needs it would be fine if i get a link of the annoted image into the payload of the mqtt, and the mqtt receiver can download the image from the webserver or from the directory - if it is possible to get the directory accessable through Docker?
 
For my needs it would be fine if i get a link of the annoted image into the payload of the mqtt, and the mqtt receiver can download the image from the webserver or from the directory - if it is possible to get the directory accessable through Docker?

This is already supported via the internal web server. See danecreekphotography/node-deepstackai-trigger, scroll down to the paragraph that starts with "The basename property".
 
Oh thats cool, where can i activate the webserver?
on port 4242 is nothing listening ... and i didn't find a settings.json file?

Do i have to create the settings.json file in the directory wehere the mqtt.json is?
 
Version 5.3.0 is now out. This adds the ability to see a list of the stored original and annotated images. Go to and in your browser to see a list of the stored images. This requires the webserver (or annotations) are enabled to work.

There are no breaking changes in this release. To update do docker-compose pull then docker-compose up -d.
 
  • Like
Reactions: sn0000py
Home and away status. Disable certain triggers/cameras when I'm home. Sure I can do this with BI but seems like it would be easier via an api call or MQTT.

I suggest handling this via automation and not via enabling/disabling triggers. That's how I have it set up using Home Assistant and NodeRed.

1. Remove the webRequest handlers
2. Create NodeRed automations that listen for the MQTT events
3. Have NodeRed decide whether to send a web request to BlueIris to start recording based on home/away status
 
But how do you "link" from a notification direct to the clip? Can you share please? Tx :)

You can use macros &WAN and &ALERT_DB in any ‘On alert...’ Action Set type (push, email, sms...):
1) &WAN/file/clips/&ALERT_DB ... motion lead jpeg; reflects pre-trigger time, if configured.
2) &WAN/alerts/&ALERT_DB ... trigger lead thumbnail jpeg.
3) &WAN/alerts/&ALERT_DB&fulljpeg ... trigger hi-res jpeg, if configured.

All of these examples create a URL to an alert image on your webserver.
 
Last edited:
@nelie Awesome work!!!!!! This seems to run much smoother on my old i5 testbed than the original AItool. I've completely disabled BI's motion detection and configured my Hikivision cameras to FTP (upload) snapshots to a local directory when they (cameras themselves) detect motion and so I have been able to implement AI using less CPU than before!!!

A couple of issues that I'm having are:

#1 Dahua cameras upload their snapshots to the FTP server in sub directories for every cameraName/year/ month/ day/minute. @bp2008 has a tool that can unstack these and (sanely) rename them but it needs to be run every time an image is uploaded to the FTP server to provide timely analysis. Is there any easy mod I could do to have the docker container look in these subfolders for new images?

#2 Since I'm uploading to FTP I don't have any folder cleanup routine like blueIris has. Currently I'm just using FindFiles in task scheduler to delete them daily and it works but it's messy. Any chance theres a better (simple) way to do this directly with the docker container?
 
@nelie Awesome work!!!!!! This seems to run much smoother on my old i5 testbed than the original AItool. I've completely disabled BI's motion detection and configured my Hikivision cameras to FTP (upload) snapshots to a local directory when they (cameras themselves) detect motion and so I have been able to implement AI using less CPU than before!!!

A couple of issues that I'm having are:

#1 Dahua cameras upload their snapshots to the FTP server in sub directories for every cameraName/year/ month/ day/minute. @bp2008 has a tool that can unstack these and (sanely) rename them but it needs to be run every time an image is uploaded to the FTP server to provide timely analysis. Is there any easy mod I could do to have the docker container look in these subfolders for new images?

#2 Since I'm uploading to FTP I don't have any folder cleanup routine like blueIris has. Currently I'm just using FindFiles in task scheduler to delete them daily and it works but it's messy. Any chance theres a better (simple) way to do this directly with the docker container?

I believe you can use a straight wildcard down the folder structure in your watchPattern, e.g. cameraName///*. Note that there is a pretty big performance hit to this as it winds up being a lot of folders to watch for.

For #2 a cron job that runs occasionally to do rm -rf on the folders would probably work. You'd need to make your own Docker image, based off the one from Docker Hub, that sets up the cron job and then starts the node application. That's beyond the scope of what I can assist with but it should be possible if you spend some time looking at how Dockerfiles work.
 
  • Like
Reactions: Netwalker
Hi, wonder if I could get some assistance? I'm running BI on an i7-3770 with 16GB RAM, Win10 build 18363 and have BI configured and am getting the correct trigger responses uising neile's instructions found in the wiki.

I've also installed Docker and have followed the instructions to to import the preconfigured docker image; although I think I've misconfigured something as I'm unable to reach the Deepstack web ui.

[17.08.2020, 12:14:19.580]: (1/6) Uploading image to DeepQuestAI Server
[17.08.2020, 12:14:40.585]: System.Net.Http.HttpRequestException | An error occurred while sending the request. (code: -2146233079 )
[17.08.2020, 12:14:40.593]: ERROR: Processing the following image 'N:\AI_Input\DoorbellSD.20200817_121110503.jpg' failed. Can't reach DeepQuestAI Server at .

if using the preconfigured deepstack image, what is the IP of the deepstack server? I've tried to plug in a few different options into the AI tool

Thanks
 
Did you change anything in it? Are you just using straight Docker Desktop, or are you using something like Portainer or UnRaid?
 
Yes, I only modified the volumes path as the default timezone is correct and I'm not using annotated images. For the volumes sections, should I leave the "-" that precedes the value in place?