# Path: sunds/core/spec_dict.py
# class SpecDict(dict):
#   def maybe_set(
#       self,
#       key: str,
#       value: Union[FeaturesOrBool, Any],
#       default: Union[FeaturesOrBool, _Factory] = False,
#   ) -> None:
#   def maybe_update(
#       self,
#       other: FeaturesOrBool,
#       default: FeaturesOrBool = False,
#   ) -> None:
# def labeled_image(
#     labels: LabelArg,
#     **kwargs: Any,
# ) -> tfds.features.LabeledImage:
# def _is_features(features: FeatureSpecs) -> bool:
# 
# Path: sunds/typing.py



from typing import Tuple
from sunds.core import spec_dict
from sunds.typing import Dim, FeatureSpecs, FeaturesOrBool, LabelOrFeaturesOrBool  # pylint: disable=g-multiple-import
import tensorflow as tf
import tensorflow_datasets as tfds
def camera_spec(
    *,
    color_image: FeaturesOrBool = False,
    category_image: LabelOrFeaturesOrBool = False,
    instance_image: LabelOrFeaturesOrBool = False,
    depth_image: FeaturesOrBool = False,
    camera_rays: FeaturesOrBool = False,
    img_shape: Tuple[Dim, Dim] = (None, None),
) -> FeatureSpecs:
  """Feature specification of camera sensor 📷.

  This functions returns the specification of camera sensor data like intrinsics
  and extrinsics of the camera, and optionally the images caputured by the
  camera and image level annotations.

  Note that the camera extrinsics stored here are w.r.t frame. To get the pose
  of a camera w.r.t to scene, we have to also use the pose of the frame w.r.t
  scene.

  Args:
    color_image: Rgb color image is stored.
    category_image: Category segmentation label image.
    instance_image: Object instance ids.
    depth_image: depth image is stored.
    camera_rays: The given camera specs.
    img_shape: The (h, w) image shape.

  Returns:
    A composite `tfds` feature defining the specification of camera data.
  """

# Path: sunds/core/spec_dict.py
# class SpecDict(dict):
#   def maybe_set(
#       self,
#       key: str,
#       value: Union[FeaturesOrBool, Any],
#       default: Union[FeaturesOrBool, _Factory] = False,
#   ) -> None:
#   def maybe_update(
#       self,
#       other: FeaturesOrBool,
#       default: FeaturesOrBool = False,
#   ) -> None:
# def labeled_image(
#     labels: LabelArg,
#     **kwargs: Any,
# ) -> tfds.features.LabeledImage:
# def _is_features(features: FeatureSpecs) -> bool:
# 
# Path: sunds/typing.py



# Path: sunds/core/specs.py
from typing import Tuple
from sunds.core import spec_dict
from sunds.typing import Dim, FeatureSpecs, FeaturesOrBool, LabelOrFeaturesOrBool  # pylint: disable=g-multiple-import
import tensorflow as tf
import tensorflow_datasets as tfds

def camera_spec(
    *,
    color_image: FeaturesOrBool = False,
    category_image: LabelOrFeaturesOrBool = False,
    instance_image: LabelOrFeaturesOrBool = False,
    depth_image: FeaturesOrBool = False,
    camera_rays: FeaturesOrBool = False,
    img_shape: Tuple[Dim, Dim] = (None, None),
) -> FeatureSpecs:
  """Feature specification of camera sensor 📷.

  This functions returns the specification of camera sensor data like intrinsics
  and extrinsics of the camera, and optionally the images caputured by the
  camera and image level annotations.

  Note that the camera extrinsics stored here are w.r.t frame. To get the pose
  of a camera w.r.t to scene, we have to also use the pose of the frame w.r.t
  scene.

  Args:
    color_image: Rgb color image is stored.
    category_image: Category segmentation label image.
    instance_image: Object instance ids.
    depth_image: depth image is stored.
    camera_rays: The given camera specs.
    img_shape: The (h, w) image shape.

  Returns:
    A composite `tfds` feature defining the specification of camera data.
  """

  spec = spec_dict.SpecDict({