浏览代码

fix compatibility with datamaker package

/coco_export
Mohsen Kamalzadeh 3 年前
当前提交
c9eb08a7
共有 3 个文件被更改,包括 17 次插入5 次删除
  1. 4
      com.unity.perception/Runtime/GroundTruth/Exporters/Coco/CocoExporter.cs
  2. 8
      com.unity.perception/Runtime/GroundTruth/Labelers/BoundingBoxLabeler.cs
  3. 10
      com.unity.perception/Runtime/GroundTruth/Labelers/KeypointLabeler.cs

4
com.unity.perception/Runtime/GroundTruth/Exporters/Coco/CocoExporter.cs


public void OnAnnotationRegistered<TSpec>(Guid annotationId, TSpec[] values)
{
if (annotationId.ToString() == BoundingBox2DLabeler.annotationId)
if (annotationId.ToString() == BoundingBox2DLabeler.annotationIdForCocoExport)
{
m_ReportingObjectDetection = true;
m_ObjectDetectionCategories = new CocoTypes.ObjectDetectionCategories

}
}
if (annotationId.ToString() == KeypointLabeler.annotationId)
if (annotationId.ToString() == KeypointLabeler.annotationIdForCocoExport)
{
m_ReportingKeypoints = true;
var categories = new CocoTypes.KeypointCategory[values.Length];

8
com.unity.perception/Runtime/GroundTruth/Labelers/BoundingBoxLabeler.cs


/// <summary>
/// The GUID id to associate with the annotations produced by this labeler.
/// </summary>
public static string annotationId = "f9f22e05-443f-4602-a422-ebe4ea9b55cb";
public string annotationId = "f9f22e05-443f-4602-a422-ebe4ea9b55cb";
/// <summary>
/// The annotation ID that the COCO exporter will use to know whether an ID is coming from a bounding box 2 labeler.
/// </summary>
public static string annotationIdForCocoExport = "f9f22e05-443f-4602-a422-ebe4ea9b55cb";
/// <summary>
/// The <see cref="IdLabelConfig"/> which associates objects with labels.
/// </summary>

10
com.unity.perception/Runtime/GroundTruth/Labelers/KeypointLabeler.cs


/// <summary>
/// The GUID id to associate with the annotations produced by this labeler.
/// </summary>
public static string annotationId = "8b3ef246-daa7-4dd5-a0e8-a943f6e7f8c2";
public string annotationId = "8b3ef246-daa7-4dd5-a0e8-a943f6e7f8c2";
/// <summary>
/// The annotation ID that the COCO exporter will use to know whether an ID is coming from a keypoint labeler.
/// </summary>
public static string annotationIdForCocoExport = "8b3ef246-daa7-4dd5-a0e8-a943f6e7f8c2";
/// <summary>
/// The <see cref="IdLabelConfig"/> which associates objects with labels.
/// </summary>

return jsons;
}
}
}
}
正在加载...
取消
保存