LangChain 0.0.349
langchain_community.document_loaders.image_captions
Load image captions.
By default, the loader utilizes the pre-trained Salesforce BLIP image captioning model. https://huggingface.co/Salesforce/blip-image-captioning-base
Initialize with a list of image data (bytes) or file paths
images – Either a single image or a list of images. Accepts image data (bytes) or file paths to images.
blip_processor – The name of the pre-trained BLIP processor.
blip_model – The name of the pre-trained BLIP model.
Methods
__init__(images[, blip_processor, blip_model])
__init__
lazy_load()
lazy_load
A lazy loader for Documents.
load()
load
Load from a list of image data or file paths
load_and_split([text_splitter])
load_and_split
Load Documents and split into chunks.
Load Documents and split into chunks. Chunks are returned as Documents.
text_splitter – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
List of Documents.
Image captions