ViT Base Patch16 224

VIT_BASE_PATCH16_224

Classifies an image into the 1,000 ImageNet categories, such as animals, vehicles, food and everyday objects, with a confidence score for each. A strong base for training your own classifier.

Vision & Analysisimage-classificationimagenetvittransfer-learningapache-2.0Fine-tunable
ViT Base Patch16 224: Vision & Analysis model on Kainguru

About ViT Base Patch16 224

Capabilities

  • 1,000 ImageNet classes — the most likely labels first, each with a confidence score
  • Your own labels — fine-tune it on your labelled images; it learns your label set
  • Full or LoRA fine-tuning — train every weight, or small adapters plus the label head

Good to know

  • Its labels are ImageNet's, some with several names in one label ("tabby, tabby cat").
  • The model sees the image resized to 224x224 pixels.
  • Images must be PNG, JPEG or WebP, at most 50 megapixels and 20 MB; larger images are refused.
  • A fine-tuning dataset is 4 to 1,000 labelled images with at least 2 different labels, each PNG, JPEG or WebP of at most 50 megapixels and 20 MB, and 4 GB in all.

ViT Base Patch16 224 inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—The image to classify: PNG, JPEG or WebP, at most 50 megapixels and 20 MB.
1–2048 characters · image/png, jpeg, webp
top_kintegerNo5How many of the most likely labels to return.
1–10

Output. JSON: [{"label": "...", "score": 0.97}, ...], the most likely label first.

Run ViT Base Patch16 224 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=VIT_BASE_PATCH16_224" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": "https://example.com/input.png",
    "top_k": 5
  },
  "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(
        "VIT_BASE_PATCH16_224",
        {
          "image": "https://example.com/input.png",
          "top_k": 5
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune ViT Base Patch16 224

You can fine-tune ViT Base Patch16 224 on your own data and run the tuned model through the same API. Dataset: Your images, each with its label: {file, text} items, text being the label (at most 100 characters). PNG, JPEG or WebP, at most 50 megapixels and 20 MB each; at least 4 images and 2 different labels. New labels are fine: the model learns your label set.

The steps are in the docs.

ViT Base Patch16 224 pricing

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

Licence and source

NSFW Image Detection: Vision & Analysis model on Kainguru
Vision & Analysis

NSFW Image Detection

Tells whether an image is safe for work or explicit (NSFW), with a confidence score for each.

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
Granite Vision 3.3 2B: Vision & Analysis model on Kainguru
Vision & Analysis

Granite Vision 3.3 2B

IBM Granite Vision 3.3 2B reads documents in pictures: it answers questions about tables, charts, infographics, forms…

Fine-tunable
Grounding DINO Base: Vision & Analysis model on Kainguru
Vision & Analysis

Grounding DINO Base

Finds the things you name in a picture, such as "red car, person with a helmet", and returns a box around each one.

Fine-tunable