--- license: c-uda --- # ObjectPose9D Dataset ## Data Structure Each data sample contains 4 attributes: - **`source`**: Source dataset name (e.g., "cityscapes") - **`prompt`**: Text description or prompt - **`image`**: Image data (stored as binary) - **`map`**: CNOCS Map (stored as binary in EXR format) ### Cityscapes Subset Due to license restrictions, images from the **Cityscapes** source cannot be redistributed directly. - For Cityscapes samples, the `image` field contains only the **relative path** within `leftImg8bit` - You must download the original Cityscapes dataset from: [https://www.cityscapes-dataset.com/downloads/](https://www.cityscapes-dataset.com/downloads/) - For other sources, `image` contains the actual binary image data ### CNOCS Map The `map` field stores the CNOCS Map from the paper in EXR format as binary data. ## Usage ### Loading the Dataset ```python from datasets import load_dataset dataset = load_dataset("FudanCVL/ObjectPose9D", streaming=True) for i, item in enumerate(dataset["train"]): if item["source"] == "cityscapes": # For cityscapes: image field is a path string image_path = item["image"].decode("utf-8") else: with open(f"{i}_{item['source']}.jpg", "wb") as f: f.write(item["image"]) with open(f"{i}_{item['source']}.exr", "wb") as f: f.write(item["map"]) ``` ### Visualizing CNOCS Maps ```python import numpy as np from openexr_numpy import imread from PIL import Image # Read EXR map cnocs_map = imread("map.exr") cnocs_map_uint8 = (cnocs_map * 255).clip(0, 255).astype(np.uint8) img = Image.fromarray(cnocs_map_uint8) img.save("map.png") ```