peal.visualization.image_grid¶
PIL/NumPy helpers that assemble PEAL’s annotated image grids.
Explainers and teachers render feedback collages as columns: a rotated title,
then one image per row with a caption underneath. Columns of checkbox icons
(<resource_dir>/imgs/checkbox_right.png / checkbox_wrong.png) mark
boolean per-row facts such as “flipped”. make_image_grid() concatenates
such columns into one image; the other functions build the pieces. Image
tensors are [N, C, H, W] floats in [0, 1].
Functions
Render a list of booleans as a batch of checkbox icons. |
|
Draw |
|
Stack images vertically into one titled, captioned column. |
|
Compose checkbox columns and image columns into a single grid image. |
|
Interleave several image batches sample by sample along the width. |