Data types for Image Metafile

Module: cutoop.image_meta.

classImageMetaData​(objects: 'list[ObjectPoseInfo]', camera: cutoop.image_meta.ViewInfo, scene_dataset: str, env_param: dict, face_up: bool, concentrated: bool, comments: str, runtime_seed: int, baseline_dis: int, emitter_dist_l: int)

Bases: object

propertycamera: ViewInfo

Information of the scene

propertyobjects: list[ObjectPoseInfo]

A list of visiable objects

propertyscene_dataset: str

Dataset source of the scene

methodload_json​(path: str): ImageMetaData

Load object meta data from json file

>>> meta = ImageMetaData.load_json("../../misc/sample_real/000000_meta.json")
>>> meta.camera.intrinsics
CameraIntrinsicsBase(fx=915.0556030273438, fy=914.1288452148438, cx=641.2314453125, cy=363.4847412109375, width=1280, height=720)
classObjectMetaInfo​(oid: str, class_name: str, class_label: int, instance_path: str, scale: 'list[float]', is_background: bool, bbox_side_len: 'list[float]')

Bases: object

propertyclass_label: int

1-indexed class label of the object

propertyclass_name: str

Class name of the object

propertyinstance_path: str

Path to the model mesh file

propertyis_background: bool

Whether it is marked as a background object.

propertyoid: str

Object ID, which is used to index object metadata

propertyscale: list[float]

Scale from object space (not NOCS) to the camera space . For the size of the object, refer to the object meta file.

classObjectPoseInfo​(mask_id: int, meta: cutoop.image_meta.ObjectMetaInfo, quaternion_wxyz: 'list[float]', translation: 'list[float]', is_valid: bool, id: int, material: 'list[str]', world_quaternion_wxyz: 'list[float]', world_translation: 'list[float]')

Bases: object

propertyis_valid: bool

Whether the object meet requirements (faceup, reasonable real-world location)

propertymask_id: int

the value identifying this object in mask image

propertymeta: ObjectMetaInfo

object meta information.

propertyquaternion_wxyz: list[float]

object rotation in camera space

propertytranslation: list[float]

object translation in camera space

methodpose​(): Pose

Construct Pose relative to the camera coordinate.

classViewInfo​(quaternion: 'tuple[float, float, float, float]', translation: 'tuple[float, float, float]', intrinsics: cutoop.data_types.CameraIntrinsicsBase, scene_obj_path: str, background_image_path: str, background_depth_path: str, distances: 'list[float]', kind: str)

Bases: Pose

propertyintrinsics: CameraIntrinsicsBase

Camera intrinsics

propertyscene_obj_path: str

Scene object mesh path