Add annotationResult and put them into json

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-07-16 14:06:05 +03:00
parent ea8d0e686a
commit 71006a2462
16 changed files with 445 additions and 252 deletions
+28
View File
@@ -0,0 +1,28 @@
using Newtonsoft.Json;
namespace Azaion.Annotator.DTO;
public class AnnotationResult
{
[JsonProperty(PropertyName = "f")]
public string Image { get; set; } = null!;
[JsonProperty(PropertyName = "t")]
public TimeSpan Time { get; set; }
[JsonProperty(PropertyName = "p")]
public double Percentage { get; set; }
public double Lat { get; set; }
public double Lon { get; set; }
public List<YoloLabel> Labels { get; set; } = new();
public AnnotationResult() { }
public AnnotationResult(TimeSpan time, string timeName, List<YoloLabel> labels)
{
Labels = labels;
Time = time;
Image = $"{timeName}.jpg";
Percentage = 100;
}
}