Skip to main content

load_image

Function load_image 

Source
pub fn load_image<B: Backend>(
    path: impl AsRef<Path>,
    device: &B::Device,
) -> Result<Image<B>>
Expand description

Loads an image from the specified file path. The image is automatically converted to RGB/Grayscale and represented as a [C, H, W] float tensor.