mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 21:46:30 +00:00
d1af7958f8
day/winter/night switcher fixes
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using Newtonsoft.Json;
|
|
|
|
namespace Azaion.Common.DTO.Config;
|
|
|
|
public class AnnotationConfig
|
|
{
|
|
public List<DetectionClass> DetectionClasses { get; set; } = null!;
|
|
|
|
[JsonIgnore]
|
|
private Dictionary<int, DetectionClass>? _detectionClassesDict;
|
|
|
|
[JsonIgnore]
|
|
public Dictionary<int, DetectionClass> DetectionClassesDict
|
|
{
|
|
get
|
|
{
|
|
if (_detectionClassesDict != null)
|
|
return _detectionClassesDict;
|
|
|
|
var photoModes = Enum.GetValues(typeof(PhotoMode)).Cast<PhotoMode>().ToList();
|
|
|
|
_detectionClassesDict = DetectionClasses.SelectMany(cls => photoModes.Select(mode => new DetectionClass
|
|
{
|
|
Id = cls.Id,
|
|
Name = cls.Name,
|
|
ShortName = cls.ShortName,
|
|
PhotoMode = mode
|
|
}))
|
|
.ToDictionary(x => x.YoloId, x => x);
|
|
return _detectionClassesDict;
|
|
}
|
|
}
|
|
|
|
public List<string> VideoFormats { get; set; } = null!;
|
|
public List<string> ImageFormats { get; set; } = null!;
|
|
|
|
public string AnnotationsDbFile { get; set; } = null!;
|
|
|
|
public double LeftPanelWidth { get; set; }
|
|
public double RightPanelWidth { get; set; }
|
|
} |