relevanceai.operations.preprocessing.image.base_image_processing
#
A Collection of Image Tools For Relevance AI Utilies.
You can use as such:
from relevanceai.data_tools.base_image_processing import ImageTools
# Now you want to READ it
tools = ImageTools()
arr = tools.read(image)
Module Contents#
- class relevanceai.operations.preprocessing.image.base_image_processing.ImageTools#
- read(self, image)#
An method to read images (converting them into NumPy arrays) :param image: An image link/bytes/io Bytesio data format. :param as_gray: read in the image as black and white
- static process_image(b)#
- is_greyscale(self, img_path: str)#
Determine if an image is grayscale or not
- to_grayscale(self, sample, rgb_weights: list = None)#
Converting an image from RGB to Grayscale
- property rgb_weights(self)#
Get RGB weights for grayscaling.
- show_image(self, sample, cmap=None, is_grayscale=True)#
Show an image once it is read. Arg:
sample: Image that is read (numpy array)
- image_resize(self, image_array, width=0, height=0, rescale=0, resize_mode='symmetric')#