mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 14:06:31 +00:00
add nth frame to ai recognition to config
This commit is contained in:
@@ -50,9 +50,10 @@ public class Constants
|
||||
# region AIRecognitionConfig
|
||||
|
||||
public const double DEFAULT_FRAME_RECOGNITION_SECONDS = 2;
|
||||
public const double TRACKING_DISTANCE_CONFIDENCE = 0.15;
|
||||
public const double TRACKING_PROBABILITY_INCREASE = 15;
|
||||
public const double TRACKING_INTERSECTION_THRESHOLD = 0.8;
|
||||
public const double TRACKING_DISTANCE_CONFIDENCE = 0.15;
|
||||
public const double TRACKING_PROBABILITY_INCREASE = 15;
|
||||
public const double TRACKING_INTERSECTION_THRESHOLD = 0.8;
|
||||
public const int DEFAULT_FRAME_PERIOD_RECOGNITION = 4;
|
||||
|
||||
# endregion AIRecognitionConfig
|
||||
|
||||
|
||||
@@ -360,4 +360,6 @@ public class CanvasEditor : Canvas
|
||||
.ToList();
|
||||
RemoveAnnotations(expiredAnns);
|
||||
}
|
||||
|
||||
public void ResetBackground() => Background = new SolidColorBrush(Color.FromArgb(1, 0, 0, 0));
|
||||
}
|
||||
@@ -6,4 +6,5 @@ public class AIRecognitionConfig
|
||||
public double TrackingDistanceConfidence { get; set; }
|
||||
public double TrackingProbabilityIncrease { get; set; }
|
||||
public double TrackingIntersectionThreshold { get; set; }
|
||||
public int FramePeriodRecognition { get; set; }
|
||||
}
|
||||
@@ -77,7 +77,8 @@ public class ConfigUpdater : IConfigUpdater
|
||||
FrameRecognitionSeconds = Constants.DEFAULT_FRAME_RECOGNITION_SECONDS,
|
||||
TrackingDistanceConfidence = Constants.TRACKING_DISTANCE_CONFIDENCE,
|
||||
TrackingProbabilityIncrease = Constants.TRACKING_PROBABILITY_INCREASE,
|
||||
TrackingIntersectionThreshold = Constants.TRACKING_INTERSECTION_THRESHOLD
|
||||
TrackingIntersectionThreshold = Constants.TRACKING_INTERSECTION_THRESHOLD,
|
||||
FramePeriodRecognition = Constants.DEFAULT_FRAME_PERIOD_RECOGNITION
|
||||
}
|
||||
};
|
||||
Save(appConfig);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System.IO;
|
||||
|
||||
namespace Azaion.Annotator.Extensions;
|
||||
namespace Azaion.Common.Extensions;
|
||||
|
||||
public static class DirectoryInfoExtensions
|
||||
{
|
||||
public static IEnumerable<FileInfo> GetFiles(this DirectoryInfo dir, params string[] searchExtensions) =>
|
||||
dir.GetFiles("*.*", SearchOption.AllDirectories)
|
||||
.Where(f => searchExtensions.Any(s => f.Name.Contains(s, StringComparison.CurrentCultureIgnoreCase))).ToList();
|
||||
.Where(f => searchExtensions.Any(s => f.Name.ToLower().Contains(s))).ToList();
|
||||
}
|
||||
Reference in New Issue
Block a user