Skip to content

YOLOv11 - Classification

YOLOv11 is the latest iteration in the YOLO series developed by Ultralytics. The classification variant provides state-of-the-art performance for image classification tasks.

Overview

YOLOv11 for classification represents the cutting edge of real-time image classification. Key features include:

  • Enhanced architecture - Improved backbone design for better feature extraction
  • Superior accuracy - Better performance than YOLOv8 on classification tasks
  • Fast inference - Optimized for real-time applications
  • Efficient design - Optimized for speed and accuracy
  • Multiple model sizes - From nano to extra-large variants

License

AGPL-3.0

Commercial Licensing

  • AGPL-3.0: Free for open-source projects. Requires derivative works to be open-sourced.
  • Paid Roboflow customers: Automatically get access to use any YOLOv11 models trained on or uploaded to the Roboflow platform for commercial use.
  • Free Roboflow customers: Can use YOLOv11 via the serverless hosted API, or commercially self-hosted with a paid plan.

Learn more: Roboflow Licensing | YOLOv11 License Details

Pre-trained Model IDs

YOLOv11 classification models must be trained on Roboflow or uploaded as custom weights. There are no pre-trained public model IDs available.

Custom model ID format: project-url/version (e.g., my-project-abc123/2)

Supported Backends

Backend Extras Required
onnx onnx-cpu, onnx-cu12, onnx-cu118, onnx-jp6-cu126
torch-script torch-cpu, torch-cu118, torch-cu124, torch-cu126, torch-cu128, torch-jp6-cu126
trt trt10

Roboflow Platform Compatibility

Feature Supported
Training ✅ Train custom models on Roboflow
Upload Weights ✅ Upload pre-trained weights (guide)
Serverless API (v2) Deploy via hosted API
Workflows ✅ Use in Workflows via Classification block
Edge Deployment (Jetson) ✅ Deploy on NVIDIA Jetson devices
Self-Hosting ✅ Deploy with inference-models

Installation

Install with one of the following extras depending on your backend:

  • ONNX: onnx-cpu, onnx-cu12
  • TensorRT: trt10 (requires CUDA 12.x)
  • TorchScript: torch-cpu, torch-cu118, torch-cu124, torch-cu126, torch-cu128, torch-jp6-cu126

Usage Example

import cv2
from inference_models import AutoModel

# Load your custom model (requires Roboflow API key)
model = AutoModel.from_pretrained(
    "my-project-abc123/2",
    api_key="your_roboflow_api_key"
)
image = cv2.imread("path/to/image.jpg")

# Run inference
prediction = model(image)

# Get top prediction
top_class_id = prediction.class_id[0].item()
top_class = model.class_names[top_class_id]
confidence = prediction.confidence[0][top_class_id].item()

print(f"Class: {top_class}")
print(f"Confidence: {confidence:.2f}")