|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Newtonsoft.Json; |
|
|
|
|
|
|
|
namespace UnityEngine.Perception.GroundTruth.Exporters.Coco |
|
|
|
{ |
|
|
|
|
|
|
[Serializable] |
|
|
|
public class ObjectDetectionAnnotation |
|
|
|
{ |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
public int iscrowd; |
|
|
|
|
|
|
|
public static ObjectDetectionAnnotation FromBoundingBoxValue(BoundingBox2DLabeler.BoundingBoxValue bbox) |
|
|
|
|
|
|
[Serializable] |
|
|
|
public class ObjectDetectionCategory |
|
|
|
{ |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
public string name; |
|
|
|
public string supercategory; |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
public string name = string.Empty; |
|
|
|
[JsonProperty(Order = -2)] |
|
|
|
public string supercategory = string.Empty; |
|
|
|
} |
|
|
|
|
|
|
|
[Serializable] |
|
|
|
|
|
|
|
|
|
|
public class KeypointAnnotation : ObjectDetectionAnnotation |
|
|
|
{ |
|
|
|
public int num_keypoints; |
|
|
|
public int num_keypoints; |
|
|
|
|
|
|
|
|
|
|
|
public void CopyObjectDetectionData(ObjectDetectionAnnotation objDetection) |
|
|
|
{ |
|
|
|