How to Auto-Label Images from Class Names with Ultralytics VLM
Auto-label images from class names with Ultralytics VLM. Test representative images, review and correct the boxes, and train an Ultralytics YOLO26 model.
Glenn Jocher7 min readListen to this article

Upload representative images to Ultralytics Platform, name the objects you want to find, and let Ultralytics VLM draw your first set of boxes. With Ultralytics VLM1, you can test classes on individual images, scale to a dataset in Batch Annotation, and review the results before you train Ultralytics YOLO26. You can see the first detections without collecting labeled training examples.
It covers object detection, where each label is a bounding box and a class. For background on why labeled data matters, see our data labeling glossary entry.
What you need before you start#
- Images in a common format such as JPEG or PNG, uploaded as files or a ZIP.
- A class list. Use 1–200 clear class names or descriptions on a detection dataset. Start with recognizable phrases such as “forklift” or “person in a high-vis vest.” Replace internal codes like
cls_3with names the model can interpret. - An Ultralytics Platform account. Both VLM1 sizes run on Platform without a third-party provider key.
Step 1: Create a detection dataset and add your classes#
- In Platform, open Annotate and click New Dataset.
- Choose the detect task and set visibility to Private before creating the dataset or uploading sensitive images.
- Upload your images or ZIP.
- In the Classes tab, add each class name.
Step 2: Test Ultralytics VLM on a few images first#
Before labeling thousands of images, check that the model sees your objects the way you do.
- Open an image and switch to Smart mode (
S). - Start with VLM1 2B, the default on supported detection datasets. To test the higher-accuracy variant, open the model picker and select VLM1 4B under Ultralytics.
- Press Predict (
P). Review the editable boxes returned for the classes the model finds. - Repeat on five to ten images that cover your hardest cases: small or distant objects, crowded scenes, poor lighting.
Class-prompted models return boxes without confidence scores, so review the results visually. If the model misses objects or draws loose boxes, try a clearer class name and compare both sizes on the same images. On the December 2, 2026 Ultralytics VLM Leaderboard, 2B took 0.31 s per image at the median and scored 0.435 mAP50. The 4B variant took 0.39 s and scored 0.460. Use those results to choose what to test first.
Step 3: Auto-label the dataset#
- On the dataset page, open More actions → Batch Annotation.
- Confirm the selected model. The dialog can reuse your last Smart mode model. Choose VLM1 2B for a faster first pass or select VLM1 4B under Ultralytics to test the higher-accuracy option.
- Inspect the sample predictions. Leave Include annotated images off to process only unlabeled images, then select Start.
- Review the run summary and open representative images before moving on to training.
Batch Annotation preserves existing labels. Where dataset versioning is supported, Platform saves a version before the run so you can restore it if needed.

The launch example uses “empty shelf space” as a class description. Test the wording on your own images before running a batch.
Step 4: Review and correct the boxes#
Auto-labels are a first draft. Review and validation help determine whether the corrected labels are suitable for training.
- Add what the model missed. Switch to Draw mode for single boxes, or use a SAM model in Smart mode to click an object.
- Delete or fix wrong boxes. Select a box to change its class or resize it.
- Label look-alikes faster. Select a few correct labels and use Annotate similar to find more objects that look like them.
Include a random sample across every class and split, plus difficult scenes and images with no predictions. Inspect images left unlabeled whenever they might contain target objects. YOLO can learn from images with no label file as background, so correct missed objects before training. Human-in-the-loop review helps catch labeling errors before training.
Optional: export the labels in YOLO format#
If you train elsewhere, download the reviewed labels. Platform exports a dataset as an Ultralytics NDJSON file: one line of dataset metadata, then one line per image with its split and its boxes in normalized class x_center y_center width height form. The file links to the images rather than containing them.
To get YOLO folders (images/ and labels/ with one .txt file per image), convert the file locally with the ultralytics package:
import asyncio
from ultralytics.data.converter import convert_ndjson_to_yolo
yaml_path = asyncio.run(convert_ndjson_to_yolo("my-dataset.ndjson", output_path="datasets"))Image links in the export are signed and stay valid for at least a day after download, so convert soon after exporting. The dataset export docs cover the format in full. If you train with the Python package, you can skip this step: pass the NDJSON file or the dataset's ul:// URI straight to model.train(data=...) and Ultralytics builds the folders for you.
Step 5: Train an Ultralytics YOLO26 model on the reviewed labels#
Use Ultralytics VLM to create initial labels, then train Ultralytics YOLO26 when your deployment calls for a detector trained on fixed classes.
- Check that training and validation splits contain suitable images. Keep related frames or near-duplicates together, and manually review validation labels before using them to judge model quality.
- From the dataset page, start a cloud training run with an Ultralytics YOLO26 model, or train anywhere with the Python package and the dataset's
ul://URI:
from ultralytics import YOLO
# Requires ULTRALYTICS_API_KEY in your environment for dataset access
model = YOLO("yolo26n.pt")
model.train(data="ul://username/datasets/my-dataset", epochs=100, imgsz=640)- Export the trained model to ONNX, TensorRT, Core ML or another format, and deploy it on your own hardware or in the cloud.
Measure the trained model's accuracy and latency on your target hardware before deployment.
Who this workflow suits#
It suits teams starting a new detector without a labeled dataset, adding a new class or site to an existing one, or replacing slow manual labeling with a review pass. It works best on objects a general model can recognize from a name or short description.
It is less suited to highly specialized imagery, such as some medical, X-ray or PCB datasets, where general models miss more objects. There, label a seed set by hand, train YOLO on it, and use that model for the next pass.
Explore Ultralytics VLM or read the Ultralytics VLM launch announcement for more examples of class-prompted detection.
Frequently asked questions
Yes. Use Batch Annotation with VLM1 2B or 4B if you can edit the dataset and the detection dataset has 1–200 classes and images with up to three channels. Test representative images before starting. Review a sample across your classes and inspect images with no predictions after the run.
Smart Annotation runs Ultralytics VLM1 from the class names saved in your detection dataset. You can edit and save the resulting boxes in the same editor.
Export the dataset from Platform as NDJSON, then convert it with
convert_ndjson_to_yolofrom theultralyticspackage to get YOLOimages/andlabels/folders. The dataset export docs show the full format.Yes. Review catches missed objects, extra boxes and wrong classes before they reach training. Our guide to precision and recall for auto-annotation shows where to focus review effort.
Review a random sample per class, fix the errors, then train and validate a YOLO model on a held-out set you labeled or reviewed by hand. If validation is weak on a class, review more of that class before retraining.
Written by
Comments
Ask a question, share your results, or help someone else.





























