From 30348eac24eed8906f432f2748d27411d08d61f3 Mon Sep 17 00:00:00 2001 From: shiyu22 Date: Mon, 13 Dec 2021 17:38:11 +0800 Subject: [PATCH] Update README Signed-off-by: shiyu22 --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2c08185..3b31b26 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Transform Image Operator +# Image Preprocessing Operator Authors: derekdqc, shiyu22 @@ -14,23 +14,25 @@ In computer vision (CV) directions, image transformations are usually an indispe **Args:** -​ size(`int`): - -​ The size of the output image. +- size: + - the size of the output image + - supported types: `int` `__call__(self, img: Union[np.ndarray, Image.Image, torch.Tensor, str])` **Args:** -​ img(`Union[np.ndarray, Image.Image, torch.Tensor, str]`): - -​ Original image data, the type can be np.ndarry, PIL.image, or str path of the image. +- img: + - the input image to be processed + - supported type: `np.ndarry` or ` PIL.image` or `str` (path of the image) **Returns:** -​ (`Tuple[('img_transformed', torch.Tensor)]`) +The Operator returns a tuple `Tuple[('img_transformed', torch.Tensor)]` containing following fields: -​ The tensor of the transformed image. +- img_transformed: + - the tensor of the transformed image + - data type: `torch.Tensor` ## Requirements @@ -45,3 +47,4 @@ The `towhee/transform-image` Operator is used for image transformation and is an ## Reference - https://pytorch.org/vision/stable/transforms.html +