2026-03-12 18:48:13 +01:00
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using ImageCatalog_2.Models;
|
|
|
|
|
|
|
|
|
|
namespace ImageCatalog_2.ViewModels;
|
|
|
|
|
|
|
|
|
|
public class AiSettingsViewModel : ViewModelBase
|
|
|
|
|
{
|
|
|
|
|
private bool _extractNumbers;
|
|
|
|
|
public bool ExtractNumbers
|
|
|
|
|
{
|
|
|
|
|
get => _extractNumbers;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_extractNumbers = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _modelsFolderPath = string.Empty;
|
|
|
|
|
public string ModelsFolderPath
|
|
|
|
|
{
|
|
|
|
|
get => _modelsFolderPath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_modelsFolderPath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _csvOutputPath = string.Empty;
|
|
|
|
|
public string CsvOutputPath
|
|
|
|
|
{
|
|
|
|
|
get => _csvOutputPath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_csvOutputPath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-05-09 17:27:05 +02:00
|
|
|
|
|
|
|
|
private bool _useNumberAiGpu;
|
|
|
|
|
public bool UseNumberAiGpu
|
|
|
|
|
{
|
|
|
|
|
get => _useNumberAiGpu;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_useNumberAiGpu = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-05-09 17:53:15 +02:00
|
|
|
|
|
|
|
|
private bool _numberAiGpuOptionEnabled;
|
|
|
|
|
public bool NumberAiGpuOptionEnabled
|
|
|
|
|
{
|
|
|
|
|
get => _numberAiGpuOptionEnabled;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_numberAiGpuOptionEnabled = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _includeNumberAiThumbnails;
|
|
|
|
|
public bool IncludeNumberAiThumbnails
|
|
|
|
|
{
|
|
|
|
|
get => _includeNumberAiThumbnails;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_includeNumberAiThumbnails = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-05-09 18:54:20 +02:00
|
|
|
|
|
|
|
|
private int _numberAiWorkloadLevel = 3;
|
|
|
|
|
public int NumberAiWorkloadLevel
|
|
|
|
|
{
|
|
|
|
|
get => _numberAiWorkloadLevel;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_numberAiWorkloadLevel = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _numberAiStatsSummary = string.Empty;
|
|
|
|
|
public string NumberAiStatsSummary
|
|
|
|
|
{
|
|
|
|
|
get => _numberAiStatsSummary;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_numberAiStatsSummary = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-12 18:48:13 +01:00
|
|
|
|
|
|
|
|
private string _faceExecutablePath = string.Empty;
|
|
|
|
|
public string FaceExecutablePath
|
|
|
|
|
{
|
|
|
|
|
get => _faceExecutablePath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceExecutablePath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceOutputFolderPath = string.Empty;
|
|
|
|
|
public string FaceOutputFolderPath
|
|
|
|
|
{
|
|
|
|
|
get => _faceOutputFolderPath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceOutputFolderPath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-09 12:09:05 +02:00
|
|
|
private bool _faceRecursive;
|
|
|
|
|
public bool FaceRecursive
|
|
|
|
|
{
|
|
|
|
|
get => _faceRecursive;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceRecursive = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-09 15:46:41 +02:00
|
|
|
private bool _faceIncludeThumbnails;
|
|
|
|
|
public bool FaceIncludeThumbnails
|
|
|
|
|
{
|
|
|
|
|
get => _faceIncludeThumbnails;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceIncludeThumbnails = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int _faceParallelism = 3;
|
|
|
|
|
public int FaceParallelism
|
|
|
|
|
{
|
|
|
|
|
get => _faceParallelism;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceParallelism = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int _faceMinSize = 35;
|
|
|
|
|
public int FaceMinSize
|
|
|
|
|
{
|
|
|
|
|
get => _faceMinSize;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMinSize = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _faceUpsample = true;
|
|
|
|
|
public bool FaceUpsample
|
|
|
|
|
{
|
|
|
|
|
get => _faceUpsample;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceUpsample = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-09 12:09:05 +02:00
|
|
|
private bool _faceGpuOptionEnabled;
|
|
|
|
|
public bool FaceGpuOptionEnabled
|
|
|
|
|
{
|
|
|
|
|
get => _faceGpuOptionEnabled;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceGpuOptionEnabled = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _useFaceGpu;
|
|
|
|
|
public bool UseFaceGpu
|
|
|
|
|
{
|
|
|
|
|
get => _useFaceGpu;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_useFaceGpu = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _isFaceEncoderRunning;
|
|
|
|
|
public bool IsFaceEncoderRunning
|
|
|
|
|
{
|
|
|
|
|
get => _isFaceEncoderRunning;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_isFaceEncoderRunning = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceStatusMessage = string.Empty;
|
|
|
|
|
public string FaceStatusMessage
|
|
|
|
|
{
|
|
|
|
|
get => _faceStatusMessage;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceStatusMessage = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceCommandOutput = string.Empty;
|
|
|
|
|
public string FaceCommandOutput
|
|
|
|
|
{
|
|
|
|
|
get => _faceCommandOutput;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceCommandOutput = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-09 20:27:44 +02:00
|
|
|
private string _faceMatcherExecutablePath = string.Empty;
|
|
|
|
|
public string FaceMatcherExecutablePath
|
|
|
|
|
{
|
|
|
|
|
get => _faceMatcherExecutablePath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMatcherExecutablePath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceMatcherEncodingsPath = string.Empty;
|
|
|
|
|
public string FaceMatcherEncodingsPath
|
|
|
|
|
{
|
|
|
|
|
get => _faceMatcherEncodingsPath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMatcherEncodingsPath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceMatcherOutputPath = string.Empty;
|
|
|
|
|
public string FaceMatcherOutputPath
|
|
|
|
|
{
|
|
|
|
|
get => _faceMatcherOutputPath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMatcherOutputPath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceMatcherLogPath = string.Empty;
|
|
|
|
|
public string FaceMatcherLogPath
|
|
|
|
|
{
|
|
|
|
|
get => _faceMatcherLogPath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMatcherLogPath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private double _faceMatcherTolerance = 0.5;
|
|
|
|
|
public double FaceMatcherTolerance
|
|
|
|
|
{
|
|
|
|
|
get => _faceMatcherTolerance;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMatcherTolerance = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceMatcherSelectedImagePath = string.Empty;
|
|
|
|
|
public string FaceMatcherSelectedImagePath
|
|
|
|
|
{
|
|
|
|
|
get => _faceMatcherSelectedImagePath;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMatcherSelectedImagePath = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool _isFaceMatcherRunning;
|
|
|
|
|
public bool IsFaceMatcherRunning
|
|
|
|
|
{
|
|
|
|
|
get => _isFaceMatcherRunning;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_isFaceMatcherRunning = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceMatcherStatusMessage = string.Empty;
|
|
|
|
|
public string FaceMatcherStatusMessage
|
|
|
|
|
{
|
|
|
|
|
get => _faceMatcherStatusMessage;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMatcherStatusMessage = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string _faceMatcherCommandOutput = string.Empty;
|
|
|
|
|
public string FaceMatcherCommandOutput
|
|
|
|
|
{
|
|
|
|
|
get => _faceMatcherCommandOutput;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_faceMatcherCommandOutput = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-12 18:48:13 +01:00
|
|
|
private double _aiProgress;
|
|
|
|
|
public double AiProgress
|
|
|
|
|
{
|
|
|
|
|
get => _aiProgress;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_aiProgress = value;
|
|
|
|
|
NotifyPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<AiResultItem> PreviewResults { get; } = new();
|
2026-05-09 20:27:44 +02:00
|
|
|
|
|
|
|
|
public ObservableCollection<FaceMatcherResultItem> FaceMatcherResults { get; } = new();
|
2026-03-12 18:48:13 +01:00
|
|
|
}
|