Moved Model Name and Predictor Model Name to
Property Configuration
This commit is contained in:
@ -135,7 +135,7 @@ public partial class DlibDotNet
|
||||
if (!isSilent && configuration.TestDistanceResults)
|
||||
{
|
||||
E2_Navigate e2Navigate = new(console, configuration, argZero);
|
||||
e2Navigate.Navigate(propertyConfiguration, model, predictorModel, configuration.OutputResolutions[0]);
|
||||
e2Navigate.Navigate(propertyConfiguration, configuration.OutputResolutions[0]);
|
||||
_Log.Information(propertyConfiguration.RootDirectory);
|
||||
}
|
||||
{
|
||||
@ -157,8 +157,6 @@ public partial class DlibDotNet
|
||||
{
|
||||
List<string[]> directoryCollections = _Rename.GetDirectoryRenameCollections(
|
||||
propertyConfiguration,
|
||||
model,
|
||||
predictorModel,
|
||||
relativePath: string.Empty,
|
||||
newDirectoryName: string.Empty,
|
||||
jsonFiles4InfoAny: false);
|
||||
@ -412,10 +410,10 @@ public partial class DlibDotNet
|
||||
faces = _Faces.GetFaces(dResultsFullGroupDirectory, subFileTuples, parseExceptions, property, mappingFromItem, outputResolutionWidth, outputResolutionHeight, outputResolutionOrientation);
|
||||
if (_AppSettings.MaxDegreeOfParallelism < 2)
|
||||
ticks = LogDelta(ticks, nameof(D_Face.GetFaces));
|
||||
_Faces.SaveFaces(dResultsFullGroupDirectory, subFileTuples, parseExceptions, mappingFromItem, faces);
|
||||
bool anyFacesSaved = _Faces.SaveFaces(dResultsFullGroupDirectory, subFileTuples, parseExceptions, mappingFromItem, faces);
|
||||
if (_AppSettings.MaxDegreeOfParallelism < 2)
|
||||
ticks = LogDelta(ticks, nameof(D_Face.SaveFaces));
|
||||
if (item.Property?.Id is not null
|
||||
if (!anyFacesSaved && item.Property?.Id is not null
|
||||
&& idToMappedFaceFilesCollection.TryGetValue(item.Property.Id.Value, out List<(string, int)>? collection))
|
||||
_Distance.LookForMatchFacesAndPossiblyRename(_Faces.FileNameExtension, eDistanceContentDirectory, mappingFromItem, faces, collection);
|
||||
if (_Configuration.SaveFaceLandmarkForOutputResolutions.Contains(outputResolution))
|
||||
@ -634,8 +632,6 @@ public partial class DlibDotNet
|
||||
{
|
||||
string aResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
|
||||
_Configuration.PropertyConfiguration,
|
||||
model,
|
||||
predictorModel,
|
||||
nameof(A_Property),
|
||||
outputResolution,
|
||||
includeResizeGroup: false,
|
||||
@ -643,8 +639,6 @@ public partial class DlibDotNet
|
||||
includePredictorModel: false);
|
||||
string bResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
|
||||
_Configuration.PropertyConfiguration,
|
||||
model,
|
||||
predictorModel,
|
||||
nameof(B_Metadata),
|
||||
outputResolution,
|
||||
includeResizeGroup: false,
|
||||
@ -652,8 +646,6 @@ public partial class DlibDotNet
|
||||
includePredictorModel: false);
|
||||
string cResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
|
||||
_Configuration.PropertyConfiguration,
|
||||
model,
|
||||
predictorModel,
|
||||
nameof(C_Resize),
|
||||
outputResolution,
|
||||
includeResizeGroup: true,
|
||||
@ -661,8 +653,6 @@ public partial class DlibDotNet
|
||||
includePredictorModel: false);
|
||||
string dResultsFullGroupDirectory = Property.Models.Stateless.IResult.GetResultsFullGroupDirectory(
|
||||
_Configuration.PropertyConfiguration,
|
||||
model,
|
||||
predictorModel,
|
||||
nameof(D_Face),
|
||||
outputResolution,
|
||||
includeResizeGroup: true,
|
||||
@ -795,7 +785,10 @@ public partial class DlibDotNet
|
||||
if (metadataCollection.Count != filteredItems.Length || nullablePropertyCollection.Count != filteredItems.Length || resizeKeyValuePairs.Count != filteredItems.Length || imageFaceCollections.Count != filteredItems.Length)
|
||||
throw new Exception("Counts don't match!");
|
||||
if (exceptionCount != 0)
|
||||
{
|
||||
_Exceptions.Add(container.SourceDirectory);
|
||||
continue;
|
||||
}
|
||||
for (int f = 0; f < imageFaceCollections.Count; f++)
|
||||
filteredItems[f].Faces.AddRange(from l in imageFaceCollections[f] select l);
|
||||
propertyCollection = (from l in nullablePropertyCollection where l is not null select l).ToArray();
|
||||
@ -1029,7 +1022,7 @@ public partial class DlibDotNet
|
||||
string d2FacePartsContentDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(_Configuration.PropertyConfiguration, nameof(D2_FaceParts), "()");
|
||||
int totalSeconds = (int)Math.Floor(new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds);
|
||||
string message = $") Building Container(s) - {totalSeconds} total second(s)";
|
||||
A_Property propertyLogic = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, _Resize.FileNameExtension, _Configuration.Reverse, model, predictorModel);
|
||||
A_Property propertyLogic = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, _Resize.FileNameExtension, _Configuration.Reverse);
|
||||
ProgressBarOptions options = new() { ProgressCharacter = '─', ProgressBarOnBottom = true, DisableBottomPercentage = true };
|
||||
using (ProgressBar progressBar = new(1, message, options))
|
||||
{
|
||||
@ -1052,7 +1045,7 @@ public partial class DlibDotNet
|
||||
argZero = newRootDirectory;
|
||||
_Configuration.PropertyConfiguration.ChangeRootDirectory(newRootDirectory);
|
||||
propertyRoot = Property.Models.Stateless.IResult.GetResultsGroupDirectory(_Configuration.PropertyConfiguration, nameof(A_Property), create: false);
|
||||
propertyLogic = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, _Resize.FileNameExtension, _Configuration.Reverse, model, predictorModel);
|
||||
propertyLogic = new(_AppSettings.MaxDegreeOfParallelism, _Configuration.PropertyConfiguration, _Resize.FileNameExtension, _Configuration.Reverse);
|
||||
}
|
||||
Dictionary<int, List<(string, int)>> idToMappedFaceFilesCollection = Map.Models.Stateless.Methods.IMapLogic.DeleteEmptyDirectoriesAndGetMappedFaceFiles(_MapConfiguration, ticks, a2PeopleContentDirectory, eDistanceContentDirectory, personContainers);
|
||||
FullDoWork(argZero, model, predictorModel, propertyRoot, ticks, propertyLogic, t, containers, eDistanceContentDirectory, idToMappedFaceFilesCollection);
|
||||
@ -1080,7 +1073,7 @@ public partial class DlibDotNet
|
||||
List<G2_Identify> identifiedCollection = identify.GetIdentifiedCollection(_IsEnvironment, _Configuration.PropertyConfiguration, _Faces.FileNameExtension);
|
||||
identify.WriteAllText(_Configuration.PropertyConfiguration, _Configuration.OutputResolutions[0], identifiedCollection);
|
||||
if (_Configuration.LoadOrCreateThenSaveIndex && _FilePropertiesKeyValuePairs.Any())
|
||||
_Index.SetIndex(_Configuration.PropertyConfiguration, model, predictorModel, _Configuration.OutputResolutions[0], _FilePropertiesKeyValuePairs);
|
||||
_Index.SetIndex(_Configuration.PropertyConfiguration, _Configuration.OutputResolutions[0], _FilePropertiesKeyValuePairs);
|
||||
}
|
||||
if (!_IsEnvironment.Development)
|
||||
{
|
||||
@ -1093,9 +1086,6 @@ public partial class DlibDotNet
|
||||
}
|
||||
}
|
||||
|
||||
internal void RenameQueue(Model? model, PredictorModel? predictorModel) => _Rename.RenameQueue(
|
||||
_Configuration.PropertyConfiguration,
|
||||
model,
|
||||
predictorModel);
|
||||
internal void RenameQueue() => _Rename.RenameQueue(_Configuration.PropertyConfiguration);
|
||||
|
||||
}
|
Reference in New Issue
Block a user