HubCloneHubClone
Tasks

Image Classification

Image classification assigns a label or class to an entire image.

Inputs

Input
A photo of a red fox in fresh snow

Image Classification Model

Output

Output
  • red fox0.94
  • kit fox0.04
  • coyote0.01

About Image Classification

Image classification assigns a label or class to an entire image. Browse image classification models on HubClone to compare checkpoints, or open a Space to try one in the browser.

Use Cases

Visual inspection

Detect defective parts on a production line.

Photo organization

Tag personal photos by what they show.

Inference

The Transformers pipeline API runs image classification models in a few lines. Replace <model-id> with any model listed on this page.

from transformers import pipeline

pipe = pipeline("image-classification", model="<model-id>")
pipe("fox.png")

Useful Resources

Want to dig deeper into the topic? Great! Here is a hand-picked list of resources we found helpful.

Documentation

  • Image Classification task guide
  • Pipelines reference

Notebooks

  • Fine-tuning a image classification model