diff --git a/src/UI/AITOOL.cs b/src/UI/AITOOL.cs index c07291b2..7758c81d 100644 --- a/src/UI/AITOOL.cs +++ b/src/UI/AITOOL.cs @@ -1166,6 +1166,12 @@ public static async Task DetectObjects(ClsImageQueueItem CurImg, ClsURLIte } //end loop over current object list + if (cam.maskManager.masking_enabled) + { + //mark the end of AI detection for the current image + cam.maskManager.lastDetectionDate = DateTime.Now; + } + //if one or more objects were detected, that are 1. relevant, 2. within confidence limits and 3. outside of masked areas if (objects.Count() > 0) { diff --git a/src/UI/MaskManager.cs b/src/UI/MaskManager.cs index ab7825c1..9c9826f1 100644 --- a/src/UI/MaskManager.cs +++ b/src/UI/MaskManager.cs @@ -122,7 +122,6 @@ public void Update(Camera cam) public bool CreateDynamicMask(ObjectPosition currentObject) { bool maskExists = false; - lastDetectionDate = DateTime.Now; List objects = Global.Split(this.objects, "|;,");