Pseudo-labeling for object detection: when a teacher model's labels help and when they hurt
Unbiased Teacher reached 20.75 COCO mAP50-95 with 1% of images labeled, vs 9.05 supervised. When teacher labels help a detector and when they hurt.
Sergiu Waxmann15 min readListen to this article

Pseudo-labeling means training a model on labels that another model wrote. For object detection, a teacher model draws boxes on your unlabeled images, and a student detector trains on those boxes as if a person had drawn them. Done well, it stretches a small hand-labeled set across a much larger pool of images. Done carelessly, it can copy the teacher's mistakes into your dataset as ground truth, where the student learns them and later rounds can reinforce them.
The short answer to "does it work?": it tends to help when the teacher is accurate on your kind of images, when you choose its settings from measurements, and when its labels are reviewed or filtered before training. The only way to know is to train the same student with and without the pseudo-labels and compare. This guide explains how pseudo-labeling works, the evidence for when it pays off, the failure modes to watch for, and how to run it with Ultralytics YOLO and Ultralytics Platform.
Pseudo-labeling turns a teacher's predictions into training data#
Pseudo-labeling, also called self-training, is one of the main families of semi-supervised learning methods: training on a small labeled set plus a much larger unlabeled one. The loop has four steps:
- Train a teacher on the images you have already labeled, or start from a model that already knows your classes.
- Run the teacher on the unlabeled pool. For a teacher that returns scores, keep predictions above a confidence threshold.
- Save the kept predictions as label files, the pseudo-labels.
- Train a student on real and pseudo-labels together. The student can then become the next teacher.
In this workflow, each object detection pseudo-label is a hard label: one class and one bounding box per object, in the same format as a hand-drawn one. Any detector that trains on ordinary labels trains on pseudo-labels too. It also means nothing in the file says which boxes a person checked and which a model guessed.
The teacher does not have to be a detector you trained. A large pretrained YOLO26 model can label common classes, and vision language models can label objects from class names alone, which is how class-prompted auto-annotation works.
Pseudo-labeling is not the same as knowledge distillation#
Both use a teacher and a student, and the terms are often mixed up. Knowledge distillation trains a student to match the teacher's outputs or internal features, usually to compress a large model into a small one. Pseudo-labeling uses the teacher to create more labeled data. The two can be combined: label the pool with a teacher, then distill that teacher into a small student while it trains on the result.
Pseudo-labels help most when the pool is large and the teacher knows the domain#
The research case for pseudo-labeling is strong when its conditions hold. On ImageNet classification, Noisy Student raised top-1 accuracy to 88.4% by self-training on unlabeled images drawn from the roughly 300-million-image JFT dataset, filtered and balanced to 130 million training entries representing 81 million unique images. Its students were as large as or larger than their teachers, with noise added during training.
Detection is harder, because a teacher can be wrong about where an object is as well as what it is. The Unbiased Teacher method reports 20.75 mAP50-95 on MS-COCO with 1% of the training images labeled, against 9.05 for a supervised baseline on the same labels, both with a Faster R-CNN ResNet-50-FPN detector, and 6.8 mAP over the previous best semi-supervised method. Its authors name the core problem pseudo-labeling bias, and counter it with a teacher that updates gradually alongside the student and a class-balance loss that downweights overconfident pseudo-labels.
We use the same idea in our own models. Ultralytics YOLO26 depth models were pretrained on a mix of about 2.19 million images, and the largest source, about 58%, is the 1,281,167 ImageNet training images paired with depth maps predicted by Depth Anything 3 teacher models. ImageNet has no measured depth at all. Adding those pseudo-labels was decisive for indoor cross-domain generalization, and validation runs only on real ground-truth datasets, so the teacher never grades its own work.
Three conditions show up in these results:
- The unlabeled pool is much larger than the labeled set. Pseudo-labels add variety the seed set cannot.
- The teacher is strong on the target images. A teacher that already handles the domain passes on more right answers than wrong ones.
- Evaluation uses real labels only. Validation and test splits stay human-labeled, so you measure the student against truth, not against the teacher.
Pseudo-labels hurt when the teacher's mistakes become ground truth#
The central risk is confirmation bias. A wrong pseudo-label is trained on, the next model can predict that mistake with more confidence, and the mistake then survives the next threshold too. In detection, these errors come in four kinds:
- Missed objects become background. If the teacher finds nothing on an image, a YOLO label export writes no label file for it, and an image without a label file trains as a background image. The student learns that the objects the teacher missed are not objects.
- False boxes become objects. A reflection labeled as a defect, or a shadow labeled as a person, teaches the student to fire on the same thing.
- Look-alike classes swap. A teacher that confuses two classes writes that confusion into every image.
- Loose boxes stay loose. A teacher that habitually pads one edge of a box trains a student to do the same, which costs mAP at stricter IoU thresholds.
The Smart Annotation lesson in Ultralytics Academy names the symptom of training on unreviewed predictions: each retrain scores about the same, and the same objects are always missed, because the labeling model's systematic errors were saved as truth.
Domain gaps expose weak teachers#
A teacher that is excellent on everyday photos can be close to useless on your images. Our VLM Leaderboard measures this: it scores how well 55 models auto-annotate 360 images, 10 from each of 36 real-world detection datasets, prompted with each dataset's class names. Averaged over all 55 models, the spread between datasets is large:

Mean mAP50 over the 55 models on the VLM Leaderboard (updated December 2, 2026), 10 images per dataset: TBX11K chest X-rays, DeepPCB bare-board defects, IEDXray security X-rays, SKU110K dense retail shelves, Safe Human 17 PPE and UEC School Lunch food.
On DeepPCB bare-board defects, the average model scores 0.036 mAP50 and the best, GPT-6.1 Sol, reaches 0.783. On the Safe Human 17 PPE and UEC School Lunch datasets, the average model is above 0.65. Even a leading model can have a blind spot: GPT-6.1 Terra ranks third overall at 0.559 mAP50, yet scored 0.00 on IEDXray in our launch benchmark.

The DeepPCB dataset on Ultralytics Platform: bare-board defects such as opens, shorts and spurs, where the 55 leaderboard models average 0.036 mAP50.
So test before you trust. Label a sample of your own images by hand, run a class-prompted teacher and a YOLO teacher trained on your seed set over it, and use whichever needs fewer corrections.
The confidence threshold decides whether reviewers delete boxes or draw them#
For a teacher that returns confidence scores, such as a YOLO model, the threshold is the main dial. Set it too low and the pseudo-labels fill with false boxes; set it too high and the teacher's misses pile up as background. Class-prompted models in Platform return no scores, so compare their output against a labeled sample instead.
To choose the threshold, count on images that already have correct labels how many boxes a reviewer would have to delete and draw at each setting. The Academy lesson runs that sweep with a pretrained YOLO26n on the 128 labeled images of COCO128, matching each prediction to a same-class label at IoU 0.5 or more. "Edits" here counts unmatched boxes only, not adjustments to matched boxes or measured review time:
| Confidence | Correct boxes kept | False boxes to delete | Missed objects to draw | Edits per image |
|---|---|---|---|---|
| 0.10 | 590 | 490 | 339 | 6.5 |
| 0.25 | 468 | 138 | 461 | 4.7 |
| 0.40 | 386 | 58 | 543 | 4.7 |
| 0.50 | 328 | 35 | 601 | 5.0 |
| 0.70 | 230 | 6 | 699 | 5.5 |
Edits bottom out at 0.25 and 0.40 (599 and 601 edits, both rounding to 4.7 per image). Below that, false boxes explode; above it, misses do. At 0.25, a nano model still leaves about 3.6 objects per image to draw on COCO's long tail of small objects. COCO128 comes from COCO train2017, so this sweep illustrates the method rather than how a pretrained model generalizes; run it on your own labeled images and time a real review pass at the candidate thresholds.
Read the table with pseudo-labeling in mind. At 0.40, 543 labeled objects have no same-class match at IoU 0.5 or above; some carry a wrong-class or badly placed box, and the ones with no box at all train as background. A high threshold keeps boxes cleaner (6 false boxes at 0.70), but the objects it misses train as background and can teach the student to under-detect. Two rules follow:
- If misses dominate at every threshold, the teacher is too weak for the data. Use a larger model or train your own on a seed set.
- If false boxes dominate even at 0.5, inspect them. Look-alike classes, background objects and duplicate boxes need different fixes. The confusion matrix separates class swaps from background errors; open the images to spot duplicates.
The same trade-off appears in precision and recall for class-prompted teachers: low precision means deleting, low recall means drawing.
How to pseudo-label a detection dataset with Ultralytics#
You can run the loop in Python or entirely in Ultralytics Platform. Both start with a seed set of reviewed images, keep validation and test images human-labeled, and end with the comparison that tells you whether the pseudo-labels helped.
In Python: teacher, pseudo-labels, student#
First, train a YOLO26x teacher on your seed labels and write YOLO-format labels for the unlabeled pool:
from ultralytics import YOLO
# Train a teacher on the hand-labeled seed set
teacher = YOLO("yolo26x.pt")
teacher.train(data="seed.yaml", epochs=100, imgsz=640)
# Pseudo-label the unlabeled pool at the threshold your sweep chose
# save_txt=True writes one .txt per image with detections to the run's labels/ folder
teacher.predict(source="unlabeled/images", conf=0.4, save_txt=True)The predictions land in the predict run's labels/ folder, for example runs/detect/predict/labels/. Review them, then copy the images into your training split's images/train/ folder and the .txt files into the matching labels/train/ folder. Class IDs come from the teacher, so the student's dataset YAML must list the same classes in the same order. Open the images that got no label file: each one will train as background, so confirm it contains no objects.
Then train the same student twice, with the same settings, on the seed labels alone and on seed plus pseudo-labels:
from ultralytics import YOLO
# Baseline: seed labels only
YOLO("yolo26n.pt").train(data="seed.yaml", epochs=100, imgsz=640, name="baseline")
# Same student and settings, trained on seed + reviewed pseudo-labels
YOLO("yolo26n.pt").train(data="seed_plus_pseudo.yaml", epochs=100, imgsz=640, name="pseudo")Point both YAML files at the same human-labeled validation set and compare mAP and per-class recall. Choose thresholds on validation images and keep test images out of that choice. If the pseudo run does not beat the baseline, the extra labels are not helping under this setup; repeat with a second seed before ruling them out.
Distillation is a separate, optional experiment you can run once the pseudo-labels have proven themselves: pass the teacher's checkpoint path as distill_model when training the student. Feature-based knowledge distillation lifted YOLO26n from 40.9 to 41.5 mAP50-95 on COCO val2017 (640 pixels, single model, single scale, default NMS) with a YOLO26s teacher, at no added inference cost. Teacher and student must come from the same YOLO family. For segmentation datasets, the auto_annotate function pairs a YOLO detector with SAM to write polygon labels instead of boxes.
In Ultralytics Platform: Batch Annotation, review, train#
- Upload your images to a dataset and label a seed set by hand or with Smart annotation in the annotation editor.
- Pick a teacher: your own YOLO model trained on the seed set or, on a detection dataset with 1 to 200 classes, a class-prompted model such as Ultralytics VLM1 (Ultralytics VLM1 2B is the Smart-mode default on detection datasets with 1 to 200 classes; see the Ultralytics VLM1 docs). Press Predict on ten representative images first; if it misses more than a few objects, try the other kind.
- Open More actions > Batch Annotation on the dataset page and pick the model. For a YOLO model, set the confidence your sweep chose (the default is 0.25); sample previews show what the run adds.
- Leave Include annotated images off so the run labels only unlabeled images. Check the estimated cost in the dialog (see Ultralytics pricing); a paid provider model also bills your own provider key. Click Start. Platform saves a dataset version first, so you can roll back.
- When the run finishes, save a version before you review, then review every image and save another. Compare versions between the two gives the edit rate: added plus removed annotations divided by the annotations the run created, an upper bound because a corrected box counts as both.
- With cloud training, train one student on the reviewed seed images only and another on seed plus reviewed pseudo-labels, with the same settings and the same human-labeled validation set. Keep the pseudo-labeled pool out of the seed-only run. Then track the edit rate on each new batch: a rising rate is the early warning that new images have drifted away from what the teacher knows.

The Batch Annotation dialog with a class-prompted model, Moondream 3.1, and sample previews. Here Include annotated images is on; leave it off to label only unlabeled images.
Hosted models such as Ultralytics VLM1 4B need no provider key, and running your own YOLO models in the editor is free, so you can test a teacher on your own images before labeling a batch. For more on these models in the editor, see how Ultralytics Platform uses AI to automate annotation.
Aim review where the teacher is least sure#
Reviewing every pseudo-labeled image catches many errors before they reach a training version, though no review is perfect. Review goes further when you aim it. Active learning sends the images the model is least sure about to people first. In Platform, filter by class to check rare classes first, and sort images by annotation count as a quick triage: the fewest boxes point to likely misses, the most to crowded scenes where boxes merge. Human-in-the-loop annotation explains why review earns its cost.
Who should use pseudo-labeling#
Use pseudo-labeling when you have far more unlabeled images than labeled ones, a teacher that does well on a labeled sample of your own data, and time to review or at least spot-check what it writes. Teams building detectors for common objects such as people, vehicles or PPE can often start from a pretrained YOLO26 model or a class-prompted teacher such as Ultralytics VLM1, which labels objects from class names alone. Teams with specialized data such as PCB defects or X-rays should compare a class-prompted teacher against one trained on a hand-labeled seed set before labeling at scale.
Keep it small, or skip it, when the teacher fails a quick ten-image check or when you can't keep a human-labeled validation set to measure the student against. In every case, measure the teacher on labeled images first, compare the student with and without pseudo-labels, and treat the edit rate as your early warning.
Frequently asked questions
Pseudo-labeling is a semi-supervised technique in which a trained model predicts labels for unlabeled data, and its confident predictions are added to the training set as if they were real labels. In object detection, each pseudo-label is typically a box and a class. A student model then trains on the real and pseudo-labels together, and can become the teacher for the next round.
Pseudo-labeling uses a teacher to create more labeled training data. Knowledge distillation trains a student to match a teacher's outputs or internal features, usually to make a smaller, faster model. In Ultralytics YOLO you can do both: label the pool with a teacher, then train the student with the
distill_modelargument, as the knowledge distillation guide shows.For a teacher that returns confidence scores, measure it. Run the teacher on 50 to 100 images you have already labeled, count the false boxes and missed objects at several thresholds, and shortlist the ones with the fewest edits per image. In our Academy example with YOLO26n on COCO128, that was 0.25 and 0.40.
Yes. If the teacher misses objects, mislabels look-alike classes or draws loose boxes, the student can learn those errors as truth, and later rounds can reinforce them. Reviewing pseudo-labels, choosing settings from measurements and comparing against a seed-only baseline on human-labeled validation data catch many of these errors.
Yes, on data it handles well. On our VLM Leaderboard, the 55 models average 0.658 mAP50 on the Safe Human 17 PPE dataset but 0.036 on DeepPCB defects, so test a model such as Ultralytics VLM1 on a sample of your own images before labeling a whole dataset with it.
Written by
Comments
Ask a question, share your results, or help someone else.





























