Paper · 2021-03-21 · cs.CV, cs.AI
Instant-Teaching: An End-to-End Semi-Supervised Object Detection Framework
Semi-supervised object detection in which a Faster R-CNN (R50-FPN) pseudo-labels unlabeled images with its own current weights at every training iteration, then learns from strongly augmented copies (Color+Cutout, Mixup, Mosaic). An optional co-rectify scheme trains two models that refine each other's pseudo labels. Headline (author-reported): 22.45 vs 18.25 mAP over STAC with 2% COCO labels.
Semi-supervised learningSelf-trainingObject detectionConsistency regularizationsemi-supervised-learningobject-detectionpseudo-labeling
AI-compiled by claude-haiku-5-5 on 2026-11-06, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Training an object detector normally needs every object in every training photo to be boxed and named by a person, and that labeling is slow and expensive. Semi-supervised learning tries to get by with a few labeled photos plus many unlabeled ones.
Instant-Teaching lets the detector label the unlabeled photos for itself while it trains. At each step it guesses boxes on a lightly altered copy of an unlabeled photo, keeps only the confident guesses, and then trains on a heavily altered copy of the same photo to reproduce them. The guesses come from the model that is currently being trained, so they get better as training goes on, and no separate teacher model has to be trained first. An optional second model checks the first model's guesses, which the authors say reduces the effect of confident mistakes being reinforced.
The approach matters because it reports gains over the previous best semi-supervised detector on COCO and Pascal VOC, mainly when labels are scarce. These are the authors' own numbers.
TL;DR
- Semi-supervised object detection with a Faster R-CNN (ResNet-50 + FPN) §4.1.
- Every iteration: the current model pseudo-labels a weakly augmented unlabeled batch; the same images, strongly augmented, are trained against those labels §3.3 eq. 1.
- Strong augmentations are extended with Mixup and Mosaic on unlabeled images §3.3 §5.2.
- Optional co-rectify: two identically structured models with different initialisations refine each other's pseudo labels; only one model is used at inference §3.3 eq. 5.
- Author-reported: +4.2 mAP over STAC at 2% COCO labels (22.45 vs 18.25); about +1.0 mAP at 100% COCO; +5.36 mAP over STAC on VOC07 with VOC12 unlabeled tab. 1 tab. 2.
Problem
Supervised detectors need many accurately boxed and labeled images, which is costly §1. Semi-supervised object detection (SSOD) trains on a labeled set D_l and an unlabeled set D_u §3.1. The baseline the paper argues against is STAC, which first trains a teacher, then pre-generates pseudo labels that are never updated during student training. The authors identify two issues: the procedure is complicated and inefficient, and the fixed pseudo labels limit accuracy §1 §3.3.
Assumptions: the detector is Faster R-CNN with FPN, and the paper's experiments use COCO and Pascal VOC only §4.
Method
Instant-Teaching (Instant-Teaching*, when co-rectify is added) is a single training loop with two parts: instant pseudo labeling with weak-strong augmentation, and a co-rectify step §3.2.
Instant pseudo labeling §3.3. Each iteration has two steps:
- The current model labels an unlabeled mini-batch on a weakly augmented view. The paper uses random flip as the only weak augmentation in all experiments unless stated otherwise §3.3. Non-maximum suppression and a confidence filter with threshold τ are always applied in this step; τ = 0.9 in all experiments §3.3.
- The same unlabeled images get strong augmentations and the pseudo labels from step 1 are used as ground truth. The model is updated with a total loss: a supervised loss on labeled images and an unsupervised loss on strong views of unlabeled images §3.3 eq. 1. Labeled images keep the weak augmentation §3.3.
The total loss is ℓ = ℓ_s + λ_u ℓ_u eq. 1.
Supervised loss eq. 2: cross-entropy classification plus L1 box regression over anchors, summed over labeled images l. The regression term is weighted by λ eq. 2 §3.3.
Unsupervised loss eq. 3: the class probabilities and boxes are first predicted on the weakly augmented unlabeled image; the hard label ĉ = argmax of the class distribution is used as the target for classification on the strongly augmented image. The box regression term is only applied where the max class score is at least τ eq. 3 §3.3.
Weak-strong augmentation §3.3. Strong augmentations follow STAC: colour jitter, geometric transforms and Cutout (the "Color+Cutout" set in tab. 3). The paper adds Mixup eq. 4 and Mosaic fig. 2. Geometric transforms of pseudo boxes are not used; the authors leave that to future work §5.2. Mixup and Mosaic are applied only to unlabeled data §3.3 §5.2.
Mixup eq. 4, with α_m = 1.0 tab. 6: a λ_m is drawn from Beta(α_m, α_m). The unlabeled image is replaced by a weighted blend with a randomly chosen labeled image from the batch. Its class labels are blended with weight λ_m, and its boxes are the union of the two images' boxes eq. 4 §3.3.
Mosaic fig. 2: an unlabeled and a labeled image are combined in one of two random layouts, horizontal or vertical, and annotations are combined to match §3.3.
Co-rectify §3.3 eq. 5. Two models f_a (Model-a) and f_b (Model-b) with the same structure are trained at the same time. They differ in initial parameters, and in their data augmentations and pseudo labels within a batch §3.3. For Model-a's targets: Model-a predicts class probabilities c and boxes t on the weakly augmented image; Model-b's detection head refines them, taking t as proposals, giving c^r and t^r. The rectified class scores are the average of c and c^r, and the rectified boxes are a weighted average of t and t^r eq. 5 §3.3. Model-b's rectified targets are built in a similar way §3.3. At inference only Model-a is used, so inference time is unchanged §3.2.
# Instant-Teaching: one training iteration [§3.3]
# Input: labeled batch (images, boxes, classes); unlabeled batch
# Output: scalar loss l = l_s + lambda_u * l_u [eq. 1]
def training_step(labeled_batch, unlabeled_batch, model):
# Pseudo-label unlabeled images with the current model on a
# weakly augmented view (random flip) [§3.3]
weak_views = random_flip(unlabeled_batch)
with no_gradient():
class_probs, boxes = model.predict(weak_views)
# Hard label = argmax class; keep boxes after NMS whose max
# class score is at least tau [§3.3] [eq. 3]
pseudo_labels = filter_nms_by_score(class_probs, boxes, tau)
# Strong views of the same images: Color+Cutout, then Mixup and
# Mosaic on unlabeled images only [§3.3] [eq. 4] [§5.2]
strong_views, strong_labels = strong_augment(
unlabeled_batch, pseudo_labels, labeled_batch)
# Supervised loss on weakly augmented labeled images [eq. 2]
loss_sup = detection_loss(model, weak_aug(labeled_batch),
labeled_batch.targets, reg_weight=lam)
# Unsupervised loss: classify strong views toward the pseudo
# labels; regress only confident boxes [eq. 3]
loss_uns = detection_loss(model, strong_views, strong_labels,
reg_weight=lam, reg_mask=max_score >= tau)
# Total loss, then one optimizer update [eq. 1]
loss = loss_sup + lambda_u * loss_uns
optimizer.step(loss)
return loss# Co-rectify: targets for Model-a, refined by Model-b's head [eq. 5]
# Input: weakly augmented unlabeled images x_u
# Output: rectified class scores and boxes
def corrected_targets(model_a, model_b, x_u):
# Model-a predicts class probabilities and boxes [eq. 5]
probs_a, boxes_a = model_a.predict(x_u)
# Model-b's detection head refines them, using boxes_a as proposals [eq. 5]
probs_b, boxes_b = model_b.refine_head(x_u, proposals=boxes_a)
# Class scores: plain average [eq. 5]
probs_star = 0.5 * (probs_a + probs_b)
# Boxes: weighted average; weights not fully specified [eq. 5]
boxes_star = weighted_average(boxes_a, boxes_b, probs_a, probs_b)
return probs_star, boxes_starHyperparameters
Values are as stated in the paper. "Not stated" means the paper does not give the value.
| Name | Value | Where | Notes |
|---|---|---|---|
| λ (box regression loss weight) | 1.0 | §4.1 tab. 6 | Used in eq. 2 and eq. 3 eq. 2 eq. 3 |
| λ_u (unsupervised loss weight) | 1.0 | §4.1 tab. 6 eq. 1 | Constant; best at 1.0, robust to 1/4–4 §5.4 fig. 5 |
| τ (confidence threshold) | 0.9 | §3.3 §4.1 tab. 6 | Pseudo-label filter and box-regression mask. Sweep tab. 5 |
| α_m (Beta for Mixup) | 1.0 | §3.3 tab. 6 | λ_m ~ Beta(1.0, 1.0) eq. 4 |
| Optimizer | SGD | §4.1 tab. 6 | |
| Momentum | 0.9 | §4.1 tab. 6 | |
| Weight decay | 1e-4 | §4.1 tab. 6 | |
| Initial learning rate | 0.01 | §4.1 app. A.1 tab. 6 | |
| LR decay | ×0.1 at 120k; second decay at 165k (text) or 160k (app.) | §4.1 app. A.1 | Conflict, see Pitfalls |
| Total training steps | 180k | §4.1 tab. 6 | |
| Batch size | 16 | §4.1 tab. 6 | |
| Labeled : unlabeled ratio in batch | 1:1 | §4.1 tab. 6 | Exact split of the 16 images is not stated |
| Hardware | 8 GPUs | §4.1 | Type not stated |
| Detector | Faster R-CNN + FPN, ResNet-50 | §4.1 | ImageNet-pretrained backbone |
| Framework | MMDetection | §4.1 | |
| Weak augmentation | random flip | §3.3 | Same for labeled and unlabeled in the weak branch |
| Strong augmentation | Color, Cutout, Mixup, Mosaic | §3.3 §5.2 tab. 3 | Geometric transforms not used |
| COCO labeled sets | 1%, 2%, 5%, 10%, 100% of 118k | §4.1 | Unlabeled = remainder (1–10%); 123k unlabeled for 100% |
| COCO quick schedule | 1–10% protocols | §4.1 app. A.1 | Multi-scale: short edge 500–800 if long edge < 1024; head batch 64 |
| COCO standard schedule | 100% protocol | §4.1 app. A.1 | Single scale: short edge 800 if long edge < 1333; head batch 512 |
| Standard 2× and 3× | LR steps listed in app. | app. A.1 | Not used in the main tables; the paper does not say so explicitly |
| COCO test | short edge 800 (quick: long < 1024; standard: long < 1333) | app. A.1 | Score threshold 0.001 |
| VOC labeled | VOC07 trainval (~5k) | §4.1 | Evaluated on VOC07 test |
| VOC unlabeled | VOC12 trainval (~11k), plus COCO subset of same classes (~95k) | §4.1 | Second row of tab. 2 |
| VOC training | short edge 600 if long < 1000; head batch 256 | app. A.1 | Same LR schedule as COCO quick |
| VOC test | short edge 600 if long < 1000; score threshold 0.001 | app. A.1 |
Full hyperparameter table: tab. 6 in app. A.2.
Results
Author-reported. Setup: Faster R-CNN with FPN and ResNet-50, MMDetection, 8 GPUs, ImageNet init §4.1. Baselines: supervised training on the same labeled data, STAC, and CSD (re-implemented by the authors, †) tab. 1. Values are mean ± std over runs where given.
MS-COCO, mAP tab. 1 (brackets are the paper's own gains over the supervised model)
| Method | Backbone | 1% | 2% | 5% | 10% | 100% |
|---|---|---|---|---|---|---|
| Supervised | R50-FPN | 9.05±0.16 | 12.70±0.15 | 18.47±0.22 | 23.86±0.81 | 37.63 |
| CSD† | R50-FPN | 10.20±0.15 | 13.60±0.10 | 18.90±0.10 | 24.50±0.15 | 38.87 |
| STAC | R50-FPN | 13.97±0.35 | 18.25±0.25 | 24.38±0.12 | 28.64±0.21 | 39.21 |
| Instant-Teaching | R50-FPN | 16.00±0.20 | 20.70±0.30 | 25.50±0.05 | 29.45±0.15 | 39.60 |
| Instant-Teaching* | R50-FPN | 18.05±0.15 | 22.45±0.15 | 26.75±0.05 | 30.40±0.05 | 40.20 |
Gains over supervised, as printed: Instant-Teaching* +9.00, +9.75, +8.28, +6.54, +2.57; STAC +4.92, +5.55, +5.91, +4.78, +1.58 tab. 1. The text gives the gains over STAC: +4.08 (1%), +4.2 (2%), 24.38 → 26.75 (5%), 28.64 → 30.40 (10%), and about +1.0 mAP at 100% §4.2.
Pascal VOC, AP (IoU) on VOC07 test tab. 2. Labeled: VOC07 trainval.
| Method | Backbone | Unlabeled | AP 0.5:0.95 | AP 0.5 | AP 0.75 |
|---|---|---|---|---|---|
| Supervised (ours) | R50-FPN | – | 43.60 | 76.70 | 44.50 |
| CSD | R101-R-FCN | VOC12 | – | 74.70 | – |
| STAC | R50-FPN | VOC12 | 44.64 | 77.45 | – |
| Instant-Teaching | R50-FPN | VOC12 | 48.70 | 78.30 | 52.00 |
| Instant-Teaching* | R50-FPN | VOC12 | 50.00 | 79.20 | 54.00 |
| CSD | R101-R-FCN | VOC12 & COCO | – | 75.10 | – |
| STAC | R50-FPN | VOC12 & COCO | 46.01 | 79.08 | – |
| Instant-Teaching | R50-FPN | VOC12 & COCO | 49.70 | 79.00 | 54.10 |
| Instant-Teaching* | R50-FPN | VOC12 & COCO | 50.80 | 79.90 | 55.70 |
The paper reports gains of +5.10 / +6.40 over supervised for Instant-Teaching and Instant-Teaching* (AP 0.5:0.95, VOC12) tab. 2. The text gives 44.64 → 50.00 (+5.36) against STAC, and 46.01 → 50.80 for the COCO-subset setting §4.2.
Ablation: augmentation, 5% COCO labels, 8× unlabeled tab. 3. Strong augmentation sets; mAP.
| Method | Color+Cutout | Geometric | Mixup | Mosaic | mAP |
|---|---|---|---|---|---|
| STAC | ✓ | ✓ | 23.14 | ||
| Instant-Teaching | ✓* | 21.60 | |||
| Instant-Teaching | ✓ | 24.70 | |||
| Instant-Teaching | ✓ | ✓ | 25.40 | ||
| Instant-Teaching | ✓ | ✓ | 25.00 | ||
| Instant-Teaching | ✓ | ✓ | ✓ | 25.60 |
* Color+Cutout is also applied to unlabeled images in the pseudo-labeling step tab. 3.
Unlabeled-set size, MS-COCO tab. 4. The "Full" column is not defined in the paper.
| Method | Labeled | 1× | 2× | 4× | 8× | Full |
|---|---|---|---|---|---|---|
| STAC | 5% | 19.81 | 20.79 | 22.09 | 23.14 | 24.38±0.12 |
| Instant-Teaching | 5% | 23.60 | 24.30 | 25.30 | 25.60 | 25.60±0.14 |
| STAC | 10% | 25.38 | 26.52 | 27.33 | 27.95 | 28.64±0.21 |
| Instant-Teaching | 10% | 28.80 | 29.00 | 29.20 | 29.50 | 29.53±0.17 |
Confidence threshold τ, 10% COCO, λ_u = 1.0 tab. 5: τ = 0.3 → 26.30; 0.5 → 27.70; 0.7 → 28.70; 0.9 → 29.80 mAP.
λ_u sweep fig. 5: described only in a figure (best at 1.0; small drop at 1/4 to 4). No table.
Backbones, 2% COCO tab. 7 (appendix A.4): R50 supervised 12.70, Instant-Teaching 20.70, Instant-Teaching* 22.45; R101 15.80 / 22.10 / 23.50; X101-32x4d 16.60 / 22.40 / 24.20; R2N-101 17.4 / 23.5 / 25.9. Brackets give the paper's gains.
Pseudo-label quality fig. 3, fig. 6, fig. 7: qualitative and curve-based; the paper reports that the count of model-generated boxes rises over training §5.1, and that co-rectify gives higher mAP on confident pseudo labels §5.5. Figure values are not tabulated.
Convergence fig. 8 (app. A.3): loss curves for both models; no numbers.
Paper vs code
No official code.
Searched: the paper, its arXiv metadata and its bibliography give no code or
project link. A GitHub repository search (instant-teaching, and
instant-teaching with org:alibaba) gave one title match,
mightyzau/Instant-Teaching (Apache-2.0). Its owner is an individual who is not
an author and not an Alibaba account, so it was not used. A web search was not
run, because that permission was denied.
Pitfalls
- LR schedule conflict. Section 4.1 says the rate drops 10× at 120k and 165k §4.1. Appendix A.1 and Table 6 give 120k, 160k and 180k app. A.1 tab. 6. The 0.0001 stage is said to be "≤ 180k" in A.1 but Table 6 gives only the total step count. Implement one of these and note which.
- Table 4 vs Table 1. At 5% COCO, Table 4 gives 25.60 "Full" and Table 1 gives 25.50 at 5%. At 10%, Table 4 gives 29.53 "Full" and Table 1 gives 29.45. Table 5 gives 29.80 at τ = 0.9, 10%. These are different settings or runs, and the paper does not say which is the main result.
- "Full" unlabeled set. Table 4 gives no definition for "Full". Read it as the full unlabeled split only with care; the 8× column has the same number as the ablation table tab. 3.
- Which schedule for ablations. Section 4.1 uses the quick schedule for 1–10% and standard for 100% §4.1. Ablations at 5% and 10% do not say which schedule they use; assume quick only if you need to match a table exactly.
- Pseudo-label filtering in eq. 3. Eq. 3 applies the τ mask to the regression term only, while the classification sum runs over all anchors. Section 3.3 says NMS and confidence filtering are applied with τ in the pseudo-labeling step §3.3. The paper does not say whether low-confidence anchors are excluded from the classification term eq. 3. Check the code before you implement it.
- Mixup of boxes and labels. Eq. 4 uses "∪" for both soft labels and boxes. Text calls the class labels "soft" and the boxes "pseudo annotations" §3.3. The paper does not say how boxes from the two images are clipped or dropped after blending, nor how the weights combine when a box is only in one image.
- Co-rectify weights. Eq. 5 writes the box weight as 1/(c_i + c_i^r) × (t_i c_i + t_i^r c_i^r). It does not say whether c_i is the max class score, the per-class vector, or the probability of the target class. The denominator reads as a scalar, but c is a vector. Not stated.
- Co-rectify targets. The text says Model-b's rectified targets are built "in a similar way" §3.3, but it does not say which target is used to train which model. Not stated.
- Co-rectify cost. Training runs two detectors and two heads on each batch. The paper reports inference cost only for the single model used §3.2. Training time and memory are not given.
- Extra forward pass. Each iteration runs the current model on every unlabeled image to make pseudo labels, before the training pass §3.3. The paper does not report the time or memory cost of this pass.
- Dataset numbers. The VOC unlabeled sets (~11k VOC12; ~95k COCO subset) are from the text §4.1. The exact image lists are not stated.
- Reported gains are over the paper's own reimplementations. CSD is the authors' implementation on Faster R-CNN tab. 1. Table 2 cites CSD with an R101-R-FCN backbone, a different detector, so its numbers are not directly comparable. Whether they were copied from the CSD paper is not stated.
- Schedules come from STAC. The quick and standard schedules are STAC's; the paper points to STAC's appendix for their full details §4.1 app. A.1.
- Confidence threshold at inference. Figure 6 uses a score threshold of 0.9 for evaluation of pseudo-label quality §5.5. The COCO evaluation uses score threshold 0.001 app. A.1. The two are not the same thing; do not mix them.
- Labeled and unlabeled counts per batch. A batch of 16 with a 1:1 ratio implies 8 and 8. The paper does not state it in those words §4.1.
Lineage
- Builds on: STAC, "A Simple Semi-Supervised Learning Framework for Object Detection" (Sohn et al.), arXiv:2005.04757 §1. Instant-Teaching keeps STAC's weak-strong augmentation scheme and its strong augmentations, and extends them with Mixup and Mosaic. It replaces STAC's pre-generated pseudo labels with labels produced at each iteration §3.3. There is no card for arXiv:2005.04757 in this wiki, so nothing from it is used here.
- Compared against: CSD (Jeong et al., NeurIPS 2019) tab. 1 tab. 2; the supervised baseline tab. 1; STAC tab. 1 tab. 2.
- Related techniques named in the paper: FixMatch and weak-strong augmentation in semi-supervised classification §3.3; confirmation bias §3.3; Mixup [zhang2017mixup] and Mosaic from YOLOv4 §3.3.
- Superseded by: not stated; no later work is cited in the paper.
Source and license
Adapted from “Instant-Teaching: An End-to-End Semi-Supervised Object Detection Framework” by Qiang Zhou, Chaohui Yu, Zhibin Wang, Qi Qian, Hao Li (arXiv:2103.11402), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.