FocusModel

This commit is contained in:
2023-02-26 18:17:20 -07:00
parent 0f025b5e2e
commit 70c9ee5781
24 changed files with 286 additions and 176 deletions

View File

@ -55,9 +55,9 @@ public class Configuration
[Display(Name = "Properties Changed For Resize"), Required] public bool? PropertiesChangedForResize { get; set; }
[Display(Name = "Property Configuration"), Required] public Property.Models.Configuration PropertyConfiguration { get; set; }
[Display(Name = "Sorting Days Delta Tolerance"), Required] public int[] RangeDaysDeltaTolerance { get; set; }
[Display(Name = "Face Area Permille Tolerance"), Required] public int[] RangeFaceAreaPermilleTolerance { get; set; }
[Display(Name = "Location Minimum Confidence"), Required] public double[] RangeFaceConfidence { get; set; }
[Display(Name = "Face Distance Tolerance"), Required] public double[] RangeDistanceTolerance { get; set; }
[Display(Name = "Face Area Permille Tolerance"), Required] public float[] RangeFaceAreaTolerance { get; set; }
[Display(Name = "Location Minimum Confidence"), Required] public float[] RangeFaceConfidence { get; set; }
[Display(Name = "Face Distance Tolerance"), Required] public float[] RangeDistanceTolerance { get; set; }
[Display(Name = "Reverse"), Required] public bool? Reverse { get; set; }
[Display(Name = "Save Face Landmark For Output Resolutions"), Required] public string[] SaveFaceLandmarkForOutputResolutions { get; set; }
[Display(Name = "Save Full Year Of Random Files"), Required] public bool? SaveFullYearOfRandomFiles { get; set; }
@ -160,8 +160,8 @@ public class Configuration
throw new NullReferenceException(nameof(configuration.PropertiesChangedForResize));
if (configuration.RangeDaysDeltaTolerance is null || configuration.RangeDaysDeltaTolerance.Length != 3)
throw new NullReferenceException(nameof(configuration.RangeDaysDeltaTolerance));
if (configuration.RangeFaceAreaPermilleTolerance is null || configuration.RangeFaceAreaPermilleTolerance.Length != 3)
throw new NullReferenceException(nameof(configuration.RangeFaceAreaPermilleTolerance));
if (configuration.RangeFaceAreaTolerance is null || configuration.RangeFaceAreaTolerance.Length != 3)
throw new NullReferenceException(nameof(configuration.RangeFaceAreaTolerance));
if (configuration.RangeFaceConfidence is null || configuration.RangeFaceConfidence.Length != 3)
throw new NullReferenceException(nameof(configuration.RangeFaceConfidence));
if (configuration.RangeDistanceTolerance is null || configuration.RangeDistanceTolerance.Length != 3)
@ -233,7 +233,7 @@ public class Configuration
configuration.PropertiesChangedForMetadata.Value,
configuration.PropertiesChangedForResize.Value,
configuration.RangeDaysDeltaTolerance,
configuration.RangeFaceAreaPermilleTolerance,
configuration.RangeFaceAreaTolerance,
configuration.RangeFaceConfidence,
configuration.RangeDistanceTolerance,
configuration.Reverse.Value,

View File

@ -53,9 +53,9 @@ public class Configuration
public bool PropertiesChangedForMetadata { init; get; }
public bool PropertiesChangedForResize { init; get; }
public int[] RangeDaysDeltaTolerance { init; get; }
public int[] RangeFaceAreaPermilleTolerance { init; get; }
public double[] RangeFaceConfidence { init; get; }
public double[] RangeDistanceTolerance { init; get; }
public float[] RangeFaceAreaTolerance { init; get; }
public float[] RangeFaceConfidence { init; get; }
public float[] RangeDistanceTolerance { init; get; }
public bool Reverse { init; get; }
public string[] SaveFaceLandmarkForOutputResolutions { init; get; }
public bool SaveFullYearOfRandomFiles { init; get; }
@ -115,9 +115,9 @@ public class Configuration
bool propertiesChangedForMetadata,
bool propertiesChangedForResize,
int[] rangeDaysDeltaTolerance,
int[] rangeFaceAreaPermilleTolerance,
double[] rangeFaceConfidence,
double[] rangeDistanceTolerance,
float[] rangeFaceAreaPermyriadTolerance,
float[] rangeFaceConfidence,
float[] rangeDistanceTolerance,
bool reverse,
string[] saveFaceLandmarkForOutputResolutions,
bool saveFullYearOfRandomFiles,
@ -176,7 +176,7 @@ public class Configuration
PropertiesChangedForMetadata = propertiesChangedForMetadata;
PropertiesChangedForResize = propertiesChangedForResize;
RangeDaysDeltaTolerance = rangeDaysDeltaTolerance;
RangeFaceAreaPermilleTolerance = rangeFaceAreaPermilleTolerance;
RangeFaceAreaTolerance = rangeFaceAreaPermyriadTolerance;
RangeFaceConfidence = rangeFaceConfidence;
RangeDistanceTolerance = rangeDistanceTolerance;
Reverse = reverse;

View File

@ -212,7 +212,6 @@ public class UnitTestFace
bool reverse = false;
FileHolder resizedFileHolder;
List<string> parseExceptions = new();
const bool isIgnoreRelativePath = false;
Shared.Models.Property? property = null;
const bool isValidImageFormatExtension = true;
Dictionary<string, int[]> outputResolutionToResize;
@ -252,7 +251,7 @@ public class UnitTestFace
throw new NullReferenceException(nameof(property));
resizedFileHolder = resize.GetResizedFileHolder(item);
item.SetResizedFileHolder(resize.FileNameExtension, resizedFileHolder);
MappingFromItem mappingFromItem = IMappingFromItem.GetMappingFromItem(item, isIgnoreRelativePath);
MappingFromItem mappingFromItem = IMappingFromItem.GetMappingFromItem(item);
(int _, metadataCollection) = metadata.GetMetadataCollection(subFileTuples, parseExceptions, mappingFromItem);
outputResolutionToResize = resize.GetResizeKeyValuePairs(_Configuration.PropertyConfiguration, cResultsFullGroupDirectory, subFileTuples, parseExceptions, metadataCollection, item.Property, mappingFromItem);
Assert.IsNotNull(mappingFromItem.ResizedFileHolder);