Experimental Datatypes
A list of experimental multi-modal datatypes that can be passed into a WandB loggable dictionary.
InteractiveVideo
Bases: Html
Format a video such that it is logged in an interactive format with controls
to contrast the default uncontrollable gif offered by
wandb.Video
.
Example WandB Run
Parameters:
Name | Type | Description | Default |
---|---|---|---|
video |
Union[str, List[array]]
|
The path to a video file or a list of
numpy arrays of shape |
required |
video_format |
str
|
Format of the video. |
'mp4'
|
fps |
int
|
Frame-rate of the video, applicable only when logging list of numpy arrays. |
30
|
Returns:
Type | Description |
---|---|
Union[Html, None]
|
A |
Source code in wandb_addons/datatype/video.py
RGBDPointCloud
Bases: Object3D
Format an RGB image and a depthmap such that it is logged as an interactive 3d point cloud.
Example WandB Run
Logging an RGB Image and a Depthmap as a Point Cloud
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rgb_image |
Union[str, Image, array]
|
The RGB image. Either a path to an image file, or a PIL Image, or a numpy array can be passed. |
required |
depth_image |
Union[str, Image, array]
|
The Depthmap. Either a path to an image file, or a PIL Image, or a numpy array can be passed. |
required |
camera_intrinsic_parameters |
Dict[str, float]
|
The camera intrinsic parameters
as a dictionary. Defaults to
|
None
|
Source code in wandb_addons/datatype/rgbd.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
VoxelizedPointCloud
Bases: Object3D
Voxelizes a high-resolution point-cloud and format as a wandb-loggable 3D mesh.
Example WandB Run
Logging the voxelized mesh of this point cloud takes up a memort of ~29 MB of space on the wandb run, whereas logging the raw point cloud takes up ~700 MB of space.
import laspy as lp
import numpy as np
import wandb
from wandb_addons.datatype import VoxelizedPointCloud
point_cloud = lp.read("2021_heerlen_table.las")
numpy_point_cloud = np.vstack((point_cloud.x, point_cloud.y, point_cloud.z)).transpose()
numpy_color_cloud = (
np.vstack((point_cloud.red, point_cloud.green, point_cloud.blue)).transpose()
/ 65535
)
with wandb.init(project="test"):
wandb.log(
{"Test-Point-Cloud": VoxelizedPointCloud(numpy_point_cloud, numpy_color_cloud)}
)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point_cloud |
Optional[Union[str, np.array]]
|
The point cloud. Either a path to
a laspy file, or a numpy array of shape |
None
|
colors |
Optional[array]
|
The colors of the point cloud. A numpy array of
shape |
None
|
voxel_size_percentage |
Optional[float]
|
The size of each voxel as a percentage of the maximum edge of the point cloud. |
0.5
|
voxel_precision |
Optional[int]
|
The precision of the voxel size. |
4
|
Source code in wandb_addons/datatype/voxelized_pcd.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|