Can-remap

This commit is contained in:
2023-09-06 23:51:28 -07:00
parent b2e2a66101
commit 8d759ccefd
21 changed files with 563 additions and 447 deletions

View File

@ -66,6 +66,7 @@ public class Configuration
public float[]? RangeFaceAreaTolerance { get; set; }
public float[]? RangeFaceConfidence { get; set; }
public float[]? RectangleIntersectMinimums { get; set; }
public bool? ReMap { get; set; }
public bool? Reverse { get; set; }
public string[]? SaveBlurHashForOutputResolutions { get; set; }
public string[]? SaveFaceDistancesForOutputResolutions { get; set; }
@ -163,6 +164,7 @@ public class Configuration
// if (configuration?.RangeFaceAreaTolerance is null) throw new NullReferenceException(nameof(configuration.RangeFaceAreaTolerance));
// if (configuration?.RangeFaceConfidence is null) throw new NullReferenceException(nameof(configuration.RangeFaceConfidence));
// if (configuration?.RectangleIntersectMinimums is null) throw new NullReferenceException(nameof(configuration.RectangleIntersectMinimums));
if (configuration?.ReMap is null) throw new NullReferenceException(nameof(configuration.ReMap));
if (configuration?.Reverse is null) throw new NullReferenceException(nameof(configuration.Reverse));
// if (configuration?.SaveBlurHashForOutputResolutions is null) throw new NullReferenceException(nameof(configuration.SaveBlurHashForOutputResolutions));
// if (configuration?.SaveFaceDistancesForOutputResolutions is null) throw new NullReferenceException(nameof(configuration.SaveFaceDistancesForOutputResolutions));
@ -247,6 +249,7 @@ public class Configuration
configuration.RangeFaceAreaTolerance ?? Array.Empty<float>(),
configuration.RangeFaceConfidence ?? Array.Empty<float>(),
configuration.RectangleIntersectMinimums ?? Array.Empty<float>(),
configuration.ReMap.Value,
configuration.Reverse.Value,
configuration.SaveBlurHashForOutputResolutions ?? Array.Empty<string>(),
configuration.SaveFaceDistancesForOutputResolutions ?? Array.Empty<string>(),

View File

@ -60,6 +60,7 @@ public record Configuration(Property.Models.Configuration PropertyConfiguration,
float[] RangeFaceAreaPermyriadTolerance,
float[] RangeFaceConfidence,
float[] RectangleIntersectMinimums,
bool ReMap,
bool Reverse,
string[] SaveBlurHashForOutputResolutions,
string[] SaveFaceDistancesForOutputResolutions,

View File

@ -30,7 +30,6 @@ internal class F_Random
{
Dictionary<string, List<string>> results = new();
string key;
long personKey;
DateTime dateTime;
List<long>? personKeys;
List<string>? relativePaths;
@ -40,12 +39,11 @@ internal class F_Random
continue;
if (!idToPersonKeys.TryGetValue(mapping.MappingFromItem.Id, out personKeys))
continue;
if (Shared.Models.Stateless.Methods.IPersonBirthday.IsCounterPersonBirthday(mapping.MappingFromPerson.PersonBirthday))
if (Shared.Models.Stateless.Methods.IPersonBirthday.IsCounterPersonYear(mapping.MappingFromPerson.PersonKey))
continue;
if (!personKeys.Contains(mapping.MappingFromPerson.PersonBirthday.Value.Ticks))
if (!personKeys.Contains(mapping.MappingFromPerson.PersonKey))
continue;
personKey = mapping.MappingFromPerson.PersonBirthday.Value.Ticks;
dateTime = new(personKey);
dateTime = new(mapping.MappingFromPerson.PersonKey);
key = dateTime.ToString(dateFormat);
if (!results.TryGetValue(key, out relativePaths))
{