(
image: Float[Tensor, "3 width height"],
label: str,
font: Path = Path("assets/Inter-Regular.otf"),
font_size: int = 24,
)
| 260 | |
| 261 | |
| 262 | def add_label( |
| 263 | image: Float[Tensor, "3 width height"], |
| 264 | label: str, |
| 265 | font: Path = Path("assets/Inter-Regular.otf"), |
| 266 | font_size: int = 24, |
| 267 | ) -> Float[Tensor, "3 width_with_label height_with_label"]: |
| 268 | return vcat( |
| 269 | draw_label(label, font, font_size, image.device), |
| 270 | image, |
| 271 | align="left", |
| 272 | gap=4, |
| 273 | ) |
no test coverage detected