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

warbux

n3wb
Joined
Aug 16, 2020
Messages
17
Reaction score
1
Location
United States
I am having trouble getting the AI Tool to start as a service. Anyone else experience the same problem?
 

warbux

n3wb
Joined
Aug 16, 2020
Messages
17
Reaction score
1
Location
United States
Here is an update to my fork of @GentlePumpkin 's awesome tool.

Change log:
  • Dynamic Masking - thanks to @classObject! Any detection that are repeated in the same area will be ignored until they no longer appear xx times. Great for cars parked in driveway, etc.
  • Camera option for 'Trigger Cancels' - Basically, rather than the URL triggering an event in BI, it will only be called when the detection is CANCELED. Note that you MUST change &flagalert=1 to &flagalert=0. As I understand this is how Sentry AI works - it just cancels a detection sent by BI. I haven't tested the 'Trigger cancels' camera checkbox yet since I dont have that configuration right now - let me know if it works.
  • Images are put into a true queue to be processed, and the log/Overview tab shows you current/max/average queue levels so you know if BI is overloading AITool. (MaxImageQueueSize defaults to 100 and can be changed in the settings .JSON file if needed)
  • Sort cameras on load
  • Telegram chat id was not being saved correctly
  • Fixed crashes related to stats tab, various null references, errors writing to history.csv, etc
  • Safe loading and saving of settings file. If a corrupt settings file is detected it will revert to backup automatically.
  • Remotely aims and fires paintball gun turret when AI detects neighbor cats or people with MAGA hats walking by.
(Along with previous updates like Deepstack (for windows) start/stop support, auto start, read BI camera settings, a LOG tab, save all cameras and settings to single JSON file, etc)

Do I need to run Deepstack from windows to use your version? I can't seem to get yours working.

Code:
[11:37:47.328]:          Constructor>
[11:37:47.340]:          Constructor>
[11:37:47.342]:          Constructor> Starting AITool Version 1.67.8.31787 built on 8/27/2020 5:39:35 PM
[11:37:47.342]:          Constructor> *** Another instance is already running ***
[11:37:47.342]:          Constructor>  --- Files will not be monitored from within this session
[11:37:47.344]:          Constructor>  --- Log tab will not display output from service instance. You will need to directly open log file for that
[11:37:47.344]:          Constructor>  --- Changes made here to settings will require that you stop/start the service
[11:37:47.344]:          Constructor>  --- You must close/reopen app to see NEW history items/detections
[11:37:47.344]:          Constructor> *** Running as administrator ***
[11:37:47.346]:          Constructor> BlueIris path is 'C:\Program Files\Blue Iris 5', with 5 cameras and 5 clip folder paths configured.
[11:37:47.392]:         CleanCSVList> Skipping clean of history.csv, instance already running.
[11:37:47.396]:               Load> Loading settings from C:\Users\dave\Desktop\AITOOL-VORLONCD\AITool.Settings.json
[11:37:47.398]:        RefreshInfo> Reading BlueIris settings from registry...
[11:37:47.412]:     LoadFromCSVAsync> Loading history list from cameras/history.csv ...
[11:37:47.460]:       UpdateWatchers> *** Another instance is already running, skip watching for changed files ***
[11:37:47.462]:          Constructor> APP START complete.
[11:37:47.462]:        RefreshInfo> DeepStack NOT installed
[11:37:47.462]:    GetDeepStackRun> DeepStack Desktop NOT running.
[11:37:47.462]:    GetDeepStackRun> DeepStack Desktop NOT running.
[11:37:47.464]:     LoadFromCSVAsync> ...Loaded list in 50ms, 0 lines.
 

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
90
Reaction score
114
Location
massachusetts
Do I need to run Deepstack from windows to use your version? I can't seem to get yours working.

Code:
[11:37:47.328]:          Constructor>
[11:37:47.340]:          Constructor>
[11:37:47.342]:          Constructor> Starting AITool Version 1.67.8.31787 built on 8/27/2020 5:39:35 PM
[11:37:47.342]:          Constructor> *** Another instance is already running ***
[11:37:47.342]:          Constructor>  --- Files will not be monitored from within this session
[11:37:47.344]:          Constructor>  --- Log tab will not display output from service instance. You will need to directly open log file for that
[11:37:47.344]:          Constructor>  --- Changes made here to settings will require that you stop/start the service
[11:37:47.344]:          Constructor>  --- You must close/reopen app to see NEW history items/detections
[11:37:47.344]:          Constructor> *** Running as administrator ***
[11:37:47.346]:          Constructor> BlueIris path is 'C:\Program Files\Blue Iris 5', with 5 cameras and 5 clip folder paths configured.
[11:37:47.392]:         CleanCSVList> Skipping clean of history.csv, instance already running.
[11:37:47.396]:               Load> Loading settings from C:\Users\dave\Desktop\AITOOL-VORLONCD\AITool.Settings.json
[11:37:47.398]:        RefreshInfo> Reading BlueIris settings from registry...
[11:37:47.412]:     LoadFromCSVAsync> Loading history list from cameras/history.csv ...
[11:37:47.460]:       UpdateWatchers> *** Another instance is already running, skip watching for changed files ***
[11:37:47.462]:          Constructor> APP START complete.
[11:37:47.462]:        RefreshInfo> DeepStack NOT installed
[11:37:47.462]:    GetDeepStackRun> DeepStack Desktop NOT running.
[11:37:47.462]:    GetDeepStackRun> DeepStack Desktop NOT running.
[11:37:47.464]:     LoadFromCSVAsync> ...Loaded list in 50ms, 0 lines.
You do not need to use windows version of deepstack. Your problem is that another copy of aitool.exe is still running in memory. Maybe as service?
 

WingSuit

n3wb
Joined
Aug 30, 2020
Messages
2
Reaction score
0
Location
Usa
Do I need to run Deepstack from windows to use your version? I can't seem to get yours working.

Code:
[11:37:47.328]:          Constructor>
[11:37:47.340]:          Constructor>
[11:37:47.342]:          Constructor> Starting AITool Version 1.67.8.31787 built on 8/27/2020 5:39:35 PM
[11:37:47.342]:          Constructor> *** Another instance is already running ***
[11:37:47.342]:          Constructor>  --- Files will not be monitored from within this session
[11:37:47.344]:          Constructor>  --- Log tab will not display output from service instance. You will need to directly open log file for that
[11:37:47.344]:          Constructor>  --- Changes made here to settings will require that you stop/start the service
[11:37:47.344]:          Constructor>  --- You must close/reopen app to see NEW history items/detections
[11:37:47.344]:          Constructor> *** Running as administrator ***
[11:37:47.346]:          Constructor> BlueIris path is 'C:\Program Files\Blue Iris 5', with 5 cameras and 5 clip folder paths configured.
[11:37:47.392]:         CleanCSVList> Skipping clean of history.csv, instance already running.
[11:37:47.396]:               Load> Loading settings from C:\Users\dave\Desktop\AITOOL-VORLONCD\AITool.Settings.json
[11:37:47.398]:        RefreshInfo> Reading BlueIris settings from registry...
[11:37:47.412]:     LoadFromCSVAsync> Loading history list from cameras/history.csv ..
[11:37:47.460]:       UpdateWatchers> *** Another instance is already running, skip watching for changed files ***
[11:37:47.462]:          Constructor> APP START complete.
[11:37:47.462]:        RefreshInfo> DeepStack NOT installed
[11:37:47.462]:    GetDeepStackRun> DeepStack Desktop NOT running.
[11:37:47.462]:    GetDeepStackRun> DeepStack Desktop NOT running.
[11:37:47.464]:     LoadFromCSVAsync> ...Loaded list in 50ms, 0 lines.
When it runs as a service it won't be visible, you have to look in task manager.
 

Jim davis

n3wb
Joined
Mar 29, 2019
Messages
7
Reaction score
0
Location
texas
I'm using AI Tools VorlonCD , Need assistance with Telegram to send photo alerts. Started an acct with Telegram, made a group, got chatid and also token. Unable to sent alerts and have attempted to troubleshoot the errors in the logs. The images are sent to the folder C:/AI Tools/ error. The file resolution was lowered to 1280x720 and file size is approx 600KB . Any assistance is appreciated with this issue and anything identified in the logs. The upload is partial, can upload full if needed. Thanks.

[30.08.2020, 04:28:13.516]: DetectObjects> 127.0.0.1:83 - Starting analysis of C:\AI_Input\MNHD.20200830_042813402.jpg...
[30.08.2020, 04:28:13.518]: DetectObjects> 127.0.0.1:83 - (1/6) Uploading image to DeepQuestAI Server at [30.08.2020, 04:28:14.553]: DeepStack> Server.exe> [GIN] 2020/08/30 - 04:28:14 | 200 | 1.0325165s | 127.0.0.1 | POST /v1/vision/detection
[30.08.2020, 04:28:14.553]: DetectObjects> 127.0.0.1:83 - (2/6) Posted in 1033ms, Received a 41 byte response.
[30.08.2020, 04:28:14.560]: DetectObjects> 127.0.0.1:83 - (3/6) Processing results...
[30.08.2020, 04:28:14.565]: DetectObjects> 127.0.0.1:83 - (Error: No predictions? JSON: '{"success":false,"error":"invalid image"}')
[30.08.2020, 04:28:14.583]: DetectObjects> 127.0.0.1:83 - ERROR: Failure response from DeepStack. JSON: '{"success":false,"error":"invalid image"}'
[30.08.2020, 04:28:14.683]: TelegramUpload> uploading image to chat "405397243"
[30.08.2020, 04:28:15.631]: TelegramText> ERROR: Could not send text "[30.08.2020, 04:28:14.583]: 127.0.0.1:83 - ERROR: Failure response from DeepStack. JSON: '{"success":false,"error":"invalid image"}'" to Telegram.
[30.08.2020, 04:28:15.637]: TelegramText> ERROR: Could not send text "[30.08.2020, 04:28:14.565]: 127.0.0.1:83 - (Error: No predictions? JSON: '{"success":false,"error":"invalid image"}')" to Telegram.
[30.08.2020, 04:28:16.349]: TelegramUpload> ERROR: Could not upload image C:\AI_Input\MNHD.20200830_042813402.jpg to Telegram.
[30.08.2020, 04:28:16.568]: TelegramText> ERROR: Could not send text "[30.08.2020, 04:28:15.637]: ERROR: Could not send text "[30.08.2020, 04:28:14.565]: 127.0.0.1:83 - (Error: No predictions? JSON: '{"success":false,"error":"invalid image"}')" to Telegram." to Telegram.
[30.08.2020, 04:28:17.250]: TelegramText> ERROR: Could not send text "[30.08.2020, 04:28:16.349]: ERROR: Could not upload image C:\AI_Input\MNHD.20200830_042813402.jpg to Telegram." to Telegram.
[30.08.2020, 04:28:17.493]: TelegramUpload> ...Finished in 2810ms
[30.08.2020, 04:28:17.495]: DetectObjects> 127.0.0.1:83 - ...Object detection finished:
[30.08.2020, 04:28:17.497]: DetectObjects> 127.0.0.1:83 - Total Time: 4030ms (Count=18, Min=762ms, Max=13132ms, Avg=2222ms)
[30.08.2020, 04:28:17.500]: DetectObjects> 127.0.0.1:83 - DeepStack Time: 1033ms (Count=18, Min=697ms, Max=12969ms, Avg=1502ms)
[30.08.2020, 04:28:17.502]: DetectObjects> 127.0.0.1:83 - File lock Time: 0ms (Count=1, Min=28ms, Max=28ms, Avg=28ms)
[30.08.2020, 04:28:17.505]: DetectObjects> 127.0.0.1:83 - Image Queue Time: 51ms (Count=18, Min=7ms, Max=8191ms, Avg=510ms)
[30.08.2020, 04:28:17.508]: DetectObjects> 127.0.0.1:83 - Image Queue Depth: 1 (Count=18, Min=1, Max=1, Avg=1)
[30.08.2020, 04:28:17.512]: ImageQueueLoop> ...Task at index 0 done.
[30.08.2020, 04:28:17.514]: ImageQueueLoop> Done processing current image queue.
[30.08.2020, 04:34:59.461]: OnCreatedAsync>
[30.08.2020, 04:34:59.463]: OnCreatedAsync> Adding new image to queue: C:\AI_Input\MNHD.20200830_043459407.jpg
[30.08.2020, 04:34:59.472]: ImageQueueLoop> Adding task #1 for file 'MNHD.20200830_043459407.jpg' on URL ''
[30.08.2020, 04:34:59.474]: ImageQueueLoop> Waiting for any of 1 tasks to get done...
[30.08.2020, 04:34:59.477]: DetectObjects> 127.0.0.1:83 - Starting analysis of C:\AI_Input\MNHD.20200830_043459407.jpg...
[30.08.2020, 04:34:59.479]: DetectObjects> 127.0.0.1:83 - (1/6) Uploading image to DeepQuestAI Server at [30.08.2020, 04:35:00.510]: DeepStack> Server.exe> [GIN] 2020/08/30 - 04:35:00 | 200 | 1.0292312s | 127.0.0.1 | POST /v1/vision/detection
[30.08.2020, 04:35:00.511]: DetectObjects> 127.0.0.1:83 - (2/6) Posted in 1030ms, Received a 33 byte response.
[30.08.2020, 04:35:00.520]: DetectObjects> 127.0.0.1:83 - (3/6) Processing results...
[30.08.2020, 04:35:00.522]: DetectObjects> 127.0.0.1:83 - Detected objects:
[30.08.2020, 04:35:00.536]: Save> Settings saved to C:\AI Tools\AITool.Settings.json
[30.08.2020, 04:35:00.536]: DetectObjects> 127.0.0.1:83 - (6/6) Camera MNHD caused a false alert, nothing detected.
[30.08.2020, 04:35:00.541]: DetectObjects> 127.0.0.1:83 - Adding false to history list.
[30.08.2020, 04:35:00.543]: DetectObjects> 127.0.0.1:83 - ...Object detection finished:
[30.08.2020, 04:35:00.545]: DetectObjects> 127.0.0.1:83 - Total Time: 1075ms (Count=19, Min=762ms, Max=13132ms, Avg=2162ms)
[30.08.2020, 04:35:00.549]: DetectObjects> 127.0.0.1:83 - DeepStack Time: 1030ms (Count=19, Min=697ms, Max=12969ms, Avg=1477ms)
[30.08.2020, 04:35:00.551]: DetectObjects> 127.0.0.1:83 - File lock Time: 0ms (Count=1, Min=28ms, Max=28ms, Avg=28ms)
[30.08.2020, 04:35:00.554]: DetectObjects> 127.0.0.1:83 - Image Queue Time: 9ms (Count=19, Min=7ms, Max=8191ms, Avg=484ms)
[30.08.2020, 04:35:00.557]: DetectObjects> 127.0.0.1:83 - Image Queue Depth: 1 (Count=19, Min=1, Max=1, Avg=1)
[30.08.2020, 04:35:00.561]: ImageQueueLoop> ...Task at index 0 done.
[30.08.2020, 04:35:00.563]: ImageQueueLoop> Done processing current image queue.
[30.08.2020, 04:48:26.455]: OnCreatedAsync>
[30.08.2020, 04:48:26.459]: OnCreatedAsync> Adding new image to queue: C:\AI_Input\PHD.20200830_044826384.jpg
[30.08.2020, 04:48:26.562]: ImageQueueLoop> Adding task #1 for file 'PHD.20200830_044826384.jpg' on URL ''
[30.08.2020, 04:48:26.564]: ImageQueueLoop> Waiting for any of 1 tasks to get done...
[30.08.2020, 04:48:26.567]: DetectObjects> 127.0.0.1:83 - Starting analysis of C:\AI_Input\PHD.20200830_044826384.jpg...
[30.08.2020, 04:48:26.569]: DetectObjects> 127.0.0.1:83 - (1/6) Uploading image to DeepQuestAI Server at [30.08.2020, 04:48:27.584]: DeepStack> Server.exe> [GIN] 2020/08/30 - 04:48:27 | 200 | 1.0120262s | 127.0.0.1 | POST /v1/vision/detection
[30.08.2020, 04:48:27.585]: DetectObjects> 127.0.0.1:83 - (2/6) Posted in 1013ms, Received a 401 byte response.
[30.08.2020, 04:48:27.594]: DetectObjects> 127.0.0.1:83 - (3/6) Processing results...
[30.08.2020, 04:48:27.600]: DetectObjects> 127.0.0.1:83 - Detected objects:umbrella (89.55%), chair (99.85%), chair (53.79%), potted plant (58.5%),
[30.08.2020, 04:48:27.605]: DetectObjects> 127.0.0.1:83 - (4/6) Checking if detected object is relevant and within confidence limits:
[30.08.2020, 04:48:27.644]: DetectObjects> 127.0.0.1:83 - umbrella (89.55%) is irrelevant.
[30.08.2020, 04:48:27.665]: DetectObjects> 127.0.0.1:83 - chair (99.85%) is irrelevant.
[30.08.2020, 04:48:27.680]: DetectObjects> 127.0.0.1:83 - chair (53.79%) is irrelevant.
[30.08.2020, 04:48:27.695]: DetectObjects> 127.0.0.1:83 - potted plant (58.5%) is irrelevant.
[30.08.2020, 04:48:27.698]: CleanUpExpiredMasks> Masked object NOT visible - key=176787, name=person, xmin=794, ymin=220, xmax=820, ymax=262, counter=1, create date: 8/30/2020 12:00:53 AM
[30.08.2020, 04:48:27.700]: CleanUpExpiredMasks> Removing expired masked object: key=176787, name=person, xmin=794, ymin=220, xmax=820, ymax=262, counter=0, create date: 8/30/2020 12:00:53 AM for camera PHD
[30.08.2020, 04:48:27.699]: DetectObjects> 127.0.0.1:83 - ### Masked objects summary for camera PHD ###
[30.08.2020, 04:48:27.712]: Save> Settings saved to C:\AI Tools\AITool.Settings.json
[30.08.2020, 04:48:27.712]: DetectObjects> 127.0.0.1:83 - (6/6) Camera PHD caused an irrelevant alert.
[30.08.2020, 04:48:27.715]: DetectObjects> 127.0.0.1:83 - 4x irrelevant, so it's an irrelevant alert.
[30.08.2020, 04:48:27.716]: DetectObjects> 127.0.0.1:83 - ...Object detection finished:
[30.08.2020, 04:48:27.718]: DetectObjects> 127.0.0.1:83 - Total Time: 1253ms (Count=20, Min=762ms, Max=13132ms, Avg=2116ms)
[30.08.2020, 04:48:27.720]: DetectObjects> 127.0.0.1:83 - DeepStack Time: 1013ms (Count=20, Min=697ms, Max=12969ms, Avg=1454ms)
[30.08.2020, 04:48:27.723]: DetectObjects> 127.0.0.1:83 - File lock Time: 0ms (Count=1, Min=28ms, Max=28ms, Avg=28ms)
[30.08.2020, 04:48:27.726]: DetectObjects> 127.0.0.1:83 - Image Queue Time: 104ms (Count=20, Min=7ms, Max=8191ms, Avg=465ms)
[30.08.2020, 04:48:27.728]: DetectObjects> 127.0.0.1:83 - Image Queue Depth: 1 (Count=20, Min=1, Max=1, Avg=1)
[30.08.2020, 04:48:27.731]: ImageQueueLoop> ...Task at index 0 done.
[30.08.2020, 04:48:27.733]: ImageQueueLoop> Done processing current image queue.
[30.08.2020, 04:48:30.453]: OnCreated
 

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
90
Reaction score
114
Location
massachusetts
I'm using AI Tools VorlonCD , Need assistance with Telegram to send photo alerts. Started an acct with Telegram, made a group, got chatid and also token. Unable to sent alerts and have attempted to troubleshoot the errors in the logs. The images are sent to the folder C:/AI Tools/ error. The file resolution was lowered to 1280x720 and file size is approx 600KB . Any assistance is appreciated with this issue and anything identified in the logs. The upload is partial, can upload full if needed. Thanks.

[30.08.2020, 04:28:14.565]: DetectObjects> 127.0.0.1:83 - (Error: No predictions? JSON: '{"success":false,"error":"invalid image"}')
[30.08.2020, 04:28:14.583]: DetectObjects> 127.0.0.1:83 - ERROR: Failure response from DeepStack. JSON: '{"success":false,"error":"invalid image"}'
[30.08.2020, 04:28:14.683]: TelegramUpload> uploading image to chat "405397243"
[30.08.2020, 04:28:15.631]: TelegramText> ERROR: Could not send text "[30.08.2020, 04:28:14.583]: 127.0.0.1:83 - ERROR: Failure response from DeepStack. JSON: '{"success":false,"error":"invalid image"}'" to Telegram.
A few thoughts.
  • Both deepstack and telegram seem to think the image C:\AI_Input\MNHD.20200830_043459407.jpg is invalid. Or perhaps it cannot access it because it is still being written/accessed. Seems less likely since my code waits for full read-write access of the image before sending to deepstack.
  • Try disabling the feature in BI that lowers the DPI, leave it along and see if that helps. Maybe BI isnt create a valid image or its holding the file open too long.
  • Can you manually view images that fail?
  • Plenty of drive space free?
  • Anything special about the C:\AI_INPUT folder? Is it a hardlink/junction? Are there a bajillion images in that folder? Is it SSD or mechanical drive? (Each camera should have its own folder now, and disable the input path on main settings screen)
  • At an admin command line run CHKDSK /f C: and press enter. Let it run on restart, then restart the machine. Maybe something logical wrong with the drive.
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
@Chris Dodge
Just checking out the cancel flag but unable get past the error in the log. I have confirmed that the command to BI is accepted. This what I am sending

[21:56:31.665]: OnCreatedAsync> Adding new image to queue: E:\BlueIris\AI_Input\Drive.20200830_215631624.jpg
[21:56:31.674]: ImageQueueLoop> Adding task #1 for file 'Drive.20200830_215631624.jpg' on URL ''
[21:56:31.677]: ImageQueueLoop> Waiting for any of 1 tasks to get done...
[21:56:31.693]: DetectObjects> 127.0.0.1:82 - Starting analysis of E:\BlueIris\AI_Input\Drive.20200830_215631624.jpg...
[21:56:31.695]: DetectObjects> 127.0.0.1:82 - (1/6) Uploading image to DeepQuestAI Server at [21:56:34.003]: DetectObjects> 127.0.0.1:82 - (2/6) Posted in 2279ms, Received a 33 byte response.
[21:56:34.006]: DetectObjects> 127.0.0.1:82 - (3/6) Processing results...
[21:56:34.009]: DetectObjects> 127.0.0.1:82 - Detected objects:
[21:56:34.011]: DetectObjects> 127.0.0.1:82 - (5/6) Performing alert CANCEL actions:
[21:56:34.020]: Trigger> Index was out of range. Must be non-negative and less than the size of the collection. | Parameter name: index [ArgumentOutOfRangeException] Mod: <Trigger>d__25 Line:1115:29
[21:56:34.031]: CallTriggerURLs> ERROR: Could not trigger URL '', please check if '' is correct and reachable: Value cannot be null. | Parameter name: address [ArgumentNullException] Mod: CallTriggerURLs(String[] trigger_urls) Line:993:21
[21:56:34.088]: Save> Settings saved to C:\Users\Chris\Documents\AI Tool\Release\AITool.Settings.json
[21:56:34.088]: DetectObjects> 127.0.0.1:82 - (6/6) Camera Drive caused a false alert, nothing detected.
[21:56:34.102]: DetectObjects> 127.0.0.1:82 - Adding false to history list.
[21:56:34.113]: DetectObjects> 127.0.0.1:82 - ...Object detection finished:
[21:56:34.115]: DetectObjects> 127.0.0.1:82 - Total Time: 2432ms (Count=1, Min=2432ms, Max=2432ms, Avg=2432ms)
[21:56:34.118]: DetectObjects> 127.0.0.1:82 - DeepStack Time: 2279ms (Count=1, Min=2279ms, Max=2279ms, Avg=2279ms)
[21:56:34.121]: DetectObjects> 127.0.0.1:82 - File lock Time: 0ms (Count=0, Min=0ms, Max=0ms, Avg=ms)
[21:56:34.123]: DetectObjects> 127.0.0.1:82 - Image Queue Time: 12ms (Count=1, Min=12ms, Max=12ms, Avg=12ms)
[21:56:34.127]: DetectObjects> 127.0.0.1:82 - Image Queue Depth: 1 (Count=1, Min=1, Max=1, Avg=1)
[21:56:34.132]: ImageQueueLoop> ...Task at index 0 done.
[21:56:34.134]: ImageQueueLoop> Done processing current image queue.
 

kalyway

n3wb
Joined
Aug 23, 2020
Messages
4
Reaction score
2
Location
USA
Our new mod of AITOOL lets you specify as many DeepStack URL's as you like in settings. If you have more than one image in the queue, they will be processed in parallel in each deepstack server.
The log does get a little more complicated to view since results from each URL are mixed together, but it seems to work well from my initial testing. (@GentlePumpkin )
I'm using this version right now and it works great! I have deepstack running on my unraid server and BI running on my gaming desktop (will soon change this to my unraid server). The dynamic mask is a game changer, IMO. You can fine tune the settings quite a bit.

Dynamic masks, along with crosses zones and object triggers, make it to where I don't think I've gotten one false alert, nor has AITool missed something that has happened in my yard. My neighbors move their vehicle to their driveway/street so my mask might not always be in the same place.

Lastly, I did notice that if you do get a LOT of trigger events then this does seem a bit slower to process the images vs the original AITool. Though this doesn't seem to be an issue with dynamic masks disabled. However, this is also when processing a ton of images, so using a combination of AI, zones, and motion detection... you should most likely be able to get a VERY fast and 95% accurate alerts/recording events.

Thanks so much for such an awesome fork of this tool!

Edit: Just wanted to follow up. I'm sure I need to tweak some of my dynamic mask settings, however, when getting multiple triggers (3-5 pictures or more) then it does seem to process significantly slower. Though the first 1-2 pictures get processed quickly. I'll keep testing as I get more multiple screenshots to scan at once.
 
Last edited:

Jim davis

n3wb
Joined
Mar 29, 2019
Messages
7
Reaction score
0
Location
texas
A few thoughts.
  • Both deepstack and telegram seem to think the image C:\AI_Input\MNHD.20200830_043459407.jpg is invalid. Or perhaps it cannot access it because it is still being written/accessed. Seems less likely since my code waits for full read-write access of the image before sending to deepstack.
  • Try disabling the feature in BI that lowers the DPI, leave it along and see if that helps. Maybe BI isnt create a valid image or its holding the file open too long.
  • Can you manually view images that fail?
  • Plenty of drive space free?
  • Anything special about the C:\AI_INPUT folder? Is it a hardlink/junction? Are there a bajillion images in that folder? Is it SSD or mechanical drive? (Each camera should have its own folder now, and disable the input path on main settings screen)
  • At an admin command line run CHKDSK /f C: and press enter. Let it run on restart, then restart the machine. Maybe something logical wrong with the drive.
Thanks, for taking the time to respond. Will implement the suggested troubleshooting methods. To answer your ?s, yes I can see the images. The files are sent to a folder C:\AI Tools\errors . The drive is SSD, with 56 GB free. Hardlink? All data is located on c: drive. I try to keep the images to a minimal by manually deleting files. (<150) while TS issue). Thanks again for taking the time!!
 

Attachments

WingSuit

n3wb
Joined
Aug 30, 2020
Messages
2
Reaction score
0
Location
Usa
@Chris Dodge love your fork, saved me alot of time trying to do it myself since I'm terrible in c... couple of ideas that could be good :
1. Option to include original alert image, or the image with the ai boxes (save some time when you get an alert and can see what it thinks is there)
2. For telegram a max message per time option. My s/o likes to talk with her mom in the driveway and send 20 telegram alerts in 30 seconds.

Thanks again for a great fork
 

VLITKOWSKI

Young grasshopper
Joined
May 9, 2019
Messages
75
Reaction score
7
Location
France
@Chris Dodge love your fork, saved me alot of time trying to do it myself since I'm terrible in c... couple of ideas that could be good :
1. Option to include original alert image, or the image with the ai boxes (save some time when you get an alert and can see what it thinks is there)
2. For telegram a max message per time option. My s/o likes to talk with her mom in the driveway and send 20 telegram alerts in 30 seconds.

Thanks again for a great fork
Another suggestion
as i'm running AITool in service, it'll be very good to have a webinterface :)
 

Chris Dodge

Pulling my weight
Joined
Aug 9, 2019
Messages
90
Reaction score
114
Location
massachusetts
A few small updates to the VorlonCD fork of this tool...

Please log issues and feature requests for this fork on Github - Try to include as much detail as you can. Pretty hard to keep up with this monster thread.

@WingSuit - After installing the latest version, run it once, close the app and edit AITOOL.SETTINGS.JSON in notepad - change "telegram_cooldown_minutes" to whatever you like. Will need to research option to include original alert image.

@VLITKOWSKI , @Village Guy, @warbux - Creating a true service and web interface is great idea, but big undertaking. I will look into this when I have time. As an partial alternative, DISABLE the NSSM service, enable "Start with user login" in settings, and google for "How to turn on automatic logon in Windows". Using NSSM isnt really a great solution because then when you open a second GUI instance to watch results or change settings, there is a lot of "fighting" for file access of the config and history files.

The correct way to use the NSSM service right now is to STOP the service before opening the GUI version to view history or change settings. Then when done, close the GUI and restart the service.

@Jim davis - I changed a few things around that may help for the invalid image/telegram error. At the very least, a bit more info in the log should appear.

 

cepler

Getting the hang of it
Joined
Aug 13, 2020
Messages
47
Reaction score
76
Location
Allison Park, PA
I'm using AI Tools VorlonCD , Need assistance with Telegram to send photo alerts. Started an acct with Telegram, made a group, got chatid and also token. Unable to sent alerts and have attempted to troubleshoot the errors in the logs.
Be sure you put a '-' before your Chat ID #, also be sure your bot is invited to the group.
 

kalyway

n3wb
Joined
Aug 23, 2020
Messages
4
Reaction score
2
Location
USA
Just wanted to add this link to a fork (not mine), that allows you to save alert images to a Network folder. Great for using a smart hub to capture the image and send an alert to your phone, for example. Thought this feature could potentially be implemented in with the other fork?

 
Last edited:

Jim davis

n3wb
Joined
Mar 29, 2019
Messages
7
Reaction score
0
Location
texas
cepler, The "-" was the issue. Haven't been this elated, since after prom night with keys to a motel room in 1981!. Thanks for the solution to my woes and also a shoutout for the great works you guys do. Volandcd fork, has been a godsend.
 

Eatoff

n3wb
Joined
Aug 28, 2020
Messages
19
Reaction score
3
Location
Australia
I know a few of you are running deepstack on a raspberry pi, any feedback on reliability? My celeron NUC isn't cutting it. Docker on windows 10 it does a 720p res image in about 5 seconds. In the VM I originally had it took 20plus seconds. I see some feedback about the pi and NCS2 running in under a second, so looking for some feedback before I go down that route. It appears it's still in alpha
 

Tinbum

Pulling my weight
Joined
Sep 5, 2017
Messages
446
Reaction score
126
Location
UK
I know a few of you are running deepstack on a raspberry pi, any feedback on reliability? My celeron NUC isn't cutting it. Docker on windows 10 it does a 720p res image in about 5 seconds. In the VM I originally had it took 20plus seconds. I see some feedback about the pi and NCS2 running in under a second, so looking for some feedback before I go down that route. It appears it's still in alpha
I ordered the bits last week to do it and will let you know once they arrive at the end of the week and I've tested it..
 
Top