AIFotoOnlus/src/AIFotoONLUS.Core/ModelConfiguration.cs
MaddoScientisto dc4ebdaf42 Add full XML docs and NuGet IntelliSense support
Comprehensive XML documentation added to all public types, methods, and properties in AIFotoONLUS.Core. Project updated to generate and pack XML docs for NuGet consumers. README rewritten for clarity. Improves developer experience with rich IntelliSense and API docs.
2026-02-15 23:37:08 +01:00

64 lines
No EOL
2.5 KiB
C#

using OpenCvSharp;
namespace AIFotoONLUS.Core
{
/// <summary>
/// Configuration options that control model file locations, input sizes
/// and runtime thresholds used by <see cref="NumberRecognitionEngine"/>.
/// </summary>
public class ModelConfiguration
{
/// <summary>
/// Path to the Darknet configuration (.cfg) file for the detection network.
/// </summary>
public string DetectionCfg { get; set; } = "models/detection.cfg";
/// <summary>
/// Path to the Darknet weights (.weights) file for the detection network.
/// </summary>
public string DetectionWeights { get; set; } = "models/detection.weights";
/// <summary>
/// Path to the Darknet configuration (.cfg) file for the recognition network.
/// </summary>
public string RecognitionCfg { get; set; } = "models/recognition.cfg";
/// <summary>
/// Path to the Darknet weights (.weights) file for the recognition network.
/// </summary>
public string RecognitionWeights { get; set; } = "models/recognition.weights";
/// <summary>
/// Confidence threshold used to filter out low-probability detections.
/// </summary>
public double ConfidenceThreshold { get; set; } = 0.5;
/// <summary>
/// Non-maximum suppression (NMS) IoU threshold used to remove overlapping
/// detection boxes.
/// </summary>
public double NmsThreshold { get; set; } = 0.4;
/// <summary>
/// Input size used when preparing the blob for the detection network.
/// </summary>
public Size DetectionInputSize { get; set; } = new Size(416, 416);
/// <summary>
/// Input size used when preparing the blob for the recognition network.
/// </summary>
public Size RecognitionInputSize { get; set; } = new Size(140, 120);
/// <summary>
/// Labels representing digit classes in the recognition model. The order
/// must match the class ordering used by the trained recognition network.
/// </summary>
public string[] NumberClasses { get; set; } = new[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
/// <summary>
/// When enabled, recognition crops will be saved to disk under
/// "logs/crops" for diagnostic inspection. Disabled by default.
/// </summary>
public bool EnableCropSaving { get; set; } = false;
}
}