Roboflow Docs
DashboardResourcesProducts
  • Product Documentation
  • Developer Reference
  • Changelog
  • Roboflow Documentation
  • Quickstart
  • Workspaces
    • Workspaces, Projects, and Models
    • Create a Workspace
    • Rename a Workspace
    • Delete a Workspace
  • Team Members
    • Invite a Team Member
    • Role-Based Access Control (RBAC)
    • Change a Team Member Role
    • Remove a Team Member
  • Single Sign On (SSO)
  • Workflows
    • What is Workflows?
    • Create a Workflow
    • Build a Workflow
    • Test a Workflow
    • Deploy a Workflow
    • Workflow Examples
      • Multimodal Model Workflow
    • Share a Workflow
    • Workflows AI Assistant
  • Enterprise Integrations
  • Workflow Blocks
    • Run a Model
      • Object Detection Model
      • Single-Label Classification Model
    • Visualize Predictions
      • Bounding Box Visualization
      • Label Visualization
      • Circle Visualization
      • Background Color Visualization
      • Classification Label Visualization
      • Crop Visualization
  • Dataset Management
    • Create a Project
    • Upload Images, Videos, and Annotations
      • Import Data from Cloud Providers
        • AWS S3 Bucket
        • Azure Blob Storage
        • Google Cloud Storage
      • Import from Roboflow Universe
    • Manage Datasets
      • Dataset Batches
      • Search a Dataset
      • Set Dataset Classes
      • Add Tags to Images
      • Create an Annotation Attribute
      • Download an Image
      • Delete an Image
    • Dataset Versions
      • Create a Dataset Version
      • Preprocess Images
      • Augment Images
      • Delete a Version
      • Export a Dataset Version
    • Dataset Analytics
    • Merge Projects
    • Rename a Project
    • Delete a Project
    • Project Folders
    • Make a Project Public
  • Annotate
    • Introduction to Roboflow Annotate
    • Annotate an Image
      • Keyboard Shortcuts
      • Comment on an Image
      • Annotation History
      • Similarity Search
    • AI Labeling
      • Label Assist
      • Enhanced Smart Polygon with SAM
        • Smart Polygon (Legacy)
      • Box Prompting
      • Auto Label
    • Set Keypoint Skeletons
    • Annotate Keypoints
    • Annotate Multimodal Data
    • Collaborate on Labeling
    • Annotation Insights
  • Managed Labeling
  • Train
    • Train a Model
      • Train from a Universe Checkpoint
      • Train from Azure Vision
      • Train from Google Cloud
    • Roboflow Instant
    • Cancel a Training Job
    • Stop Training Early
    • View Training Results
    • View Trained Models
    • Evaluate Trained Models
  • Download a Dataset Version
  • Deploy
    • Deploy a Model or Workflow
    • Managed Deployments
    • Serverless Hosted API V2
      • Use in a Workflow
      • Use with the REST API
      • Run an Instant Model
    • Serverless Hosted API
      • Object Detection
      • Classification
      • Instance Segmentation
        • Semantic Segmentation
      • Keypoint Detection
      • Foundation Models
        • CLIP
        • OCR
        • YOLO-World
      • Video Inference
        • Use a Fine-Tuned Model
        • Use CLIP
        • Use Gaze Detection
        • API Reference
        • Video Inference JSON Output Format
      • Pre-Trained Model APIs
        • Blur People API
        • OCR API
        • Logistics API
        • Image Tagging API
        • People Detection API
        • Fish Detection API
        • Bird Detection API
        • PPE Detection API
        • Barcode Detection API
        • License Plate Detection API
        • Ceramic Defect Detection API
        • Metal Defect Detection API
    • Dedicated Deployments
      • Create a Dedicated Deployment
      • Make Requests to a Dedicated Deployment
      • Manage Dedicated Deployments with an API
    • Batch Processing
    • SDKs
      • Python inference-sdk
      • Web Browser
        • inferencejs Reference
        • inferencejs Requirements
      • Lens Studio
        • Changelog - Lens Studio
      • Luxonis OAK
    • Upload Custom Model Weights
    • Download Model Weights
    • Enterprise Deployment
      • License Server
      • Offline Mode
      • Kubernetes
      • Docker Compose
    • Monitor Deployed Models
      • Alerting
  • Universe
    • What is Roboflow Universe?
    • Find a Dataset on Universe
    • Explore Images in a Universe Dataset
    • Fork a Universe Dataset
    • Find a Model on Universe
    • Download a Universe Dataset
  • Set a Project Description
  • View Project Analytics
  • Support
    • Share a Workspace with Support
    • Delete Your Roboflow Account
    • Apply for Academic Credits
  • Billing
    • Premium Trial
    • Credits
      • View Credit Usage
      • Enable or Disable Flex Billing
      • Purchase Prepaid Credits
    • Plans
      • Purchase a Plan
      • Cancel a Plan
      • Update Billing Details
      • Update Payment Method
      • View Invoices
Powered by GitBook
On this page
  • About this block
  • What you can send into this block
  • What this block returns
  • How to configure the block
  • Use cases
  • Predictions format

Was this helpful?

  1. Workflow Blocks
  2. Run a Model

Single-Label Classification Model

Run a single-label classification model in a Workflow.

PreviousObject Detection ModelNextVisualize Predictions

Last updated 6 hours ago

Was this helpful?

About this block

The Single-Label Classification Model block lets you run a single-label classification model trained on or uploaded to Roboflow.

Single-label classification models return a category for an image. For example, you could use this block to:

  1. Identify what defect is present in an image

  2. Sort images into one or more categories

  3. Identify the type of product in an image

You can run private models stored in your Workspace, or public models on Roboflow Universe.

What you can send into this block

You can run the Object Detection Model block on:

  1. An image that you send to your Workflow

  2. A video frame that you send to your Workflow

  3. A cropped region of an image that is calculated in your Workflow (i.e. with a Crop block)

What this block returns

The Single-Label Classification Model block returns the class your model thinks most closely represents the contents of the image. The block also returns a confidence value showing how confident the model thinks it is in its result.

To see the results from your classification model plotted on an image, you need to use a Visualizer block. You may want to use the:

  • Classification Label Visualization block: Show labels from a classification model on an image.

Here is an example showing the results from a single-label classification model with a Classification label Visualization:

How to configure the block

When you set up this block, you will be asked to choose a model from your Workspace:

To use a model in your Workspace, choose from the list of Your Models.

To use a Universe model, navigate to the Public Models tab, then paste in the Universe Model ID for the model you want to use.

You can then configure the block using the options available in the Workflows editor.

Use cases

This block is useful for any Workflow that involves running a classification model.

If you need a zero-shot classification model, you may be interested in using CLIP, or trying a multimodal model like Claude.

Predictions format

Expand the card below to see the JSON data returned by this block.

Predictions format

Predictions are returned in the following format:

[
    "model_predictions": {
      "inference_id": "866010bb-e432-4b9c-9b95-35d87f0ffafa",
      "time": 0.28171608800039394,
      "image": {
        "width": 960,
        "height": 1280
      },
      "predictions": [
        {
          "class": "loose-straw",
          "class_id": 4,
          "confidence": 0.5229
        }
      ],
      "top": "loose-straw",
      "confidence": 0.5229,
      "prediction_type": "classification",
      "parent_id": "image",
      "root_parent_id": "image"
    }
  }
]

You can also specify the ID of any model found on Universe.

Learn how to find a model on Universe.
The Single-Label Classification Model block.
The label "loose-straw" appears in the top left corner of the image.