# ImageCaptionLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/image_captions/ImageCaptionLoader)

Load image captions.

By default, the loader utilizes the pre-trained
Salesforce BLIP image captioning model.
https://huggingface.co/Salesforce/blip-image-captioning-base

## Signature

```python
ImageCaptionLoader(
    self,
    images: Union[str, Path, bytes, List[Union[str, bytes, Path]]],
    blip_processor: str = 'Salesforce/blip-image-captioning-base',
    blip_model: str = 'Salesforce/blip-image-captioning-base',
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `images` | `Union[str, Path, bytes, List[Union[str, bytes, Path]]]` | Yes | Either a single image or a list of images. Accepts     image data (bytes) or file paths to images. |
| `blip_processor` | `str` | No | The name of the pre-trained BLIP processor. (default: `'Salesforce/blip-image-captioning-base'`) |
| `blip_model` | `str` | No | The name of the pre-trained BLIP model. (default: `'Salesforce/blip-image-captioning-base'`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    images: Union[str, Path, bytes, List[Union[str, bytes, Path]]],
    blip_processor: str = 'Salesforce/blip-image-captioning-base',
    blip_model: str = 'Salesforce/blip-image-captioning-base',
)
```

| Name | Type |
|------|------|
| `images` | `Union[str, Path, bytes, List[Union[str, bytes, Path]]]` |
| `blip_processor` | `str` |
| `blip_model` | `str` |


## Properties

- `images`
- `blip_processor`
- `blip_model`

## Methods

- [`load()`](https://reference.langchain.com/python/langchain-community/document_loaders/image_captions/ImageCaptionLoader/load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/document_loaders/image_captions.py#L11)