peal.visualization.image_grid.make_image_grid

peal.visualization.image_grid.make_image_grid(checkbox_dict, image_dicts)[source]

Compose checkbox columns and image columns into a single grid image.

Parameters:
  • checkbox_dict (dict) – Maps a column title to a list of booleans (one per row); each becomes a column of checkbox icons without captions.

  • image_dicts (dict) – Maps a column title to a pair (images, labels) where images is an [N, 3, H, W] tensor or a list of such tensors (interleaved with zip_tensors()) and labels holds the N captions.

Returns:

All columns concatenated horizontally, checkbox columns first. Every column must share N and the image height H.

Return type:

PIL.Image.Image