langchain_community.document_loaders.image_captions
ImageCaptionLoader
ImageCaptionLoader.__init__()
ImageCaptionLoader.alazy_load()
ImageCaptionLoader.lazy_load()
ImageCaptionLoader.load()
ImageCaptionLoader.load_and_split()
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 (Union[str, bytes, List[Union[str, bytes]]]) – Either a single image or a list of images. Accepts image data (bytes) or file paths to images.
blip_processor (str) – The name of the pre-trained BLIP processor.
blip_model (str) – The name of the pre-trained BLIP model.
Methods
__init__(images[, blip_processor, blip_model])
__init__
alazy_load()
alazy_load
A lazy loader for Documents.
lazy_load()
lazy_load
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.
AsyncIterator[Document]
Iterator[Document]
List[Document]
Load Documents and split into chunks. Chunks are returned as Documents.
Do not override this method. It should be considered to be deprecated!
text_splitter (Optional[TextSplitter]) – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
List of Documents.
Image captions