| <!--Copyright 2020 The HuggingFace Team. All rights reserved. | |
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | |
| the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | |
| an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | |
| specific language governing permissions and limitations under the License. | |
| โ ๏ธ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be | |
| rendered properly in your Markdown viewer. | |
| --> | |
| # Pipelines | |
| ใใคใใฉใคใณใฏใๆจ่ซใซใขใใซใไฝฟใใใใฎ็ฐกๅใงๅชใใๆนๆณใงใใใใใคใใฉใคใณใฏใ่ค้ใชใณใผใใฎใปใจใใฉใๆฝ่ฑกๅใใใชใใธใงใฏใใงใใ | |
| ใใคใใฉใคใณใฏใใฉใคใใฉใชใใ่ค้ใชใณใผใใฎใปใจใใฉใๆฝ่ฑกๅใใใชใใธใงใฏใใงใๅๅไปใๅบๆ่กจ็พ่ช่ญใใในใฏ่จ่ชใขใใชใณใฐใๆๆ ๅๆใ็นๅพดๆฝๅบใ่ณชๅๅฟ็ญใชใฉใฎใฟในใฏใซ็นๅใใใทใณใใซใชAPIใๆไพใใพใใ | |
| RecognitionใMasked Language ModelingใSentiment AnalysisใFeature ExtractionใQuestion Answeringใชใฉใฎใฟในใฏใซ็นๅใใใทใณใใซใชAPIใๆไพใใพใใไปฅไธใๅ็ งใฎใใจใ | |
| [ใฟในใฏๆฆ่ฆ](../task_summary)ใๅ็ งใใฆใใ ใใใ | |
| ใใคใใฉใคใณใฎๆฝ่ฑกๅใซใฏ2ใคใฎใซใใดใชใผใใใ๏ผ | |
| - [`pipeline`] ใฏใไปใฎใในใฆใฎใใคใใฉใคใณใใซใใปใซๅใใๆใๅผทๅใชใชใใธใงใฏใใงใใ | |
| - ใฟในใฏๅบๆใฎใใคใใฉใคใณใฏใ[ใชใผใใฃใช](#audio)ใ[ใณใณใใฅใผใฟใผ ใใธใงใณ](#computer-vision)ใ[่ช็ถ่จ่ชๅฆ็](#natural-language-processing)ใใใใณ [ใใซใใขใผใใซ](#multimodal) ใฟในใฏใงไฝฟ็จใงใใพใใ | |
| ## The pipeline abstraction | |
| *ใใคใใฉใคใณ* ๆฝ่ฑกๅใฏใไปใฎใในใฆใฎๅฉ็จๅฏ่ฝใชใใคใใฉใคใณใฎใฉใใใผใงใใไปใฎใใฎใจๅๆงใซใคใณในใฟใณในๅใใใพใ | |
| ใใคใใฉใคใณใงใใใใใใชใ็ๆดปใฎ่ณชใๆไพใงใใพใใ | |
| 1 ใคใฎ้ ็ฎใซๅฏพใใๅ็ดใชๅผใณๅบใ: | |
| ```python | |
| >>> pipe = pipeline("text-classification") | |
| >>> pipe("This restaurant is awesome") | |
| [{'label': 'POSITIVE', 'score': 0.9998743534088135}] | |
| ``` | |
| [ใใ](https://huggingface.co) ใฎ็นๅฎใฎใขใใซใไฝฟ็จใใใๅ ดๅใฏใใขใใซใใชใณใซใชใฃใฆใใๅ ดๅใฏใฟในใฏใ็ก่ฆใงใใพใใ | |
| ใใใฏใใงใซใใใๅฎ็พฉใใฆใใพใใ | |
| ```python | |
| >>> pipe = pipeline(model="FacebookAI/roberta-large-mnli") | |
| >>> pipe("This restaurant is awesome") | |
| [{'label': 'NEUTRAL', 'score': 0.7313136458396912}] | |
| ``` | |
| ๅคใใฎ้ ็ฎใซๅฏพใใฆใใคใใฉใคใณใๅผใณๅบใใซใฏใ*list* ใไฝฟ็จใใฆใใคใใฉใคใณใๅผใณๅบใใใจใใงใใพใใ | |
| ```python | |
| >>> pipe = pipeline("text-classification") | |
| >>> pipe(["This restaurant is awesome", "This restaurant is awful"]) | |
| [{'label': 'POSITIVE', 'score': 0.9998743534088135}, | |
| {'label': 'NEGATIVE', 'score': 0.9996669292449951}] | |
| ``` | |
| ๅฎๅ จใชใใผใฟใปใใใๅๅพฉใใใซใฏใ`Dataset`ใ็ดๆฅไฝฟ็จใใใใจใใๅงใใใพใใใใใฏใๅฒใๅฝใฆใๅฟ ่ฆใใชใใใจใๆๅณใใพใ | |
| ใใผใฟใปใใๅ จไฝใไธๅบฆใซๅฆ็ใใใใจใใ่ชๅใงใใใๅฆ็ใ่กใๅฟ ่ฆใใใใพใใใใใใฏใซในใฟใ ใซใผใใจๅใใใใ้ใๅไฝใใใฏใใงใใ | |
| GPUใใใใๅ้กใงใชใๅ ดๅใฏใใใใใใใซๅ้กใไฝๆใใฆใใ ใใใ | |
| ```python | |
| import datasets | |
| from transformers import pipeline | |
| from transformers.pipelines.pt_utils import KeyDataset | |
| from tqdm.auto import tqdm | |
| pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h", device=0) | |
| dataset = datasets.load_dataset("superb", name="asr", split="test") | |
| # KeyDataset (only *pt*) will simply return the item in the dict returned by the dataset item | |
| # as we're not interested in the *target* part of the dataset. For sentence pair use KeyPairDataset | |
| for out in tqdm(pipe(KeyDataset(dataset, "file"))): | |
| print(out) | |
| # {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"} | |
| # {"text": ....} | |
| # .... | |
| ``` | |
| ไฝฟใใใใใใใใใซใใธใงใใฌใผใฟใผใไฝฟ็จใใใใจใใงใใพใใ | |
| ```python | |
| from transformers import pipeline | |
| pipe = pipeline("text-classification") | |
| def data(): | |
| while True: | |
| # This could come from a dataset, a database, a queue or HTTP request | |
| # in a server | |
| # Caveat: because this is iterative, you cannot use `num_workers > 1` variable | |
| # to use multiple threads to preprocess data. You can still have 1 thread that | |
| # does the preprocessing while the main runs the big inference | |
| yield "This is a test" | |
| for out in pipe(data()): | |
| print(out) | |
| # {"text": "NUMBER TEN FRESH NELLY IS WAITING ON YOU GOOD NIGHT HUSBAND"} | |
| # {"text": ....} | |
| # .... | |
| ``` | |
| [[autodoc]] pipeline | |
| ## Pipeline batching | |
| ใในใฆใฎใใคใใฉใคใณใงใใใๅฆ็ใไฝฟ็จใงใใพใใใใใฏใใพใใใใพใ | |
| ใใคใใฉใคใณใในใใชใผใใณใฐๆฉ่ฝใไฝฟ็จใใใจใใฏๅธธใซ (ใคใพใใใชในใใ`dataset`ใใพใใฏ `generator`ใๆธกใใจใ)ใ | |
| ```python | |
| from transformers import pipeline | |
| from transformers.pipelines.pt_utils import KeyDataset | |
| import datasets | |
| dataset = datasets.load_dataset("imdb", name="plain_text", split="unsupervised") | |
| pipe = pipeline("text-classification", device=0) | |
| for out in pipe(KeyDataset(dataset, "text"), batch_size=8, truncation="only_first"): | |
| print(out) | |
| # [{'label': 'POSITIVE', 'score': 0.9998743534088135}] | |
| # Exactly the same output as before, but the content are passed | |
| # as batches to the model | |
| ``` | |
| <Tip warning={true}> | |
| ใใ ใใใใใซใใฃใฆใใใฉใผใใณในใ่ชๅ็ใซๅไธใใใใใงใฏใใใพใใใ็ถๆณใซๅฟใใฆใ10 ๅใฎ้ซ้ๅใพใใฏ 5 ๅใฎไฝ้ๅใฎใใใใใซใชใใพใใ | |
| ใใผใใฆใงใขใใใผใฟใไฝฟ็จใใใฆใใๅฎ้ใฎใขใใซใซใคใใฆใ | |
| ไธปใซ้ซ้ๅใงใใไพ: | |
| </Tip> | |
| ```python | |
| from transformers import pipeline | |
| from torch.utils.data import Dataset | |
| from tqdm.auto import tqdm | |
| pipe = pipeline("text-classification", device=0) | |
| class MyDataset(Dataset): | |
| def __len__(self): | |
| return 5000 | |
| def __getitem__(self, i): | |
| return "This is a test" | |
| dataset = MyDataset() | |
| for batch_size in [1, 8, 64, 256]: | |
| print("-" * 30) | |
| print(f"Streaming batch_size={batch_size}") | |
| for out in tqdm(pipe(dataset, batch_size=batch_size), total=len(dataset)): | |
| pass | |
| ``` | |
| ``` | |
| # On GTX 970 | |
| ------------------------------ | |
| Streaming no batching | |
| 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 5000/5000 [00:26<00:00, 187.52it/s] | |
| ------------------------------ | |
| Streaming batch_size=8 | |
| 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 5000/5000 [00:04<00:00, 1205.95it/s] | |
| ------------------------------ | |
| Streaming batch_size=64 | |
| 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 5000/5000 [00:02<00:00, 2478.24it/s] | |
| ------------------------------ | |
| Streaming batch_size=256 | |
| 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 5000/5000 [00:01<00:00, 2554.43it/s] | |
| (diminishing returns, saturated the GPU) | |
| ``` | |
| ๆใ้ๅบฆใไฝไธใใไพ: | |
| ```python | |
| class MyDataset(Dataset): | |
| def __len__(self): | |
| return 5000 | |
| def __getitem__(self, i): | |
| if i % 64 == 0: | |
| n = 100 | |
| else: | |
| n = 1 | |
| return "This is a test" * n | |
| ``` | |
| ใใใฏใไปใฎๆใซๆฏในใฆ้ๅธธใซ้ทใๆใๆๆใใใพใใใใฎๅ ดๅใ**ๅ จไฝ**ใฎใใใใฏ 400 ใงใใๅฟ ่ฆใใใใพใใ | |
| ใใผใฏใณใ้ทใใใใใใใๅ จไฝใ [64, 4] ใงใฏใชใ [64, 400] ใซใชใใ้ๅบฆใๅคงๅน ใซไฝไธใใพใใใใใซๆชใใใจใซใ | |
| ใใใใๅคงใใใชใใจใใใญใฐใฉใ ใฏๅ็ดใซใฏใฉใใทใฅใใพใใ | |
| ``` | |
| ------------------------------ | |
| Streaming no batching | |
| 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1000/1000 [00:05<00:00, 183.69it/s] | |
| ------------------------------ | |
| Streaming batch_size=8 | |
| 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1000/1000 [00:03<00:00, 265.74it/s] | |
| ------------------------------ | |
| Streaming batch_size=64 | |
| 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 1000/1000 [00:26<00:00, 37.80it/s] | |
| ------------------------------ | |
| Streaming batch_size=256 | |
| 0%| | 0/1000 [00:00<?, ?it/s] | |
| Traceback (most recent call last): | |
| File "/home/nicolas/src/transformers/test.py", line 42, in <module> | |
| for out in tqdm(pipe(dataset, batch_size=256), total=len(dataset)): | |
| .... | |
| q = q / math.sqrt(dim_per_head) # (bs, n_heads, q_length, dim_per_head) | |
| RuntimeError: CUDA out of memory. Tried to allocate 376.00 MiB (GPU 0; 3.95 GiB total capacity; 1.72 GiB already allocated; 354.88 MiB free; 2.46 GiB reserved in total by PyTorch) | |
| ``` | |
| ใใฎๅ้กใซๅฏพใใ้ฉๅใช (ไธ่ฌ็ใช) ่งฃๆฑบ็ญใฏใชใใไฝฟ็จใงใใ่ท้ขใฏใฆใผในใฑใผในใซใใฃใฆ็ฐใชใๅ ดๅใใใใพใใใฎใซใผใซ | |
| ่ฆชๆ๏ผ | |
| ใฆใผใถใผใซใจใฃใฆใฎ็ต้จๅใฏๆฌกใฎใจใใใงใใ | |
| - **ใใผใใฆใงใขใไฝฟ็จใใฆใ่ฒ ่ทใซๅฏพใใใใใฉใผใใณในใๆธฌๅฎใใพใใๆธฌใฃใฆใๆธฌใฃใฆใๆธฌใ็ถใใใๅฎๆฐใจใใใฎใฏใ | |
| ้ฒใในใๅฏไธใฎๆนๆณใ** | |
| - ใฌใคใใณใทใซๅถ็ดใใใๅ ดๅ (ๅฎ้ใฎ่ฃฝๅใๆจ่ซใๅฎ่กใใฆใใๅ ดๅ)ใใใใๅฆ็ใ่กใใชใใงใใ ใใใ | |
| - CPU ใไฝฟ็จใใฆใใๅ ดๅใฏใใใใๅฆ็ใ่กใใชใใงใใ ใใใ | |
| - GPU ใงในใซใผใใใใไฝฟ็จใใฆใใๅ ดๅ (ๅคง้ใฎ้็ใใผใฟใงใขใใซใๅฎ่กใใใๅ ดๅ)ใๆฌกใฎใใใซใใพใใ | |
| - sequence_length (ใ่ช็ถใชใใใผใฟ) ใฎใตใคใบใซใคใใฆใพใฃใใใใใใชใๅ ดๅใฏใใใใฉใซใใงใฏใใใๅฆ็ใๆธฌๅฎใ่กใใใ | |
| ๆซๅฎ็ใซ่ฟฝๅ ใใฆใฟใพใใๅคฑๆใใๅ ดๅใซๅๅพฉใใใใใซ OOM ใใงใใฏใ่ฟฝๅ ใใพใ (ๅคฑๆใใๅ ดๅใฏใใใๆ็นใงๅๅพฉใใพใ)ใ | |
| sequence_length ใๅถๅพกใใพใใ) | |
| - sequence_length ใ้ๅธธใซ่ฆๅ็ใงใใๅ ดๅใใใใๅฆ็ใฏ้ๅธธใซ่ๅณๆทฑใใใฎใจใชใๅฏ่ฝๆงใ้ซใใๆธฌๅฎใใฆใใใทใฅใใฆใใ ใใใ | |
| OOM ใ็บ็ใใใพใง็ถใใพใใ | |
| - GPU ใๅคงใใใปใฉใใใใๅฆ็ใใใ่ๅณๆทฑใใใฎใซใชใๅฏ่ฝๆงใ้ซใใชใใพใใ | |
| - ใใใๅฆ็ใๆๅนใซใใใใใใซใOOM ใ้ฉๅใซๅฆ็ใงใใใใจใ็ขบ่ชใใฆใใ ใใใ | |
| ## Pipeline chunk batching | |
| `zero-shot-classification` ใจ `question-answering` ใฏใๅไธใฎๅ ฅๅใง็ตๆใๅพใใใๅฏ่ฝๆงใใใใจใใๆๅณใงใๅฐใ็นๆฎใงใใ | |
| ใขใใซใฎ่คๆฐใฎๅๆนใในใ้ๅธธใฎ็ถๆณใงใฏใใใใซใใ `batch_size` ๅผๆฐใซ้ขใใๅ้กใ็บ็ใใพใใ | |
| ใใฎๅ้กใๅ้ฟใใใใใซใใใใใฎใใคใใฉใคใณใฏใฉใกใใๅฐใ็นๆฎใซใชใฃใฆใใใไปฃใใใซ `ChunkPipeline` ใซใชใฃใฆใใพใใ | |
| ้ๅธธใฎ `Pipeline`ใ่ฆใใใซ๏ผ | |
| ```python | |
| preprocessed = pipe.preprocess(inputs) | |
| model_outputs = pipe.forward(preprocessed) | |
| outputs = pipe.postprocess(model_outputs) | |
| ``` | |
| ไปใฏๆฌกใฎใใใซใชใใพใ: | |
| ```python | |
| all_model_outputs = [] | |
| for preprocessed in pipe.preprocess(inputs): | |
| model_outputs = pipe.forward(preprocessed) | |
| all_model_outputs.append(model_outputs) | |
| outputs = pipe.postprocess(all_model_outputs) | |
| ``` | |
| ใใคใใฉใคใณใฏไปฅไธใงไฝฟ็จใใใใใใใใใฏใณใผใใซๅฏพใใฆ้ๅธธใซ้้็ใงใใๅฟ ่ฆใใใใพใใ | |
| ๅใๆนๆณใ | |
| ใใคใใฉใคใณใฏใใใใ่ชๅ็ใซๅฆ็ใงใใใใใใใใฏ็ฐก็ฅๅใใใใใฅใผใงใใๆฐใซใใๅฟ ่ฆใฏใชใใจใใๆๅณใงใ | |
| ๅ ฅๅใๅฎ้ใซใใชใฌใผใใๅๆนใในใฎๆฐใซใคใใฆใฏใ`batch_size` ใๆ้ฉๅใงใใพใใ | |
| ๅ ฅๅใจใฏ็ฌ็ซใใฆใๅใฎใปใฏใทใงใณใฎๆณจๆไบ้ ใๅผใ็ถใ้ฉ็จใใใพใใ | |
| ## Pipeline custom code | |
| ็นๅฎใฎใใคใใฉใคใณใใชใผใใผใฉใคใใใๅ ดๅใ | |
| ็ฎใฎๅใฎใฟในใฏใซ้ขใใๅ้กใไฝๆใใใใจใ่บ่บใใชใใงใใ ใใใใใคใใฉใคใณใฎ็ฎๆจใฏใไฝฟใใใใใใปใจใใฉใฎใฆใผใถใผใใตใใผใใใใใจใงใใ | |
| ใใใใฃใฆใ`transformers`ใใใชใใฎใฆใผในใฑใผในใใตใใผใใใๅฏ่ฝๆงใใใใพใใ | |
| ๅ็ดใซ่ฉฆใใฆใฟใใๅ ดๅใฏใๆฌกใฎใใจใใงใใพใใ | |
| - ้ธๆใใใใคใใฉใคใณใใตใใฏใฉในๅใใพใ | |
| ```python | |
| class MyPipeline(TextClassificationPipeline): | |
| def postprocess(): | |
| # Your code goes here | |
| scores = scores * 100 | |
| # And here | |
| my_pipeline = MyPipeline(model=model, tokenizer=tokenizer, ...) | |
| # or if you use *pipeline* function, then: | |
| my_pipeline = pipeline(model="xxxx", pipeline_class=MyPipeline) | |
| ``` | |
| ใใใซใใใๅฟ ่ฆใชใซในใฟใ ใณใผใใใในใฆๅฎ่กใงใใใใใซใชใใพใใ | |
| ## Implementing a pipeline | |
| [Implementing a new pipeline](../add_new_pipeline) | |
| ## Audio | |
| ใชใผใใฃใช ใฟในใฏใซไฝฟ็จใงใใใใคใใฉใคใณใซใฏๆฌกใฎใใฎใใใใพใใ | |
| ### AudioClassificationPipeline | |
| [[autodoc]] AudioClassificationPipeline | |
| - __call__ | |
| - all | |
| ### AutomaticSpeechRecognitionPipeline | |
| [[autodoc]] AutomaticSpeechRecognitionPipeline | |
| - __call__ | |
| - all | |
| ### TextToAudioPipeline | |
| [[autodoc]] TextToAudioPipeline | |
| - __call__ | |
| - all | |
| ### ZeroShotAudioClassificationPipeline | |
| [[autodoc]] ZeroShotAudioClassificationPipeline | |
| - __call__ | |
| - all | |
| ## Computer vision | |
| ใณใณใใฅใผใฟใผ ใใธใงใณ ใฟในใฏใซไฝฟ็จใงใใใใคใใฉใคใณใซใฏๆฌกใฎใใฎใใใใพใใ | |
| ### DepthEstimationPipeline | |
| [[autodoc]] DepthEstimationPipeline | |
| - __call__ | |
| - all | |
| ### ImageClassificationPipeline | |
| [[autodoc]] ImageClassificationPipeline | |
| - __call__ | |
| - all | |
| ### ImageSegmentationPipeline | |
| [[autodoc]] ImageSegmentationPipeline | |
| - __call__ | |
| - all | |
| ### ImageToImagePipeline | |
| [[autodoc]] ImageToImagePipeline | |
| - __call__ | |
| - all | |
| ### ObjectDetectionPipeline | |
| [[autodoc]] ObjectDetectionPipeline | |
| - __call__ | |
| - all | |
| ### VideoClassificationPipeline | |
| [[autodoc]] VideoClassificationPipeline | |
| - __call__ | |
| - all | |
| ### ZeroShotImageClassificationPipeline | |
| [[autodoc]] ZeroShotImageClassificationPipeline | |
| - __call__ | |
| - all | |
| ### ZeroShotObjectDetectionPipeline | |
| [[autodoc]] ZeroShotObjectDetectionPipeline | |
| - __call__ | |
| - all | |
| ## Natural Language Processing | |
| ่ช็ถ่จ่ชๅฆ็ใฟในใฏใซไฝฟ็จใงใใใใคใใฉใคใณใซใฏๆฌกใฎใใฎใใใใพใใ | |
| ### FillMaskPipeline | |
| [[autodoc]] FillMaskPipeline | |
| - __call__ | |
| - all | |
| ### NerPipeline | |
| [[autodoc]] NerPipeline | |
| ่ฉณ็ดฐใซใคใใฆใฏใ[`TokenClassificationPipeline`] ใๅ็ งใใฆใใ ใใใ | |
| ### QuestionAnsweringPipeline | |
| [[autodoc]] QuestionAnsweringPipeline | |
| - __call__ | |
| - all | |
| ### SummarizationPipeline | |
| [[autodoc]] SummarizationPipeline | |
| - __call__ | |
| - all | |
| ### TableQuestionAnsweringPipeline | |
| [[autodoc]] TableQuestionAnsweringPipeline | |
| - __call__ | |
| ### TextClassificationPipeline | |
| [[autodoc]] TextClassificationPipeline | |
| - __call__ | |
| - all | |
| ### TextGenerationPipeline | |
| [[autodoc]] TextGenerationPipeline | |
| - __call__ | |
| - all | |
| ### Text2TextGenerationPipeline | |
| [[autodoc]] Text2TextGenerationPipeline | |
| - __call__ | |
| - all | |
| ### TokenClassificationPipeline | |
| [[autodoc]] TokenClassificationPipeline | |
| - __call__ | |
| - all | |
| ### TranslationPipeline | |
| [[autodoc]] TranslationPipeline | |
| - __call__ | |
| - all | |
| ### ZeroShotClassificationPipeline | |
| [[autodoc]] ZeroShotClassificationPipeline | |
| - __call__ | |
| - all | |
| ## Multimodal | |
| ใใซใใขใผใใซ ใฟในใฏใซไฝฟ็จใงใใใใคใใฉใคใณใซใฏๆฌกใฎใใฎใใใใพใใ | |
| ### DocumentQuestionAnsweringPipeline | |
| [[autodoc]] DocumentQuestionAnsweringPipeline | |
| - __call__ | |
| - all | |
| ### FeatureExtractionPipeline | |
| [[autodoc]] FeatureExtractionPipeline | |
| - __call__ | |
| - all | |
| ### ImageFeatureExtractionPipeline | |
| [[autodoc]] ImageFeatureExtractionPipeline | |
| - __call__ | |
| - all | |
| ### ImageToTextPipeline | |
| [[autodoc]] ImageToTextPipeline | |
| - __call__ | |
| - all | |
| ### ImageTextToTextPipeline | |
| [[autodoc]] ImageTextToTextPipeline | |
| - __call__ | |
| - all | |
| ### VisualQuestionAnsweringPipeline | |
| [[autodoc]] VisualQuestionAnsweringPipeline | |
| - __call__ | |
| - all | |
| ## Parent class: `Pipeline` | |
| [[autodoc]] Pipeline | |