mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:26:30 +00:00
e090f2d093
decouple Loader from Common dll fix current user url in api
30 lines
1011 B
C#
30 lines
1011 B
C#
using Azaion.Common.DTO;
|
|
using MessagePack;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Azaion.Common.Database;
|
|
|
|
[MessagePackObject]
|
|
public class Detection : YoloLabel
|
|
{
|
|
[JsonProperty(PropertyName = "an")][Key("an")] public string AnnotationName { get; set; } = null!;
|
|
[JsonProperty(PropertyName = "p")][Key("p")] public double Confidence { get; set; }
|
|
|
|
[JsonProperty(PropertyName = "dn")] [Key("dn")] public string Description { get; set; } = null!;
|
|
[JsonProperty(PropertyName = "af")] [Key("af")] public AffiliationEnum Affiliation { get; set; }
|
|
|
|
//For db & serialization
|
|
public Detection(){}
|
|
|
|
public Detection(string annotationName, YoloLabel label, string description = "", double confidence = 1)
|
|
{
|
|
AnnotationName = annotationName;
|
|
Description = description;
|
|
ClassNumber = label.ClassNumber;
|
|
CenterX = label.CenterX;
|
|
CenterY = label.CenterY;
|
|
Height = label.Height;
|
|
Width = label.Width;
|
|
Confidence = confidence;
|
|
}
|
|
} |