# 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
      'type': tfds.features.Text(),
      # Camera distortion coefficients. Since cameras in this dataset does not
      # have any distortions, these will have zero values and can be ignored.
      'distortion': {
          # Radial distortion coefficients [k1, k2, k3].
          'radial': tfds.features.Tensor(shape=(3,), dtype=tf.float32),
          # Tangential distortion coefficients [p1, p2].
          'tangential': tfds.features.Tensor(shape=(2,), dtype=tf.float32),
      }
  }


def pose_spec() -> FeatureSpecs:
  """Specification of pose represented by 3D Isometric transformation.

  Returns:
    A composite `tfds` feature defining the specification of SE(3) pose data.
  """
  return {
      # 3x3 rotation matrix.
      'R': tfds.features.Tensor(shape=(3, 3), dtype=tf.float32),
      # 3D translation vector.
      't': tfds.features.Tensor(shape=(3,), dtype=tf.float32),
  }


def camera_rays_spec(
    *,
    img_shape: Tuple[Dim, Dim] = (None, None),
    encoding: tfds.features.Encoding = tfds.features.Encoding.ZLIB,

# 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

      'type': tfds.features.Text(),
      # Camera distortion coefficients. Since cameras in this dataset does not
      # have any distortions, these will have zero values and can be ignored.
      'distortion': {
          # Radial distortion coefficients [k1, k2, k3].
          'radial': tfds.features.Tensor(shape=(3,), dtype=tf.float32),
          # Tangential distortion coefficients [p1, p2].
          'tangential': tfds.features.Tensor(shape=(2,), dtype=tf.float32),
      }
  }


def pose_spec() -> FeatureSpecs:
  """Specification of pose represented by 3D Isometric transformation.

  Returns:
    A composite `tfds` feature defining the specification of SE(3) pose data.
  """
  return {
      # 3x3 rotation matrix.
      'R': tfds.features.Tensor(shape=(3, 3), dtype=tf.float32),
      # 3D translation vector.
      't': tfds.features.Tensor(shape=(3,), dtype=tf.float32),
  }


def camera_rays_spec(
    *,
    img_shape: Tuple[Dim, Dim] = (None, None),
    encoding: tfds.features.Encoding = tfds.features.Encoding.ZLIB,

) -> FeatureSpecs: