omniverse/replicator

옴니버스 레플리케이터 예제 6탄

luke12 2022. 5. 27. 15:50

Annotators Examples

 

Annotators Examples — Omniverse Extensions documentation

© Copyright 2019-2022, NVIDIA. Last updated on May 20, 2022.

docs.omniverse.nvidia.com

주석에서는 레이블이 지정된 합성 데이터를 제공합니다. 레플리케이터 내에는 여러 개의 미리 만들어 놓은 주석자가 있습니다. 이 튜토리얼을 통해 얻을 수 있는 주석 처리된 데이터와 출력 형식을 보여드리겠습니다.

주석자 레지스트리

주석 레지스트리는 모든 주석자가 있는 곳입니다. 이러한 항목에 액세스하려면 AnnotatorRegistry.get_annotator() 기능을 사용할 수 있습니다. 레지스트리를 통해 사용할 수 있는 현재 주석자는 다음과 같습니다.

  • rgb
  • bounding_box_2d_loose
  • semantic_segmentation
  • instance_segmentation
  • distance_to_camera
  • distance_to_image_plane
  • bounding_box_3d
  • motion_vectors
  • occlusion
  • normals

예를 들어 basicWriter의 경계 상자에 대해 init_params={"semanticTypes": semantic_types})에 액세스하기 위해 몇 가지 초기 매개 변수를 사용할 수 있습니다. 아래의 코드 라인에는 경계 상자 타이트 주석자가 표시됩니다. 

AnnotatorRegistry.get_annotator("bounding_box_2d_tight", init_params={"semanticTypes": semantic_types})

주석자를 호출하여 데이터 작성에 사용하는 방법을 확인합니다.  basic writer를 구현하는 스크립트를 확인할 수 있습니다. 스크립트 사용 방법은 레플리케이터 스크립트에 나와 있습니다.

주석 출력

다음은 출력에 대한 간단한 설명입니다. 자세한 내용은 스크립트 annotator_registry.py를 참조하십시오(Replicator용 스크립트의 지침에 따라 해당 스크립트를 찾을 수 있습니다).

  • RGB

"rgb" 주석자는 4개의 채널을 가진 np.uint8 유형의 2d 배열을 생성합니다.

  • Nomals

"normal" 주석자는 4개의 채널을 가진 np.uint32 유형의 2d 배열을 생성합니다.

  • Motion Vectors

"motion_vectors"는 4개의 채널을 가진 np.uint32 유형의 2darray를 생성합니다.

  • Cross Correspondance

"cross_compondency"는 4개의 채널을 가진 np.uint32 유형의 2d 배열을 생성합니다.

  • Bounding Box 3D

"bounding_box_3d"는 아래와 같이 변환이 있는 3D 경계 상자의 가장자리와 함께 인스턴스 및 의미 ID를 반환합니다.

np.dtype(
    [
        ("instanceId", "<u4"),
        ("semanticId", "<u4"),
        ("x_min", "<f4"),
        ("y_min", "<f4"),
        ("z_min", "<f4"),
        ("x_max", "<f4"),
        ("y_max", "<f4"),
        ("z_max", "<f4"),
        ("transform", "<f4", (4, 4)),
    ]
)
  • Bounding Box 2D tight

"BoundingBox2DTight" 주석자는 minx와 y뿐만 아니라 max x와 y를 포함하는 의미 ID를 반환합니다. 아래와 같습니다.

np.dtype([("semanticId", "<u4"), ("x_min", "<i4"), ("y_min", "<i4"), ("x_max", "<i4"), ("y_max", "<i4")])
  • Bounding Box 2D loose

"bounding_box_2d_loose" 주석자는 minx와 y뿐만 아니라 max x와 y를 포함하는 의미 ID를 반환합니다. 아래와 같습니다.

np.dtype([("semanticId", "<u4"), ("x_min", "<i4"), ("y_min", "<i4"), ("x_max", "<i4"), ("y_max", "<i4")])
  • Semantic Segmenetation

"semantic_segmentation"은 np.uint32 유형의 2d 배열을 반환합니다.

  • Instance Segmentation

"instance_segmentation"은 np.uint32 유형의 2d 배열을 반환합니다.

  • Distance to Image Plane

"distance_to_image_plane"은 np.uint32 유형의 2d 배열을 반환합니다.

  • Distance to Camera

"distance_to_camera는 np.uint32" 유형의 2d 배열을 반환합니다.