Visualizes an example recording from the NYUD dataset with RGB and Depth channels.
The dataset, known as the NYU Depth V2 dataset, consists of synchronized pairs of RGB and depth frames recorded by the Microsoft Kinect in various indoor scenes. This example visualizes one scene of this dataset, and offers a rich source of data for object recognition, scene understanding, depth estimation, and more.
The visualizations in this example were created with the following Rerun code:
All data logged using Rerun in the following sections is connected to a specific time.
Rerun assigns a timestamp to each piece of logged data, and these timestamps are associated with a timeline.
rr.set_index("time", datetime=time.timestamp())The example image is logged as Image to the world/camera/image/rgb entity.
rr.log("world/camera/image/rgb", rr.Image(img_rgb).compress(jpeg_quality=95))Pinhole camera is utilized for achieving a 3D view and camera perspective through the use of the Pinhole.
rr.log(
"world/camera/image",
rr.Pinhole(
resolution=[img_depth.shape[1], img_depth.shape[0]],
focal_length=0.7 * img_depth.shape[1],
),
)Then, the depth image is logged as a DepthImage to the world/camera/image/depth entity.
rr.log("world/camera/image/depth", rr.DepthImage(img_depth, meter=DEPTH_IMAGE_SCALING))To run this example, make sure you have the Rerun repository checked out and the latest SDK installed:
pip install --upgrade rerun-sdk # install the latest Rerun SDK
git clone git@github.com:rerun-io/rerun.git # Clone the repository
cd rerun
git checkout latest # Check out the commit matching the latest SDK releaseInstall the necessary libraries specified in the requirements file:
pip install -e examples/python/rgbdTo experiment with the provided example, simply execute the main Python script:
python -m rgbd # run the exampleYou can specify the recording:
python -m rgbd --recording {cafe,basements,studies,office_kitchens,playroooms}If you wish to customize it, explore additional features, or save it use the CLI with the --help option for guidance:
python -m rgbd --help