BLIP Image Captioning Large

BLIP_IMAGE_CAPTIONING_LARGE

Writes a short English caption for a photo, and can finish a caption you start.

Vision & Analysisimage-captioningblipbsd-3-clauseFine-tunable
BLIP Image Captioning Large: Vision & Analysis model on Kainguru

About BLIP Image Captioning Large

Good to know

  • Write the fine-tuning manifest after uploading the images: each "file" is the URL or name its upload returned (such as 0192f3c4-7e1a-7c2b-9d5e-1f2a3b4c5d6e.png), never the name the image had on your computer.

Attribution

BLIP by Salesforce Research. Copyright (c) 2022, Salesforce.com, Inc. All rights reserved. Released under the BSD 3-Clause License.

BLIP Image Captioning Large inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—The picture: JPEG, PNG or WebP, up to 20 MB and 50 megapixels.
Max 2048 characters · image/jpeg, png, webp
questiontextNo—A question about the image. Question-answering models need one; BLIP-2 answers it, or writes a caption when it is empty; captioning models take it as the start of the caption and finish it, e.g. "a photograph of".
Max 512 characters
max_new_tokensintegerNo40Longest caption or answer, in tokens (a token is about three quarters of a word).
1–128

Output. The caption, or the answer to the question, as plain text.

Run BLIP Image Captioning Large with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=BLIP_IMAGE_CAPTIONING_LARGE" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": "https://example.com/input.png",
    "max_new_tokens": 40
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "BLIP_IMAGE_CAPTIONING_LARGE",
        {
          "image": "https://example.com/input.png",
          "max_new_tokens": 40
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune BLIP Image Captioning Large

You can fine-tune BLIP Image Captioning Large on your own data and run the tuned model through the same API. Dataset: Images plus a JSONL manifest, one {"file", "text"} per line: file as its upload returned it, text the caption or answer (up to 500 characters). Question answering needs "question" on each line; BLIP-2 takes it, captioning refuses it. 4 to 10000 lines.

The steps are in the docs.

BLIP Image Captioning Large pricing

Price per request: 0.0209 credits ($0.000209). The price is shown again before every run; all prices are on the pricing page.

Licence and source

BLIP VQA Base: Vision & Analysis model on Kainguru
Vision & Analysis

BLIP VQA Base

Answers short questions about a photo, such as what colour the car is or how many people are in it.

Fine-tunable
BLIP2 Flan T5 XL: Vision & Analysis model on Kainguru
Vision & Analysis

BLIP2 Flan T5 XL

Describes a photo in a sentence or answers a question about it in plain English.

Fine-tunable
Florence-2 Large: Vision & Analysis model on Kainguru
Vision & Analysis

Florence-2 Large

One small vision model that captions images, reads text, boxes objects and finds things named by a phrase.

Fine-tunable
Deplot: Vision & Analysis model on Kainguru
Vision & Analysis

Deplot

DePlot from Google reads a chart or plot image and returns the data table drawn in it.

Docling Layout Heron: Vision & Analysis model on Kainguru
Vision & Analysis

Docling Layout Heron

Finds the layout of a document page, such as text blocks, titles, section headers, tables, pictures, captions…

Fine-tunable
EasyOCR: Vision & Analysis model on Kainguru
Vision & Analysis

EasyOCR

EasyOCR finds the lines of text in a photo or a scan and reads each one, returning every line with its box and its…

Fine-tunable