Catalog/imagecatalog/ViewModels/AiSettingsViewModel.cs
MaddoScientisto 25fdb82d2f
Some checks failed
Build Windows Avalonia / build (push) Failing after 1m19s
Build Windows Avalonia / release (push) Has been skipped
feat: Add face encoder settings including GPU support, parallelism, and thumbnail options
2026-05-09 15:46:41 +02:00

185 lines
3.8 KiB
C#

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();
}
}
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();
}
}
private bool _faceRecursive;
public bool FaceRecursive
{
get => _faceRecursive;
set
{
_faceRecursive = value;
NotifyPropertyChanged();
}
}
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();
}
}
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();
}
}
private double _aiProgress;
public double AiProgress
{
get => _aiProgress;
set
{
_aiProgress = value;
NotifyPropertyChanged();
}
}
public ObservableCollection<AiResultItem> PreviewResults { get; } = new();
}