<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://blueirissoftware.com/forum/app.php/feed/forum/16" />

	<title>Blue Iris</title>
	<subtitle>Blue Iris User Group</subtitle>
	<link href="https://blueirissoftware.com/forum/index.php" />
	<updated>2022-01-13T21:27:37+00:00</updated>

	<author><name><![CDATA[Blue Iris]]></name></author>
	<id>https://blueirissoftware.com/forum/app.php/feed/forum/16</id>

		<entry>
		<author><name><![CDATA[varghesesa]]></name></author>
		<updated>2022-01-13T21:27:37+00:00</updated>

		<published>2022-01-13T21:27:37+00:00</published>
		<id>https://blueirissoftware.com/forum/viewtopic.php?p=12085#p12085</id>
		<link href="https://blueirissoftware.com/forum/viewtopic.php?p=12085#p12085"/>
		<title type="html"><![CDATA[DeepStack • DeepStack user experience]]></title>

					<category term="DeepStack" scheme="https://blueirissoftware.com/forum/viewforum.php?f=16" label="DeepStack"/>
		
		<content type="html" xml:base="https://blueirissoftware.com/forum/viewtopic.php?p=12085#p12085"><![CDATA[
<span style="font-size:150%;line-height:116%"><strong class="text-strong">Introduction</strong></span><div style="margin-left:3em"><br>The DeepStack integration has been widely popular.  The value of AI in surveillance is it improves accuracy to detect objects and reduces false alerts.  AI will draw attention to activity that matters by identifying objects that could be missed by humans because of lack of attention or hard to see at night.  AI also suppresses events that do not matter such as moving shadows from the wind, changes in sunlight, flies, birds, squirrels, rain etc.  AI is becoming a very effective tool for outdoor cameras.<br><br></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">User experience</strong></span><div style="margin-left:3em"><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2366" class="postimage" alt="ai-alerts_optimized.png" onclick="viewableArea(this);" /></dt></dl></div><br>The above image shows the user experience across all the BI modalities: console, web interface and mobile interface.  Consistent across all modalities are annotations on the alert image identifying objects found and icons in the alert list to easily identify alerts / cancelled alerts.<br><br><strong class="text-strong"><a name="Annotation colors">Annotation colors</a></strong><ul><li>Orange: High level of confidence (&gt;67%).</li><li>Yellow: Confidence level &lt;67%, but meets your threshold, e.g. 50%.</li><li>Blue: Static object/Occupied state.  See above for details.</li><li>Red: Cancelled alert based on "To cancel" field in Camera settings.</li><li>Green:  Objects of no interest.  <br>For example a boat appeared in the scene but boat is not listed as an object of interest.</li></ul><br><strong class="text-strong">Alerts list Icons:</strong><div style="margin-left:3em"><br><strong class="text-strong">Person</strong><br><strong class="text-strong">Car</strong><br><strong class="text-strong">Green check</strong>: AI confirmation, i.e. AI found an object, but no unique icon for object.<br><strong class="text-strong">Flag</strong>: Same Flag function as before.  <br>There is a user setting to automatically flag confirmed AI alerts.<br>Camera settings -&gt; Trigger tab -&gt; AI button -&gt; <strong class="text-strong">Auto-flag confirmed alerts</strong>  (Default is unselected)<br><strong class="text-strong">Cancelled symbol</strong>: nothing found<br><strong class="text-strong">Occupied State / Static Object  (details below)</strong><br><br><br><br></div></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Integration details</strong></span><div style="margin-left:3em"><br><strong class="text-strong">Static object</strong><br><br>A static object is an object that is NOT moving.  The most common example is not to keep triggering on a mailbox that the AI keeps misinterpreting as a person.  BI comes with advanced alerting by overlapping motion with objects before sending an alert.  This reduces the majority of false alerts due to static objects.<br><br><strong class="text-strong">Static objects will only have a blue annotation.  Occupied state will include the time symbol.</strong><br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2367" class="postimage" alt="occupied state.PNG" onclick="viewableArea(this);" /></dt></dl></div><br><strong class="text-strong"><a name="Occupied state">Occupied state</a></strong><br>There still exists some stubborn scenes where Occupied State provides even more value.  For example, a parked car in the driveway underneath a tree for shade could be challenging.  The shadows from the tree could trigger motion and the motion boxes could very well overlap with the car causing alerts.  Occupied state should prevent such alerts based on logic described below.  <br><br>Furthermore a parked car is NOT a permanently static object like a mailbox.  When the car leaves and comes back, BI should alert on the departure/return.  The occupied state algorithm is trying to account for all these cases.<br><br><strong class="text-strong">Occupied state has the timer icon AND uses the blue annotation.</strong><br><br><span style="text-decoration:underline">Logic behind Occupied State</span><br>Same object type: +/- 10% confidence level<br>Same location: +/- 5%<br>Same object color (removed because many cameras go black&amp;white, i.e. IR, at night.  v5.5.1.17)<br><br>Occupied state list:  BI maintains two lists during an alert.  <ul><li>Current alert list:  objects identified in current alert</li><li>Static object list: A list of objects that it perceives to be static, e.g. a parked car, based off of past alerts.</li></ul>Identifying static objects<br>When an alert occurs, each object(s) in the current alert list is first compared against all the objects in the static object list.  If an object in the current alert matches any object in the static object list , then the object is considered static, e.g. parked car, and BI will NOT fire an alert based on this object.  The static object icon will be displayed if all objects are determined to be static.<br><br>Identifying new objects<br>If an object on the current alert list does NOT match any object in the static object list an alert is fired.  The new object will be placed in the static object list.  This is how the software distinguishes between parked cars and cars that drove by.  This is also how the static object list gets updated.<br><br>Removing static objects<br>Static objects continue to remain in the static object list if the object is matched.  With every match, the timestamp on the object is updated.  <br><br>If an alert arrives and the static object list has objects that were NOT matched by any of the current alert objects AND those static objects are older than 2 min, those objects are purged from the static object list.  We know AI is not perfect which is why we created the 2 min window.  A static object detected in one frame may not be detected in another frame due to lighting changes etc.  In order to remove these inaccuracies, we assume as the camera alerts, at least one frame will identify the static object correctly within 2 min or earlier.  FYI, engineering keeps tweaking the window.  It started at 30s and moved to 2 min based on false alarms.<br><br><br><br><strong class="text-strong">Static Objects is a setting that can be turned off if necessary (you want more sensitivity).  This may be a good idea in high traffic areas like a camera facing a door or a car entry gate.</strong><br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2368" class="postimage" alt="static object.png" onclick="viewableArea(this);" /></dt></dl></div><br><br></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Camera settings</strong></span><div style="margin-left:3em"><br>Camera settings -&gt; Trigger tab -&gt; Artificial Intelligence (default settings)<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2370" class="postimage" alt="deepstack user experience_default settings.png" onclick="viewableArea(this);" /></dt></dl></div><br>Click on the Help button for details on each setting.  Below is some insight based on tickets.<br><br><strong class="text-strong">Custom models</strong><div style="margin-left:3em">Users often get confused how to enable/disable models on a per camera basis.<br>DeepStack has two default models: objects, faces<br>Suppose you created/added two custom models: dark, combined<br><br>Camera 1 only runs dark: Custom models = dark.  This is an inclusion list since no :0 values and dark is the only specified model.<br>Camera 2 runs faces and objects.  <div style="margin-left:3em">Custom models = dark:0, combined:0.  Exclusion list that runs all the models except dark and combined, i.e. only the default objects will be run.<br>Custom models = faces, objects.  Inclusion list that only runs faces and objects, i.e. dark and combined will not be run.</div>Camera 3 runs faces, objects and combined: Custom model = dark:0.  Run all the models except dark.<br><br></div><strong class="text-strong">List of Objects Available for detection</strong><div style="margin-left:3em"><br>Best to check <a href="https://docs.deepstack.cc/object-detection/index.html" class="postlink">deepstack.cc</a> for current list of objects.<div class="codebox"><p>Code: </p><pre><code>person,   bicycle,   car,   motorcycle,   airplane,bus,   train,   truck,   boat,   traffic light,   fire hydrant,   stop_sign,parking meter,   bench,   bird,   cat,   dog,   horse,   sheep,   cow,   elephant,bear,   zebra, giraffe,   backpack,   umbrella,   handbag,   tie,   suitcase,frisbee,   skis,   snowboard, sports ball,   kite,   baseball bat,   baseball glove,skateboard,   surfboard,   tennis racket, bottle,   wine glass,   cup,   fork,knife,   spoon,   bowl,   banana,   apple,   sandwich,   orange, broccoli,   carrot,hot dog,   pizza,   donut,   cake,   chair,   couch,   potted plant,   bed, dining table,toilet,   tv,   laptop,   mouse,   remote,   keyboard,   cell phone,   microwave,oven,   toaster,   sink,   refrigerator,   book,   clock,   vase,   scissors,   teddy bear,hair dryer, toothbrush.</code></pre></div></div><br><br><strong class="text-strong">Motion triggers vs Alerts</strong><br><br>With Artificial Intelligence there is now a wider gap between Motion Triggers, e.g. the camera triggered because a deer walked across the lawn, and an Alert, i.e. the AI correctly did not recognize the deer as a person, and therefore cancelled the alert.<br><br>The AI setting "Hide cancelled alerts on timeline and 'all alerts'" is on by default, i.e. most users after setting up their Motion and AI, do not want to be bothered by the "nothing found" alerts, because that is why they installed AI in the first place.<br><br>However, I do see users in the country side that like to record wildlife such as bears, coyotes, deer etc when they approach their property.  BI AI will cancel the Alert, however <strong class="text-strong">motion triggers are still always recorded</strong>.  This implementation was chosen just in case the AI missed something, you still had the motion trigger recording.  It turns out, this implementation provides added benefit for the users in the country side that still like to capture recordings of wildlife.  The "Hide cancelled alerts on timeline and 'all alerts'" can be unselected if you want "nothing found" alerts still listed in the Alerts folder.  Furthermore, cancelled alerts are always listed in the cancelled alerts folder regardless of the "Hide cancelled alerts on timeline and 'all alerts'" setting.<br><br><br></div><p>Statistics: Posted by <a href="https://blueirissoftware.com/forum/memberlist.php?mode=viewprofile&amp;u=521">varghesesa</a> — Thu Jan 13, 2022 9:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[varghesesa]]></name></author>
		<updated>2021-09-17T20:36:24+00:00</updated>

		<published>2021-09-17T20:36:24+00:00</published>
		<id>https://blueirissoftware.com/forum/viewtopic.php?p=10753#p10753</id>
		<link href="https://blueirissoftware.com/forum/viewtopic.php?p=10753#p10753"/>
		<title type="html"><![CDATA[DeepStack • DeepStack installation]]></title>

					<category term="DeepStack" scheme="https://blueirissoftware.com/forum/viewforum.php?f=16" label="DeepStack"/>
		
		<content type="html" xml:base="https://blueirissoftware.com/forum/viewtopic.php?p=10753#p10753"><![CDATA[
<span style="font-size:150%;line-height:116%"><strong class="text-strong">Introduction</strong></span><br><br>Blue Iris integrated directly with the Deepstack open source AI project with the 5.4.0 release.  This is an on-prem only AI solution requested by many users.  Deepstack (deepstack.cc) was a private AI company (December 2018) located in Nigeria that recently open sourced their work (March 2019).  If you prefer to listen instead of read, watch the <a href="https://youtu.be/Af8z9lUq_QA" class="postlink">DeepStack AI webinar</a> associated with this article.<br><br>The <a href="https://blueirissoftware.com/forum/viewtopic.php?f=16&amp;t=3029" class="postlink">DeepStack user experience article</a> goes under the covers of the integration to explain the user interface as well as the unique advantages of the integration.<br><br>The <a href="viewtopic.php?f=12&amp;t=2535" class="postlink">DeepStack Fine tuning article</a> explains the DeepStack analysis feature.  Makes trouble-shooting AI alerts so easy now.<br><br>The <a href="viewtopic.php?f=12&amp;t=2485" class="postlink">DeepStack Gotchas</a> article are all the lessons learned from past tickets.<br><br><br><span style="font-size:150%;line-height:116%"><strong class="text-strong">Architecture</strong></span><br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1937" class="postimage" alt="deepstack architecture.png" onclick="viewableArea(this);" /></dt></dl></div><br><br><span style="font-size:150%;line-height:116%"><strong class="text-strong">Deepstack AI Installation</strong></span><br><br>Depending on your machine, you can choose the many Windows installation options.  Below is the link to the Windows installation page.  The CPU version is very easy to install.  Just run the installer.<br><br><a href="https://docs.deepstack.cc/windows/" class="postlink">https://docs.deepstack.cc/windows/</a><br><br>Here is a <a href="https://youtu.be/nLH9GEcdb9Y" class="postlink">link to a great video on setting up BI + DeepStack</a>.<div style="margin-left:3em"><br> <img class="smilies" src="https://blueirissoftware.com/forum/images/smilies/icon_exclaim.gif" width="15" height="17" alt=":!:" title="Exclamation"> Intel from a user.  20220-Jan-28<div style="margin-left:3em">A new version of DeepStack was just released. There is an issue with the way Blue Iris starts up the new version of DeepStack. The issue is DS version 2021.09.01 had two of the same files just named differently in the folder "C:\DeepStack\server".  One was named deepstack.exe and the other was named server.exe. Blue Iris is trying to start up server.exe.<br><br><strong class="text-strong">DeepStack version 2022.01.1</strong> only has one file in folder "C:\DeepStack\server" named deepstack.exe. I did a temporary fix by  copying deepstack.exe in the same folder with the file name server.exe.<br><br>Link: <a href="https://github.com/johnolafenwa/DeepStack/releases/tag/2022.01.1" class="postlink">https://github.com/johnolafenwa/DeepSta ... /2022.01.1</a><br><br><strong class="text-strong">Engineering states 5.5.5.1 will have the fix.</strong><br><br></div> <img class="smilies" src="https://blueirissoftware.com/forum/images/smilies/icon_exclaim.gif" width="15" height="17" alt=":!:" title="Exclamation">  The DeepStack website needs some cleanup.  There are pages on the site that point to a legacy installer that does not work!  Stick to the URL above and you will be fine.  In particular, the incorrect installer name is DeepStack.Installer.exe.  My hunch is this version was created around 2019 before the company decided to open source their software.  Another clue you have the wrong version is when you bring up the DeepStack splash page, Activation Key information is part of the page.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1948" class="postimage" alt="deepstack wrong activation page.PNG" onclick="viewableArea(this);" /></dt></dl></div><br><br>If you choose the wrong version, you will find BI cannot start DeepStack automatically.  It cannot communicate with the server either with below errors in the Status -&gt; Log.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1940" class="postimage" alt="deepstack error.PNG" onclick="viewableArea(this);" /></dt></dl></div><br>As a final check, below is a screenshot of my install directory.  I installed the Windows GPU version so your directory may be different based on the version installed.  I have seen tickets where the install directory did not even have a README.md file which made me suspicious as to whether the installation was valid.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2434" class="postimage" alt="deepstack installation_install dir.png" onclick="viewableArea(this);" /></dt></dl></div><br></div>Other useful Deepstack resources;<ul><li>Deepstack forum: <a href="https://forum.deepstack.cc/" class="postlink">https://forum.deepstack.cc/</a></li><li>Deepstack AI Server website: <a href="https://deepstack.cc/" class="postlink">https://deepstack.cc/</a></li></ul>I decided to use the GPU option because of my NVidia GPU.  <br><br>According to the documentation, the GPU installation also requires CUDA 10.1 and cuDNN.  The latest version of CUDA is 11.2.  I took a chance with CUDA 11.2 and it seems to be working fine for me.  I will share issues if I come across any.  For those who are curious, CUDA is an API created by NVidia to make parallel programming on NVidia GPUs easier.<br><br><br><strong class="text-strong"><a name="Manual start">Manual start</a></strong><br>Run DeepStack manually to confirm Installation.<br><br>I prefer to work in stages.  For me a good first step is to install/run DeepStack manually.  To start DeepStack manually, from a CMD prompt run the below command.<br><div class="codebox"><p>Code: </p><pre><code>deepstack --VISION-DETECTION True --PORT 82</code></pre></div>The above command assumes you want to run DeepStack on port 82.  Below is an image of the DeepStack console when the software is running correctly.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1949" class="postimage" alt="deepstack started.PNG" onclick="viewableArea(this);" /></dt></dl></div><br>In addition to the console, you also get confirmation via the DeepStack browser confirmation page.  From a browser go to localhost:82 (or port chosen to run the server)<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1935" class="postimage" alt="deepstack.PNG" onclick="viewableArea(this);" /></dt></dl></div><br>If DeepStack is running correctly, connect BI to DeepStack to confirm BI and DeepStack can work together.  To do so, edit Global settings -&gt; AI tab.  The below settings tell BI where the DeepStack server is running, i.e. on the same machine on port 82.  With this information, BI is able to send AI requests to DeepStack.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1950" class="postimage" alt="deepstack connect.PNG" onclick="viewableArea(this);" /></dt></dl></div><br>Checklist: Confirm whether BI can communicate successfully with the DeepStack server.<br><ul><li>Global settings -&gt; AI tab: <br>Select "Use DeepStack server on IP/port". (see above)<br>Specify which port to use for DeepStack.  82 is the default.  As long as it is NOT the same port as the BI web server you are fine.  I'm assuming you installed DeepStack on your BI machine, thus IP Address = 127.0.0.1.  BI does allow the ability to run DeepStack on a separate server.</li><li>DO NOT check Auto start/stop with Blue Iris.</li><li>Jump to <strong class="text-strong">Blue Iris AI Camera settings</strong> section below and turn on DeepStack for one camera.</li><li>Check for any errors in Status -&gt; log.<br>When working correctly, the motion event in the log should be followed by a DeepStack response as seen below.<div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1944" class="postimage" alt="deepstack status log.PNG" onclick="viewableArea(this);" /></dt></dl></div></li><li>Check the DeepStack console as well.  Are requests / response being processed by DeepStack?</li></ul>If connected correctly and you activated AI on one of your cameras (see below), you can see request/response messages in the DeepStack console as seen below.  At this point you know DeepStack is installed and running correctly.  <br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1941" class="postimage" alt="deepstack log.PNG" onclick="viewableArea(this);" /></dt></dl></div><br><br><strong class="text-strong">BI Manages DeepStack</strong><br>Once you confirmed BI/DeepStack communication, you can consider tightly connecting BI to DeepStack by activating "Auto start/stop" via Global settings -&gt; AI tab as seen below.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1938" class="postimage" alt="AI global settings.png" onclick="viewableArea(this);" /></dt></dl></div><br><br><strong class="text-strong">Checklist:  Now you can automate start/stop of DeepStack from BI.</strong><br><ul><li>Check "Auto start/stop with Blue Iris.<br>Best to install DeepStack in default location (C:\DeepStack).  If you choose a different location, please specify accordingly.</li><li>Stop the DeepStack server you started manually.  May need to restart machine just to make sure all processes run by DeepStack are shutdown.</li><li>Hit Start now.</li><li>Use Test in browser link to confirm Deepstack is running.</li><li>Similar to above, confirm one camera is processing DeepStack motion events properly.</li><li>If you want to play with Facial recognition, you can activate the feature as well.</li></ul>Besides the splash page you can also double check whether DeepStack processes are running.<br>Bring up task manager.  If you see the below processes running, you know DeepStack is running.<br>server.exe and redis-server.exe are must processes.<br>python processes will also be seen but not sure if 2 or 1 or more python processes will be created based on load.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1953" class="postimage" alt="deepstack article processes.png" onclick="viewableArea(this);" /></dt></dl></div><br><br><strong class="text-strong">Distributed Systems</strong><br>It is feasible to run BI on one machine and Deepstack on a completely separate machine.  A separate machine could mean a completely separate hardware server or a VM or a Dockers container.<br><br>One user stated he did so successfully by running a Docker container in an Ubuntu 18.04 VM.  In his implementation the IP Address for the Docker container was 10.32.1.9.<br><br>The docker command was:<br><div class="codebox"><p>Code: </p><pre><code>docker run -d \        --name=deepstack \        -p 80:5000 \        -v /opt/deepstack-storage:/datastore:rw \        -e "VISION-DETECTION=True" \        -e "VISION-FACE=True" \        deepquestai/deepstack</code></pre></div>/opt/deepstack-storage was the folder where Docker was allowed to permanently store things.<br><br>Once setup, similar to the non-distributed system (above), check/confirm that you can access the Deepstack confirmation page from a browser on the BI server (Test in browser link).  In BI, the AI settings based on the Docker IP Address mentioned above would be:<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1939" class="postimage" alt="deepstack-ai-settings.png" onclick="viewableArea(this);" /></dt></dl></div><br>If you see traffic on the AI machine but no objects in BI, you likely did not enable the vision detection when starting DeepStack.  The parameters BI uses to start DeepStack below.<br><div class="codebox"><p>Code: </p><pre><code>-VISION-SCENE=False -VISION-DETECTION=True -VISION-FACE=True -ADMIN-KEY= -API-KEY= -PORT=82</code></pre></div><br><br><strong class="text-strong"><span style="font-size:150%;line-height:116%">Next steps / Submit a ticket</span></strong><br><br>This article is about installing and running DeepStack.<br><br>If you are having issues with installing or running DeepStack, it is best to go to the <a href="viewtopic.php?f=12&amp;t=2485" class="postlink">Gotchas article</a> to see if others have seen and resolved the same issue.<br>DeepStack is an open source 3rd party AI solution.  Issues running it are probably better addressed by experts on the DeepStack forum.<p>Statistics: Posted by <a href="https://blueirissoftware.com/forum/memberlist.php?mode=viewprofile&amp;u=521">varghesesa</a> — Fri Sep 17, 2021 8:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[varghesesa]]></name></author>
		<updated>2021-08-15T22:40:40+00:00</updated>

		<published>2021-08-15T22:40:40+00:00</published>
		<id>https://blueirissoftware.com/forum/viewtopic.php?p=10028#p10028</id>
		<link href="https://blueirissoftware.com/forum/viewtopic.php?p=10028#p10028"/>
		<title type="html"><![CDATA[DeepStack • DeepStack Analysis - Fine Tuning Settings]]></title>

					<category term="DeepStack" scheme="https://blueirissoftware.com/forum/viewforum.php?f=16" label="DeepStack"/>
		
		<content type="html" xml:base="https://blueirissoftware.com/forum/viewtopic.php?p=10028#p10028"><![CDATA[
<span style="font-size:150%;line-height:116%"><strong class="text-strong">Introduction</strong></span><div style="margin-left:3em"><br>BI leverages AI with your motion settings in order to provide very intelligent alerts.  This is why a camera facing a parking lot will alert on a moving car but not alert on a parked car.  This article is a deep dive into the DeepStack Analysis functionality.  <br><br>The webinar associated with this article is <a href="https://drive.google.com/file/d/1i-HEUDxfYnWmgZNeQ9blpAws0kHcP1iH/view?usp=sharing" class="postlink">The DeepStack Analysis Feature</a>.  The webinar provides a demo of the BI software while going through the article content.<br><br><strong class="text-strong"><a href="viewtopic.php?f=12&amp;t=2526" class="postlink">Playback window article/webinar</a></strong><br>This article deep dives into the playback window.  The playback window has powerful functionality to troubleshoot motion and DeepStack settings.  Setting the motion sensor correctly is a big if not bigger part in getting smart alerts from your cameras.  <br><br></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Best Practice</strong></span><div style="margin-left:3em"><br><strong class="text-strong">Clone the camera</strong><br><br>Leverage BI functionality as much as possible to make your life easier.  Fine tuning your Motion and DeepStack settings to deliver smarter alerts is as much an art as a science.  Therefore, use camera clones to compare before and after results so you know for yourself whether you made alerts better or introduced more issues.<br><br>Cloning cameras is easy in BI.  When adding a camera, select <strong class="text-strong">Copy from another camera</strong>.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1957" class="postimage" alt="deepstack fine tuning - clone.png" onclick="viewableArea(this);" /></dt></dl></div><br>Unselect <strong class="text-strong">Clone master</strong> when creating the duplicate.  Camera settings -&gt; General tab.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1958" class="postimage" alt="deepstack fine tuning - clone master.png" onclick="viewableArea(this);" /></dt></dl></div><br><br><strong class="text-strong">DeepStack Settings</strong><br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1644" class="postimage" alt="playback deepstack camera settings.png" onclick="viewableArea(this);" /></dt></dl></div><br>Instead of walking through all the settings (see <a href="viewtopic.php?f=12&amp;t=2236" class="postlink">DeepStack article</a>), this article highlights the key settings that may need to be changed for Fine tuning.  The other settings are either on/off by default or changed based on user preference.  They should have no bearing on the Fine Tuning process.<br><ul><li><strong class="text-strong">Save DeepStack analysis details</strong>:  This is THE KEY SETTING.  BI now makes understanding what is happening in the software so easy.<br>Easy to check if DeepStack analysis is active.  Simply go to your Alerts folder and see if *.dat files are starting to populate after camera alerts.<br>Definitely unselect after fine tuning is completed.  This feature takes CPU resources and storage resources.</li><li><strong class="text-strong">Hide cancelled alerts on timeline and 'all alerts'</strong>:  I prefer this unselected while fine tuning because I like to leverage the Alerts list to see all alerts that are processed in BI.  <br>If this feature were active, the "nothing found" alerts would be listed in the "Cancelled alerts" folder. <br>Many users select this feature once fine tuning is completed.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1645" class="postimage" alt="deepstack debug clipslist.PNG" onclick="viewableArea(this);" /></dt></dl></div></li><li><strong class="text-strong">Use mainstream if available</strong>:  Unselected during fine tuning.<br>This setting is important because the motion sensor is applied to the sub stream if you have connected two streams to your camera.<br>Motion and object overlap analysis is a huge value add that makes BI AI alerts accurate.  So I want DeepStack to analyze the exact same frame that was used to detect motion so the overlap analysis is as accurate as possible.<br>User preference whether to leave unselected after fine tuning.  I leave it unselected. However, if you have really good synchronization between your main and sub stream and you feel you are getting more accurate AI object detection from the high res main frame, then selecting the mainstream may make sense.  Keep in mind, analyzing high resolution images also takes more CPU/GPU load.</li><li>Other optional settings I find useful at times<ul><li>Recording tab: Set recording to <strong class="text-strong">When triggered</strong>.  Uncheck <strong class="text-strong">Combine or cut video each</strong>.  This way a new BVR is created for each trigger.  Because you have a BVR for each trigger event, it's easy to replay a missed alert/false alert and tweak your motion settings and observe if the tweaks improve your alerts.  If you cannot figure out an issue, it is also easy to send the short bvr of the motion trigger to support for review!</li><li>Trigger tab: Leave Motion overlays off.  Camera settings -&gt; Trigger tab -&gt; Motion Sensor.  Highlight: Do not highlight motion.<br>The overlays may interfere with DeepStack resulting in more missed objects.  Best to turn overlays off when using DeepStack.<br>Engineering will be addressing this issue.<br>FYI, with D2D recording, turning motion overlays on/off is less important since they are saved as meta data regardless.  Therefore, even if you do not see highlights in Live view, you can still do so during playback.<br>If you selected Re-encode when recording, then unfortunately, no motion overlays are available if they are turned off for Live View.</li>  <li>Trigger tab:  Set Add to alerts list = Hi-res JPEG files.<br>With the *.dat files now created with <strong class="text-strong">Save DeepStack analysis details</strong> option, having the JPEG images makes finding the corresponding *.dat file easy, especially when you are stuck and need to consult with support.  <br>With the JPEG images, when you right click on an alert -&gt; Open containing folder, BI will find the JPEG for you.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1646" class="postimage" alt="playback alerts open containing folder.png" onclick="viewableArea(this);" /></dt></dl></div><br>After doing so, the preceding *.dat file in Window Explorer is the *.dat file associated with the selected Alert.  Makes identifying *.dat files for alerts of interest easier in Windows Explorer.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1647" class="postimage" alt="deepstack alerts folder.PNG" onclick="viewableArea(this);" /></dt></dl></div></li></ul></li> </ul><strong class="text-strong">Motion sensor</strong><br>This section explains default settings that work well with DeepStack.  <div style="margin-left:3em"><br><strong class="text-strong">Motion sensor vs AI</strong><br>The choices are often to reduce motion sensitivity and have AI take more responsibility for filtering alerts.  AI could take a lot of CPU/GPU resources.  You will need to balance how much filtering is to be done by the motion sensor vs AI in order to work well with your CPU/GPU resources.<br><br><img class="smilies" src="https://blueirissoftware.com/forum/images/smilies/icon_idea.gif" width="15" height="17" alt=":idea:" title="Idea"> Object detection:  <strong class="text-strong">Turning object detection off is a major no, no.</strong>  If BI does NOT identify objects, BI will NOT send frames to DeepStack for processing.  You basically turned DeepStack OFF.<br><br>Algorithm:  Simple vs Edge vector?  I lean towards Simple because best to increase the sensitivity of the motion sensor and trust the AI to cancel false triggers.  <br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2374" class="postimage" alt="deepstack fine tuning_motion sensor.png" onclick="viewableArea(this);" /></dt></dl></div><br><br>Object travels:  Same as above, best to increase the sensitivity of the motion sensor and trust the AI to cancel false triggers.<br><br>Object crosses zones:  I like having a Zone B that triggers the camera at an ideal location where the AI has a good look at the object.  See Pro Tip 1 below for details.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2375" class="postimage" alt="deepstack fine tuning_object detection.png" onclick="viewableArea(this);" /></dt></dl></div><br></div></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">DeepStack analysis</strong></span><div style="margin-left:3em"><br>Understanding why DeepStack did not alert has just become a lot easier with the "Save DeepStack analysis" feature.  Now BI can show you exactly which images(i.e. frames/samples) were processed by DeepStack when a motion trigger fired so you can understand why an alert was or was not sent.<br><br>In order to get the feature to work:<ul><li>First check "Save DeepStack analysis" in Camera settings -&gt; Trigger tab -&gt; Artificial Intelligence.  This setting will start creating *.dat files in the Alerts folder pertaining to the meta data for each motion trigger.</li><li>Open the Status -&gt; DeepStack window.</li>  <li>Double click any motion trigger in the Alerts List and the DeepStack Status window will populate with the DeepStack meta data making it much easier to understand what is going on.</li></ul><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1648" class="postimage" alt="save deepstack analysis.png" onclick="viewableArea(this);" /></dt></dl></div><br>This example highlights an alert that was cancelled by DeepStack.<br><br><strong class="text-strong">Now you see exactly what BI does when making alert decisions based on your settings.</strong>  Tweaking settings based on missed alerts has become much easier.<br><br>The logs also provide data consistent with the DeepStack analysis data.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1649" class="postimage" alt="deepstack log verification.PNG" onclick="viewableArea(this);" /></dt></dl></div><br>From the logs, motion was detected at 11:00:51.907.  DeepStack cancelled the alert at 11:01:01.504 roughly 10s later.<br><br><br></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">DeepStack tab</strong></span><div style="margin-left:3em"><br>Status button -&gt; DeepStack tab<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1654" class="postimage" alt="deepstack analysis.png" onclick="viewableArea(this);" /></dt></dl></div><div style="margin-left:3em"><br><strong class="text-strong">Frame Analysis Window</strong><br><br>The below image connects the AI settings in BI to the output from the DeepStack tab.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1652" class="postimage" alt="Log DeepStack.png" onclick="viewableArea(this);" /></dt></dl></div><ul><li>BI will always analyze the trigger leading edge image (T=0).  This is the frame that caused BI to trigger.</li> <li>+ real-time images = 2.  Tells BI number of frames to sample beyond the trigger leading edge image (T=0, T=1, T=2).</li><li>Begin analysis with motion-leading image.  Tells BI to also sample motion leading edge (T-1).</li><li>Make note of No object found and Motion detected symbols when a frame is analyzed.</li><li> The Asterisk marks the first frame where DeepStack identified any object in the list.   <br>Or it marks the last frame sampled.  In this case, the alert was cancelled so the Asterisk marks the last frame sampled.<br>FYI, this frame is also the DeepStack Alert Image.  It is saved to the database and is the image that appears in the Alerts list.</li></ul><br><span style="text-decoration:underline">Confirmed vs Cancelled Alert</span><br><br>The * frame easily tells you whether an Alert was confirmed or cancelled.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1959" class="postimage" alt="deepstack fine tuning - confirmed vs cancelled.png" onclick="viewableArea(this);" /></dt></dl></div><br><br>Note, DeepStack STOPS analyzing further frames once the first frame that identifies any object of interest is identified.  Therefore, if you tell DeepStack to analyze 10 additional frames and an object of interest was found in the trigger frame (T=0), BI will not continue sampling 10 additional frames.  BI will then fire the Alert (if any).<br><br>Thus, subsequent objects that may appear later within same motion trigger are NOT identified nor does BI fire subsequent alerts.  This is also why you may have set DeepStack to analyze 10 images, but DeepStack stopped after analyzing two frames.  An object on the list was found on the second frame.  Therefore BI stopped processing the motion trigger and sent the alert.<br><br><br> <img class="smilies" src="https://blueirissoftware.com/forum/images/smilies/icon_question.gif" width="15" height="17" alt=":?:" title="Question"> Review <a href="viewtopic.php?f=11&amp;t=2402" class="postlink">Trigger Tab article / webinar</a> if you want a refresher on the meaning of Motion leading edge and/or Trigger leading edge.<br><br>Other motion trigger settings that should be considered when determining AI settings.<br><strong class="text-strong">Break time</strong>:  Camera settings -&gt; trigger tab.  Default = 10s  <br>Many users select a <strong class="text-strong">+ real-time images</strong> setting equal to the Break time.  Users then set <strong class="text-strong">analyze one each</strong> equal to 750ms or 1s.<br>If your CPU/GPU has the ability to handle the load, this allows BI to sample every 1s or less which should result in few missed alerts.<br><br><strong class="text-strong">DeepStack Image</strong><br><br>The image has a wealth of information.   <ul><li>The black areas show the areas ignored by Motion and DeepStack.</li><li>The annotation(s) shows what DeepStack identified.<br>Blue indicates BI believes the person is static, i.e. not moving.</li><li>The yellow motion highlight shows where BI motion is identified.<br>This image shows why BI cancelled the alert, there was no overlap between the Motion and the DeepStack object (person identified).</li></ul><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1655" class="postimage" alt="deepstack frame.png" onclick="viewableArea(this);" /></dt></dl></div><br> <img class="smilies" src="https://blueirissoftware.com/forum/images/smilies/icon_idea.gif" width="15" height="17" alt=":idea:" title="Idea"> Most common gotcha!<br><br>The example above highlights the power of the DeepStack analysis feature.  The issue here is the main stream is used for DeepStack analysis and as we know, BI motion sensor always works from the sub stream.  The motion is far ahead of the DeepStack object.  This is an obvious clue that the main stream and the sub stream are not synchronized.<br>Fix:  <ul><li>Tell DeepStack to use the sub stream for analysis.  <strong class="text-strong">Use main stream if available</strong> should be UNSELECTED.</li><li>OR Uncheck "Use RTSP/stream timecode" if you want to continue processing the mainstream.  <br>IP Config dialog for the Camera connector settings.<div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1856" class="postimage" alt="deepstack fine tuning_rtsp setting.png" onclick="viewableArea(this);" /></dt></dl></div></li></ul><br></div></div><span style="font-size:150%;line-height:116%"><strong class="text-strong">Final thoughts</strong></span><div style="margin-left:3em"><br>DeepStack analysis is great because it will tell you why alerts were missed.  At the end of the day, you basically have 3 levers to play with:<ul><li>The sub stream is where motion detection occurs (if you setup dual streams).   Running DeepStack analysis on the sub stream may provide better accuracy in regards to object / motion overlap.<br>Running DeepStack on the sub stream will provide faster inferences (less CPU resources).  If you have a CPU based DeepStack deployment, this may be of value since BI and DeepStack are both competing for the CPU.</li><li>Alternatively run more samples per trigger.  My break time is 10s, so I sample every second to improve my chances of finding objects.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2225" class="postimage" alt="deepstack_fine tuning_samples.png" onclick="viewableArea(this);" /></dt></dl></div></li><li>A final trick is to play with motion zones so the object is in an ideal position for accurate DeepStack analysis. (Pro Tip 1 below)<br><br><a href="viewtopic.php?f=18&amp;t=2526" class="postlink">Motion fine tuning and leveraging the playback window</a> is also good to know when tweaking alerts.</li></ul><br></div><span style="font-size:150%;line-height:116%"><strong class="text-strong"><a name="Pro Tips">Pro Tips</a></strong></span><br><br><strong class="text-strong">Pro Tip 2: Nothing found alerts would be false alerts from your motion settings if AI was not available. </strong><br><br>See <a href="viewtopic.php?f=12&amp;t=2526" class="postlink">Fine Tuning Motions settings article</a> for details.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1666" class="postimage" alt="deepstack fine tuning nothing found.png" onclick="viewableArea(this);" /></dt></dl></div><br><br><br><strong class="text-strong">Pro Tip 1: Use Zones to capture better views of objects so AI is more accurate.</strong><br><br>Issue<br>DeepStack said this is not a car (no annotation) because the headlights are confusing the AI.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2372" class="postimage" alt="deepstack miss.PNG" onclick="viewableArea(this);" /></dt></dl></div><br>You can see for yourself in below image what is going on.  BI motion sensors identified the moving object, no problem.  The headlights confused DeepStack and cancelled the alert.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2371" class="postimage" alt="deepstack-headlights_optimized.png" onclick="viewableArea(this);" /></dt></dl></div><br>If DeepStack saw a car (a different alert below), you would see the annotation.  The overlap of the DeepStack object and the Motion detection object (turn on Motion Highlight: Rectangles or Highlight / Rectangle) further confirms the static object test, i.e. it's a moving car, not a parked car because of motion and DeepStack object overlap.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2373" class="postimage" alt="deepstack alert image confirmed.png" onclick="viewableArea(this);" /></dt></dl></div><br>To resolve the issue, BI provides two very important levers.  With the motion sensor, you can control where/when the camera triggers.  You can thus give DeepStack the best shot at identifying objects.<br><br>Second, BI allows you to sample multiple frames per trigger.  If you have the default 10s break time, then sample every 1s.  This gives DeepStack 10 samples (one per sec) to identify objects.  Redundancy leads to improved accuracy.<br><br>The power of Motion sensors with AI!<br><br>Goal:  Very accurate alerts when cars enter and leave.  Below solution is from a different camera.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1660" class="postimage" alt="deepstack-fine-tuning---gate_optimized.png" onclick="viewableArea(this);" /></dt></dl></div><br>Solution:<br><br>Zone A: Set to entire scene.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1661" class="postimage" alt="deepstack fine tuning zone A.png" onclick="viewableArea(this);" /></dt></dl></div><br>Zone B: Set to ideal location for AI object recognition.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1662" class="postimage" alt="deepstack fine tuning zone B.png" onclick="viewableArea(this);" /></dt></dl></div><br>Zone crossing:  Set to Zone B<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1663" class="postimage" alt="deepstack fine tuning zone crossing.png" onclick="viewableArea(this);" /></dt></dl></div><br>Set motion sensor to force BI to Alert when car (object) is positioned perfectly in Zone B.  Give AI the best opportunity to identify the object.<br>Also note Object travels is unselected.  Not needed because I know AI can accurately identify a car in Zone B so Object travels does not improve accuracy but could waste CPU resources.<br><br>Also note I increased Min. object size.<br>By doing so, BI correctly cancels street noise because the min object size threshold is never met by cars at a distance in the street.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1664" class="postimage" alt="deepstack fine tuning min obj size.png" onclick="viewableArea(this);" /></dt></dl></div><br>Other advantages:<ul><li>You can probably reduce number of samples that need to go to DeepStack saving CPU/GPU resources.</li><li>Using min. object size to cancel motion from the street had negligible impact on CPU utilization.  Removing the street from Zone A is still available if needed (see below).</li></ul><br>Prior solution:<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1665" class="postimage" alt="deepstack-fine-tuning-prior-solution_optimized.png" onclick="viewableArea(this);" /></dt></dl></div><br>The prior solution just had a Zone A which would block the street in the distance to reduce false alerts.  This solution was functional, however, occasionally the motion sensor would identify the object (car) quite far from the camera (near the gate) and the AI was not able to classify the object as a car and returned a <strong class="text-strong">nothing found</strong> cancelled alert.<br><br>Setting the motion sensor to trigger when the camera has a clear view of the car improved accuracy!<br><br><br><br><br><span style="font-size:150%;line-height:116%"><strong class="text-strong"><a name="Next steps">Next steps</a></strong></span><br><br>If you cannot resolve the issue yourself, send the following information.<ul><li>Describe issue.</li><li>A short bvr capturing the issue.<br>Couple of options to make smaller bvr files.  In Camera settings -&gt; Record tab.<br><br>If you uncheck Combine or Cut Video, that will result in BI cutting the BVR file after each motion trigger.<br>Or you can leave Combine or Cut Video, and change the time length to something small like 15 min.</li><li>Your current camera settings.  Camera settings -&gt; General tab -&gt; Export</li><li>*.dat file associated with the Alert.</li></ul><p>Statistics: Posted by <a href="https://blueirissoftware.com/forum/memberlist.php?mode=viewprofile&amp;u=521">varghesesa</a> — Sun Aug 15, 2021 10:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[varghesesa]]></name></author>
		<updated>2021-07-28T17:13:11+00:00</updated>

		<published>2021-07-28T17:13:11+00:00</published>
		<id>https://blueirissoftware.com/forum/viewtopic.php?p=9823#p9823</id>
		<link href="https://blueirissoftware.com/forum/viewtopic.php?p=9823#p9823"/>
		<title type="html"><![CDATA[DeepStack • DeepStack Gotchas]]></title>

					<category term="DeepStack" scheme="https://blueirissoftware.com/forum/viewforum.php?f=16" label="DeepStack"/>
		
		<content type="html" xml:base="https://blueirissoftware.com/forum/viewtopic.php?p=9823#p9823"><![CDATA[
<span style="font-size:150%;line-height:116%"><strong class="text-strong">Introduction</strong></span><br><br>Gotchas are issues that have been discovered via tickets from past customers.  These articles help users resolve their own issues based on past learnings.<br><br><span style="font-size:150%;line-height:116%"><strong class="text-strong">Gotchas</strong></span><br><br><strong class="text-strong">Gotcha 15: DeepStack version 2022.01.01</strong><div style="margin-left:3em"><img class="smilies" src="https://blueirissoftware.com/forum/images/smilies/icon_idea.gif" width="15" height="17" alt=":idea:" title="Idea"> Intel from a user.  20220-Jan-28<br><br>A new version of DeepStack was just released. There is an issue with the way Blue Iris starts up the new version of DeepStack. The issue is DS version 2021.09.01 had two of the same files just named differently in the folder "C:\DeepStack\server".  One was named deepstack.exe and the other was named server.exe. Blue Iris is trying to start up server.exe.<br><br><strong class="text-strong">DeepStack version 2022.01.1</strong> only has one file in folder "C:\DeepStack\server" named deepstack.exe. I did a temporary fix by  copying deepstack.exe in the same folder with the file name server.exe.<br><br>Link: <a href="https://github.com/johnolafenwa/DeepStack/releases/tag/2022.01.1" class="postlink">https://github.com/johnolafenwa/DeepSta ... /2022.01.1</a><br><br><strong class="text-strong">Engineering states 5.5.5.1 will have the fix.</strong><br><br></div><strong class="text-strong">Gotcha 14:  DeepStack timeouts</strong><div style="margin-left:3em"><br>Issue:  DeepStack keeps timing out.  Customer comments<br>I have been successfully using Deep Stack for some time. However on &lt;date&gt; it ceased working. The system would no longer flag clips for recognized items.<br><br>It appears to identify objects but times out.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2293" class="postimage" alt="deepstack gotchas_timeout errors.png" onclick="viewableArea(this);" /></dt></dl></div><br>Fix:<br>Unfortunately we do not know the root cause.  Users would re-install DeepStack.  User comments below.<div style="margin-left:3em"><br>I think I have solved the problem by fully uninstalling DeepStack, manually deleting the leftover folder, and reinstalling it. I have now properly gotten a detection with object detection turned on<br>Everything has been working really well now and I’m really enjoying the fully integrated deepstack functionality.<br><br>1) Deleting the leftover folder: After running the uninstaller from windows (IE window’s remove programs) for deep stack, I noticed that there was still a C:\DeepStack folder with files inside, so I manually deleted this (which uncovered there were still things running such as “server.exe” which prevented the deletion of the folder until I manually stopped those processes).<br><br>2) I had the latest version installed, however, when I went to the windows remove programs, I noticed that it showed two versions of deepstack installed, the old version I had from 2020 and the latest one. I uninstalled them both. The old install was the CPU version, the new install was the GPU.<br><br>3) GPU: nvidia 970<br><br>I would also note that the GPU install of deepstack is much more difficult than your average user would be willing to go through. You have to sign up for NVidia’s developer program and answer questions for why you are downloading the AI libraries, and then manually move files into the appropriate installation directories. I understand that deepstack installation is somewhat outside of the scope of BlueIris software, however the difference in delays is significant if you are running a video system that is already heavily loading the CPU. Maybe some helpful links to the deepstack install guides (especially for GPU) would be something useful in the documentation.<br></div><br></div><strong class="text-strong">Gotcha 13: Network traffic</strong><br><br>Issue: I've been monitoring my BlueIris setup for a while and found some pretty strange behavior with the DeepStack intregration.<br>I have DeepStack installed on a Jetson nano doing the AI detection. I wanted to monitor the duration of the communication between BI server and the Jetson nano using WireShark, and I've noted that the v1/vision/detection call is sent very often to the DS server even if no motion is triggered, producing network traffic and CPU load. Actually, I've even logged the network traffic with the 0 profile and the shield disarmed. Still a lot of calls to the DS server.<br><br>Resolution:  The software does not call DS when it's not required.<br>Engineering has seen this traffic as well.  It appears that the various DS modules are in constant contact with each other.  I am not sure how to stop it or if it's required for it's proper operation.<br><br><strong class="text-strong"><a name="Gotcha 12:">Gotcha 12:</a></strong> Microsoft Process Explorer<div style="margin-left:3em"><br>See <a href="viewtopic.php?f=14&amp;t=2492#Microsoft%20Process%20Explorer" class="postlink">Microsoft Process Explorer</a> section to download/install Process Explorer.<br><br>Process Explorer is a good way to see if DeepStack is running correctly on your machine.<br>Below is an example from an actual ticket.<br><br><strong class="text-strong">Issue</strong>:  For some reason, DeepStack stopped working with one camera.<blockquote class="uncited"><div>I have the latest software and am using the 1st CPU version of DeepStack.   Everything has been working but recently one of the two Front Cameras which are in the same Group, stopped working using DeepStack.   A car just went by so I am showing you that Side-Front shows the Snapshot (size) and then jpg Group and car:63% but the camera below called Front shows none of that.    It was working until the last few updates.   Does any of this ring a bell on what caused my main Hikvision to stop working with DeepStack or with the other group.<br><br>Update:   As I was typing this, I decided to hit the Start Now of deepstack on the AI tab and it started working.   Strange that one camera would work with the DeepStack settings and the other wouldn’t until I hit Start Now.</div></blockquote><strong class="text-strong">Support Response</strong>:<br>Check the logs for <a href="viewtopic.php?f=14&amp;t=2086#DeepStack" class="postlink">DeepStack errors</a>.<br>Run Windows Process Explorer to make sure you have just have the one set of DS executables showing beneath BlueIris.exe.  <br>IF others exist, they may be abandoned by a crash, causing issues with CPU and RAM over time.<br><br><strong class="text-strong">Process Explorer Screenshot</strong><br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=2018" class="postimage" alt="deepstack gotcha_process explorer_480.png" onclick="viewableArea(this);" /></dt></dl></div><br><strong class="text-strong">Resolution</strong>:<br>When Blue Iris starts/stops DS the conhost, server and python processes will be listed as children of BlueIris.exe.<br>It's safe to kill those other ones (or restart Windows).<br><br><br><br></div><strong class="text-strong"><a name="Gotcha 11">Gotcha 11</a>:  DeepStack is confirming alerts even though it is outside my area of interest.</strong><div style="margin-left:3em"><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1808" class="postimage" alt="deepstack gotcha 11 alert.png" onclick="viewableArea(this);" /></dt></dl></div><br>Issue:  Defined an area of interest (Zone B).<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1809" class="postimage" alt="deepstack-gotcha-11-zones_optimized.png" onclick="viewableArea(this);" /></dt></dl></div><br>Told BI to only trigger based on Zone B.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1810" class="postimage" alt="deepstack-gotcha-11-object detection.png" onclick="viewableArea(this);" /></dt></dl></div><br>Received an Alert due to motion outside Zone B.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1811" class="postimage" alt="deepstack-gotcha-11-alert image.png" onclick="viewableArea(this);" /></dt></dl></div><br>The problem is DeepStack will observe the entire visible image.<br><br>Fix:<br>Two options.<br><br>1.  Add more intelligence to Object Crossing logic.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1812" class="postimage" alt="deepstack-gotcha-11-object detection fix.png" onclick="viewableArea(this);" /></dt></dl></div><br>By improving the logic, BI object tracking will only trigger if there is movement from A-B or vice versa.<br>The camera would never trigger if there was motion just in B, for example a piece of paper was blowing in the wind.<br>Thus BI would never have triggered and DeepStack would never have the opportunity to analyze the frame where the car was driving by on the road.<br><br>2.  Obscure the road completely by redefining Zone A.<br>By obscuring the road, it is completely out of the picture.  DeepStack will never analyze the street.<br>Probably leads to less CPU/GPU resources for DeepStack as well.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1813" class="postimage" alt="deepstack-gotcha-11-zone a new.png" onclick="viewableArea(this);" /></dt></dl></div><br></div><strong class="text-strong"><a name="Gotcha 10">Gotcha 10</a>: DeepStack temp directory filling up.</strong><div style="margin-left:3em">For some reason, certain deployments (CPU) result in DeepStack filling up the temp directory over a few days as the server is running.<br>c:\…AppData\Local\Temp\DeepStack<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1656" class="postimage" alt="deepstack temp directory.png" onclick="viewableArea(this);" /></dt></dl></div><br><br>We still do not know the root cause.  Please share with Support if you know the issue.<br>Below is a work around shared by one user.<br><blockquote class="uncited"><div>Unfortunately what I have isn’t so much a fix as it is a workaround. It’s just using Windows Task Scheduler to call a batch file that runs ‘del C:\DeepStack\redis\temp-*.rdb’ every hour.</div></blockquote><br></div><strong class="text-strong"><a name="Gotcha 9">Gotcha 9</a>: Server Error 100</strong><div style="margin-left:3em"><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1561" class="postimage" alt="deepstack server error 100.png" onclick="viewableArea(this);" /></dt></dl></div><br>See DeepStack: Server Error 100 section in <a href="viewtopic.php?f=12&amp;t=2086#DeepStack%20Errors" class="postlink">Status Log Errors article</a> for details.<br></div><strong class="text-strong"><a name="Gotcha 8">Gotcha 8</a>:  DeepStack appears to be running but no images are being processed.</strong><div style="margin-left:3em"><br>DeepStack is on (or believed to be on).  However, no AI alerts appear in clip list.  And no errors in the Status-&gt;Log!<br>We are getting reports that users have DeepStack running based on the DeepStack splash page popping up.  However, NO Deepstack annotations appear when they should.  It's as if DeepStack is not turned on.  Clips list looks like below.  Only motion annotations<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1534" class="postimage" alt="no deepstack cliplist.png" onclick="viewableArea(this);" /></dt></dl></div><br>Once DeepStack is activated, you should receive AI annotations.  Even with no objects, the "nothing found" AI annotation appears!  <br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1535" class="postimage" alt="nothing found.PNG" onclick="viewableArea(this);" /></dt></dl></div><br>If DeepStack were turned on, the clip list would look like below when objects were found.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1536" class="postimage" alt="deepstack running.png" onclick="viewableArea(this);" /></dt></dl></div><br><br>First confirm the BI server and the DeepStack server are communicating.  Global settings -&gt; AI tab.<br>Also confirm you have DeepStack turned ON for the camera you are debugging!  Camera settings -&gt; Trigger tab -&gt; Artificial Intelligence.  Remember, if you have multiple Profiles, DeepStack needs to be set correctly (i.e. on or off) for each Profile.<br><br>Big gotchas:<ul><li>If you uncheck Object detection from the Advanced section of Camera settings -&gt; Trigger tab -&gt; Motion sensor Configure, you have unbeknownst to yourself, turned off DeepStack because object detection is needed for DeepStack to work.<div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1537" class="postimage" alt="deepstack object detection gotcha.PNG" onclick="viewableArea(this);" /></dt></dl></div></li><li>If all the trigger sources are inactive in the Alerts tab, you have unbeknownst to yourself, turned off DeepStack.  <br>If you want to turn off all you alerts, best do so by deleting all your entries in the action map or disabling all your entries in the action map.  <br>The default setting is to have all your trigger sources active.  At a minimum keep the Motion Zones trigger sources enabled so DeepStack is not affected.<div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1538" class="postimage" alt="deepstack trigger sources gotcha.PNG" onclick="viewableArea(this);" /></dt></dl></div></li></ul>Assuming your settings are correct, run DeepStack manually to see if requests are being sent to DeepStack from BI.  <br><ul><li>Uncheck Auto start/stop in Global settings -&gt; AI.</li><li>Restart Windows to make sure no DeepStack processes are still running.  DeepStack could be unstable if trying to do so manually with all the additional processes that DeepStack spawns (server.exe, python.exe, redis-server.exe).<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1539" class="postimage" alt="deepstack processes.PNG" onclick="viewableArea(this);" /></dt></dl></div></li><li>Start DeepStack manually from the command line.  "deepstack --VISION-DETECTION True --PORT 82".  Port 82 is used by default but if you chose a different port (Global settings -&gt; AI tab), specify the same number in command line.</li></ul>From the console, every time you trigger the camera or camera triggers on its own, observe whether a new request appears in the command window.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1540" class="postimage" alt="deepstack log.PNG" onclick="viewableArea(this);" /></dt></dl></div></div><strong class="text-strong"><a name="Gotcha 7">Gotcha 7</a>: 2021-May-19 Update:</strong><div style="margin-left:3em"><br><strong class="text-strong">Deepstack is running but sometimes BI responds server not running </strong><br><br>The below logs show a successful Deepstack response at 1:09:15.  Then at 1:09:46 BI states Deepstack is unreachable, however user confirmed Deepstack is still running.<br><div class="codebox"><p>Code: </p><pre><code>5/12/2021 1:09:46 PM Oby1Cam: DeepStack: Not running or unreachable (84)5/12/2021 1:09:45 PM Oby1Cam: MOTION (79)5/12/2021 1:09:15 PM Ofy1Cam: DeepStack: Alert cancelled (nothing found) (83)5/12/2021 1:09:09 PM Ofy1Cam: MOTION (75)</code></pre></div>The fix: <br>First confirm all Software Security Exemptions (e.g. Windows Defender) have been applied.  The Windows Tuning Article provides details.  <br><a href="https://blueirissoftware.com/forum/viewtopic.php?f=12&amp;t=2080" class="postlink">https://blueirissoftware.com/forum/view ... =12&amp;t=2080</a><br><br>The unreachable message occurs if DS does not respond on the IP:port that you specify.  If this is not due to issues with security software, perhaps DS is having other issues.  I do see an occasional DS state where it is not responding. <br><br>BI is now detecting Deepstack not running or unreachable states and restarts DeepStack behind the scenes (assuming BI is set to start/stop DeepStack).  This should fix the issue without any user interaction needed.<br><br><br></div><strong class="text-strong"><a name="Gotcha 6">Gotcha 6</a>: BI Status Log Error - Deepstack not running or unreachable</strong><div style="margin-left:3em"><br>If BI cannot communicate with Deepstack, BI will let you know.<br>Assuming you have Auto start/stop with BI enabled, simple fix is stop Deepstack if it's running and restart BI.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1541" class="postimage" alt="BI cannot talk to Deepstack.png" onclick="viewableArea(this);" /></dt></dl></div><br></div><strong class="text-strong"><span style="text-decoration:underline"><a name="Gotcha 5">Gotcha 5</a>: High CPU usage with Deepstack.</span></strong><div style="margin-left:3em"><br>AI / Deepstack is very computationally heavy.  If your CPU usage jumps and you don't have a GPU the best you can do is throttle the calls to Deepstack.<ul><li>Turn on Deepstack only for outdoor cameras.  BI motion settings are usually fine for indoor cameras.</li><li>Reduce number of images sampled per alert.</li><li>Tighten your BI motion sensor settings so cameras do not trigger an alert so frequently.</li></ul></div><span style="text-decoration:underline"><strong class="text-strong"><a name="Gotcha 4">Gotcha 4</a>: Deepstack missing obvious objects.</strong></span><div style="margin-left:3em"><br>Shout out to our users for sharing issues and solutions!  <br><br>For some reason, the BlueIris software is ignoring what the Deepstack server says in terms of confidence and the label. This seems to happen during the second, third or sometimes fourth image that Deepstack analyzes. I have confirmed with a packet capture that despite these additional images being sent back to the BlueIris software with a successful response, BlueIris ignores it and goes to cancel the alert. I confirm these images meet the criteria of the minimum confidence percentage and "to confirm". I would like to also mention that if DeepStack responds back with a prediction that is within the criteria <strong class="text-strong">on the first image</strong>, it works OK.<br><br>Fix: I just needed to change the keyframe interval to be the same value as the FPS so it is equal to 1.00 (as displayed from Blue Iris). The detection is working much better now.  See <a href="https://blueirissoftware.com/forum/viewtopic.php?f=11&amp;t=2049" class="postlink">Camera stream optimization article</a> for details.<br><br>Alternative fix:  If for some reason you cannot adjust the key frame interval on the camera, identify the current key frame interval (Status -&gt; Cameras tab).  If the value is 0.25, i.e. 1/4, i.e. 1 key frame every 4s, then set the pre-trigger buffer (Camera settings -&gt; Record tab) greater than or equal to 4s.  This will guarantee BI at least one key frame to process.<br><br><br></div><span style="text-decoration:underline"><strong class="text-strong"><a name="Gotcha 3">Gotcha 3</a>: Deepstack always returning nothing found.  (Another shout out to the community for making everyone smarter)</strong></span><div style="margin-left:3em"><br>This could imply the Deepstack server is returning server errors and BI is just reporting back "nothing found".<br>BI will eventually report the Deepstack errors in the Status-&gt;log to make users aware of the issue easier.  <br><br>Until done so, one user creatively used Postman to identify the issue.  If you are a developer, you are probably familiar with Postman.  It's a very popular tool that helps test and debug APIs.  If new to Postman, lots of content on the internet how to use it.  By using Postman, the user discovered object detection requests to Postman were returning 500 error codes.  500 errors mean the server had a problem processing the request.  <br><br>FYI, 400 errors mean the request to Deepstack is not correct.  For those new to Postman, a 400 error means the request you created in Postman to send to Deepstack is not correct.  You need to first make sure you are sending correct requests to Deepstack.<br><br>Once the user realized their Deepstack installation was not working correctly, they reinstalled Deepstack.  Deepstack does provide error logs, "C:\Users\[Username]\AppData\Local\DeepStack\logs"   (%LOCALAPPDATA%\DeepStack\logs).  Understanding the logs were challenging so best course of action was to try reinstalling Deepstack.<br><br>User also noted uninstalling Deepstack may not flush out all the files.  The user went back into the installation directory (C:\DeepStack) and manually deleted any remaining files.<br><br>Furthermore, user noted, it's good to go into task manager and make sure any old Deepstack processes are not running.  You can go into Task Manager and kill any of the following processes:  server.exe, python.exe, redis-server-exe if they exist.<br><br>FYI, installing / using AI Tool for debugging may be worthwhile as BI continues to build out the debugging capabilities.  In AI Tool, error messages will pop up right away if old Deepstack versions are still running.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1548" class="postimage" alt="ai tool error.PNG" onclick="viewableArea(this);" /></dt></dl></div><br>Another clue that Deepstack is not running properly is by running Deepstack manually and observing the response time in the console.  If Deepstack is taking 1m to respond, there is probably something wrong.<br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1549" class="postimage" alt="deepstack response time.PNG" onclick="viewableArea(this);" /></dt></dl></div></div><span style="text-decoration:underline"><strong class="text-strong"><a name="Gotcha 2">Gotcha 2</a>: Front door camera</strong></span><div style="margin-left:3em"><br>Front door view has the road and therefore a lot of unnecessary alerts.  All you really want are people coming to the house or property.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1542" class="postimage" alt="front door.jpg" onclick="viewableArea(this);" /></dt></dl></div><br>So you create a zone in front of your house to reduce the noise from the road.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1543" class="postimage" alt="b_optimized.png" onclick="viewableArea(this);" /></dt></dl></div><br>No alerts!  The problem is the camera will trigger when a person's feet crosses Zone B.  The image being processed by Deepstack is just the feet!  So Deepstack will often return nothing found.<br><br>The fix!  Make sure to always define a Zone A which is the overall area of interest on the camera.  The image processed by Deepstack is the overlap of all the zones, thus the entire person is sent to Deepstack for processing and the appropriate alert is sent.<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1544" class="postimage" alt="a_optimized.png" onclick="viewableArea(this);" /></dt></dl></div><br><br>One important point that I forgot to mention in the Webinar but did come up in the Q&amp;A is how to tell BI to only be concerned with motion in Zone B???  Simple, see below.  By setting "Object crosses zones" to B, I am telling BI to only worry about motion in Zone B.  Notice with AI, I uncheck "Object travels" and "Object size exceeds" settings.  With AI, the motion sensor settings can usually be simplified!<br><br><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://blueirissoftware.com/forum/download/file.php?id=1545" class="postimage" alt="Zone B setting.PNG" onclick="viewableArea(this);" /></dt></dl></div><br></div><p>Statistics: Posted by <a href="https://blueirissoftware.com/forum/memberlist.php?mode=viewprofile&amp;u=521">varghesesa</a> — Wed Jul 28, 2021 5:13 pm</p><hr />
]]></content>
	</entry>
	</feed>
