mldas.explore.loading.load_image ¶
- mldas.explore.loading. load_image ( data , rgb = False , to_numpy = False , squeeze = False ) [source] ¶
-
Load input data as tensor image. Input data can be either in the form of JPG image or raw data region and will be converted into numpy.uint8 format, then either RGB or grayscale image.
- Parameters
-
-
data
str
ornumpy.ndarray
-
Input data, either path saved image, or raw data array.
-
rgb
bool
-
Convert data to RGB data image
-
to_numpy
bool
-
Convert data to numpy array
-
squeeze
bool
-
Squeeze data to remove any dimensions equal to 1.
-
data