Roboflow Docs
ResourcesProductsSign InBook a DemoGet Started
  • Product Documentation
  • Developer Reference
  • Changelog
  • Developer Tools
  • Authentication
    • Find Your Roboflow API Key
    • Scoped API Keys
    • Workspace and Project IDs
  • Command Line Interface (CLI)
    • Using the CLI
    • Install and Set Up the CLI
    • List Workspaces and Projects
    • Download a Dataset
    • Upload a Dataset
    • Run a Model on an Image
  • REST API
    • Using the REST API
    • Authenticate with the REST API
    • List Workspaces and Projects
  • Search Images in a Dataset
  • Create a Project
  • Get a Project and List Versions
  • Manage Project Folders
  • List Image Batches
  • Create and List Annotation Jobs
  • Manage Images
    • Upload an Image
    • Get Details About an Image
    • Delete an Image from a Dataset
    • Upload an Annotation
    • Search for an Image
    • List, Add, and Remove Image Tags
  • Versions
    • View a Version
  • Export Data
  • Annotation Insights
    • Annotation Insights (Legacy Endpoint)
  • Model Monitoring
    • Retrieve Statistics About Deployed Models in a Workspace
    • Attach Metadata to an Inference
  • Python SDK
    • Using the Python SDK
  • Authenticate with the Python SDK
  • List Workspaces
  • List Projects and Versions
  • Create a Project
  • Create a Dataset Version
  • Train a Model
  • Upload a Dataset
  • Search for an Image
  • iOS SDK
    • Using the iOS SDK
Powered by GitBook
On this page

Was this helpful?

  1. Command Line Interface (CLI)

Run a Model on an Image

PreviousUpload a DatasetNextUsing the REST API

Last updated 21 days ago

Was this helpful?

You can use the roboflow CLI to run a model trained on Roboflow, or with open source models available on .

By running roboflow infer in the command line, the Roboflow CLI will be sending images to the Roboflow API and print the results (predictions) in JSON format.

Let's look at an example using an open source model from Roboflow Universe. This is the dataset - an open source Roboflow project that has a trained model capable of identifying poker cards.

From the URL in the browser:

  • workspaceId="roboflow-100"

  • projectId="poker-cards-cxcvz"

  • version=1

Then if you have a local file with a card image you can run a command like

roboflow infer -c .70 -w roboflow-100 -m poker-cards-cxcvz/1 ~/Downloads/ace.jpg

And it's the same thing if you want to run inference with your own models. Just specify the workspace/project/version for a model that your user has access to.

See all the supported parameters with roboflow infer --help

Roboflow Universe
poker-cards