Unverified Commit 5649c0cb authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix `DepthEstimationPipeline`'s docstring (#28733)



* fix

* fix

* Fix

---------
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 243e186e
...@@ -52,7 +52,7 @@ class DepthEstimationPipeline(Pipeline): ...@@ -52,7 +52,7 @@ class DepthEstimationPipeline(Pipeline):
def __call__(self, images: Union[str, List[str], "Image.Image", List["Image.Image"]], **kwargs): def __call__(self, images: Union[str, List[str], "Image.Image", List["Image.Image"]], **kwargs):
""" """
Assign labels to the image(s) passed as inputs. Predict the depth(s) of the image(s) passed as inputs.
Args: Args:
images (`str`, `List[str]`, `PIL.Image` or `List[PIL.Image]`): images (`str`, `List[str]`, `PIL.Image` or `List[PIL.Image]`):
...@@ -65,9 +65,6 @@ class DepthEstimationPipeline(Pipeline): ...@@ -65,9 +65,6 @@ class DepthEstimationPipeline(Pipeline):
The pipeline accepts either a single image or a batch of images, which must then be passed as a string. The pipeline accepts either a single image or a batch of images, which must then be passed as a string.
Images in a batch must all be in the same format: all as http links, all as local paths, or all as PIL Images in a batch must all be in the same format: all as http links, all as local paths, or all as PIL
images. images.
top_k (`int`, *optional*, defaults to 5):
The number of top labels that will be returned by the pipeline. If the provided number is higher than
the number of labels available in the model configuration, it will default to the number of labels.
timeout (`float`, *optional*, defaults to None): timeout (`float`, *optional*, defaults to None):
The maximum time in seconds to wait for fetching images from the web. If None, no timeout is set and The maximum time in seconds to wait for fetching images from the web. If None, no timeout is set and
the call may block forever. the call may block forever.
...@@ -79,8 +76,8 @@ class DepthEstimationPipeline(Pipeline): ...@@ -79,8 +76,8 @@ class DepthEstimationPipeline(Pipeline):
The dictionaries contain the following keys: The dictionaries contain the following keys:
- **label** (`str`) -- The label identified by the model. - **predicted_depth** (`torch.Tensor`) -- The predicted depth by the model as a `torch.Tensor`.
- **score** (`int`) -- The score attributed by the model for that label. - **depth** (`PIL.Image`) -- The predicted depth by the model as a `PIL.Image`.
""" """
return super().__call__(images, **kwargs) return super().__call__(images, **kwargs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment