Paper · 2020-12-13 · cs.CV
Simple Copy-Paste is a Strong Data Augmentation Method for Instance Segmentation
Copy-Paste augmentation for instance segmentation: scale-jitter two random training images, paste a random subset of one image's object masks onto the other, and fix up occluded masks and boxes. No context modelling. Combined with large scale jittering and self-training, Cascade Eff-B7 NAS-FPN reaches 57.3 box AP / 49.1 mask AP on COCO test-dev; +6.1 mask AP_r on LVIS.
Data augmentationInstance segmentationSelf-trainingLong-tailed recognitioncomputer-visiondata-augmentationinstance-segmentationobject-detection
AI-compiled by claude-opus-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Teaching a model to outline every object in a photo (instance segmentation) needs pixel-accurate masks drawn by people, which is slow and expensive. So you want to squeeze as much training signal as possible out of every labelled image.
The trick here is almost embarrassingly simple: take two labelled training photos, cut some of the outlined objects out of one, and stick them onto the other, like a collage. The labels come for free, because you already know exactly which pixels you pasted. Objects that end up completely hidden behind pasted ones are dropped from the labels, and partly hidden ones get their outlines trimmed.
Earlier versions of this idea tried hard to paste objects only where they would plausibly appear. This paper finds that random pasting works just as well, even if it produces odd scenes such as giraffes next to footballers at mismatched sizes. Combined with aggressive random zooming in and out of the images, it gives consistent gains across model sizes, and the biggest gains when labelled data is scarce or object classes are rare. It also costs nothing at inference time, since it only changes the training images.
TL;DR
Copy-Paste picks two training images, applies independent random scale jittering and horizontal flips to each, pastes a random subset of instances from one onto the other with a (optionally Gaussian-smoothed) alpha mask, and updates masks and boxes of occluded objects §3. Paste locations and choices are random; no visual context is modelled §3. It stacks with large scale jittering (resize range 0.1 to 2.0) and with self-training on pseudo-labelled images §4.2 §4.4. Author-reported: +0.5 to +1.1 mask AP over strong LSJ baselines on COCO across 7 models tab. 1, 57.3 box AP / 49.1 mask AP on COCO test-dev with self-training tab. 4, and large gains on LVIS rare classes tab. 7 tab. 8. Relevant if you train Mask R-CNN-style models and have instance masks; it needs masks, not only boxes.
Problem
Instance segmentation models are data-hungry while mask annotation is costly; the paper cites 22 worker hours per 1000 COCO instance masks §1. Standard augmentations (scale jitter, random resize) are generic and not object-aware §1. Prior Copy-Paste methods (Contextual Copy-Paste, InstaBoost) model the surrounding context to decide where to paste, adding complexity §1 §2. The paper asks whether purely random pasting is enough on strong, long-trained baselines §1.
Method
Copy-Paste builds each training example from two random training images. Both are augmented independently with scale jittering and horizontal flipping; then a random subset of ground-truth instances from one (the "pasted" image) is composited onto the other (the "main" image), and the main image's annotations are corrected for occlusion §3 fig. 2.
Algorithm: Simple Copy-Paste [§3] [fig. 2] [app. A]
Input: labelled dataset D of images with instance masks, boxes, classes
1. Sample two images (I_main, I_paste) at random from D.
2. Apply random scale jittering + random horizontal flip to each image
independently (with its masks). LSJ on both is the default [§4.1] [tab. 11].
3. Choose a random subset of the instances in I_paste
(better than one object or all objects [tab. 10]).
4. Build a binary mask alpha = union of the chosen instances' GT masks.
Optionally smooth alpha with a Gaussian filter (no measurable effect [tab. 10]).
5. Composite: I_new = I_paste * alpha + I_main * (1 - alpha).
6. Annotations:
- add the chosen instances (masks, boxes, classes) from I_paste;
- for each original instance of I_main, subtract alpha from its mask;
drop it if the mask becomes empty (fully occluded), otherwise
recompute its box from the remaining mask (partially occluded).
Output: I_new with updated annotationsCompositing rule, with \alpha the binary mask of pasted objects, I_1 the pasted image and I_2 the main image (unnumbered in the paper) §3:
I_{\text{new}} = I_1 \times \alpha + I_2 \times (1 - \alpha)
The paper states that the pasted objects' masks and boxes are taken from ground truth and that occluded objects' masks and boxes are updated §3; the exact mask subtraction and box recomputation in step 6 is our reading of that one sentence and is not spelled out further.
Scale jittering §3 fig. 3. Both variants resize and crop the image and use horizontal flips. Standard scale jittering (SSJ) resizes by a factor in 0.8 to 1.25 of the original size; large scale jittering (LSJ) uses 0.1 to 2.0. When the image is made smaller than the output size it is padded with gray pixels fig. 3. LSJ is used for all models unless stated otherwise §4.1.
Self-training Copy-Paste §3 §4.4:
- Train a supervised teacher with Copy-Paste on labelled data.
- Generate pseudo labels on unlabelled images.
- Train a student on labelled + pseudo-labelled images, pasting ground-truth COCO instances into both labelled and pseudo-labelled images. Half of each batch is labelled COCO, half is pseudo-labelled data §4.4.
Pasting pseudo-labelled objects from the unlabelled set into COCO images gave no extra AP §4.4.
LVIS two-stage training §4.7. Stage 1 is the single-stage recipe. Stage 2 fine-tunes only the final classification layer of Mask R-CNN with the classification loss only, using Class-Balanced Loss with per-class weight
w_c = \frac{1-\beta}{1-\beta^{n_c}}, \quad \beta = 0.999
where n_c is the number of instances of class c; weights are divided by their mean and clipped to [0.01, 5] §4.7, footnote.
Hyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| Base detector | Mask R-CNN + FPN, ResNet or EfficientNet backbone | §4.1 | |
| FPN levels / anchors | P_2 to P_6, anchor size 8 \times 2^l, 3 anchors per pixel | §4.1 | |
| Strongest model | Cascade R-CNN, EfficientNet-B7, NAS-FPN P_3 to P_7 | §4.1 | anchor size 4 \times 2^l, 9 anchors per pixel; NAS-FPN 5 repeats, convs replaced by ResNet bottleneck blocks |
| Normalization | synchronous batch norm | §4.1 | |
| Batch size | 256 | §4.1 | 512 for self-training, except the largest model which stays at 256 (memory) |
| Weight decay | 4e-5 | §4.1 | |
| Peak learning rate | 0.32 | §4.1 | |
| Warmup | linear, 0.0032 to 0.32 over first 1000 steps | §4.1 | |
| LR schedule | step decay at 0.9, 0.95, 0.975 of total steps | §4.1 | decay factor not stated |
| Training length | until validation AP stops improving | §4.1 | e.g. 576 epochs for LSJ + Copy-Paste from scratch; 96 epochs for SSJ only |
| Initialization | random, unless stated | §4.1 | largest model: backbone from a self-training ImageNet checkpoint |
| SSJ range | 0.8 to 1.25 | §3 fig. 3 | plus horizontal flip |
| LSJ range | 0.1 to 2.0 | §3 fig. 3 | plus horizontal flip; gray padding |
| Image sizes | 640, 1024, 1280 (square) | §4.2 tab. 1 | |
| Objects pasted | random subset of one image's instances | §3 tab. 10 | distribution of subset size not stated |
| Probability of applying Copy-Paste | not stated | ||
| Gaussian blur of alpha | used by default; sigma not stated | §3 app. A | no blending gives the same AP tab. 10 |
| Self-training batch mix | 50% labelled COCO, 50% pseudo-labelled | §4.4 | |
| Pseudo-label threshold / format | not stated | ||
| LVIS single-stage | 180k steps, batch 256, COCO training params | §4.7 | |
| LVIS RFS threshold | t = 0.001 | §4.7 | |
| LVIS inference | 300 detections per image, score threshold 0 | §4.7 | |
| LVIS stage 2 | 3x schedule, only final classification layer, classification loss only | §4.7 | |
| Class-Balanced Loss | \beta = 0.999, weights / mean, clip [0.01, 5] | §4.7 |
Results
Author-reported. Unless noted, COCO 2017 (118k train images) with LSJ baselines, random init, trained to convergence §4.1.
Copy-Paste across architectures and sizes on COCO val tab. 1:
| Model | FLOPs | Box AP | Mask AP |
|---|---|---|---|
| Res-50 FPN (1024) | 431 B | 47.2 | 41.8 |
| w/ Copy-Paste | 431 B | (+1.0) 48.2 | (+0.6) 42.4 |
| Res-101 FPN (1024) | 509 B | 48.4 | 42.8 |
| w/ Copy-Paste | 509 B | (+1.4) 49.8 | (+0.8) 43.6 |
| Res-101 FPN (1280) | 693 B | 49.1 | 43.1 |
| w/ Copy-Paste | 693 B | (+1.2) 50.3 | (+1.1) 44.2 |
| Eff-B7 FPN (640) | 286 B | 48.5 | 42.7 |
| w/ Copy-Paste | 286 B | (+1.5) 50.0 | (+1.0) 43.7 |
| Eff-B7 FPN (1024) | 447 B | 50.8 | 44.7 |
| w/ Copy-Paste | 447 B | (+1.1) 51.9 | (+0.5) 45.2 |
| Eff-B7 FPN (1280) | 595 B | 51.1 | 44.8 |
| w/ Copy-Paste | 595 B | (+1.5) 52.6 | (+1.1) 45.9 |
| Cascade Eff-B7 FPN (1280) | 854 B | 52.9 | 45.6 |
| w/ Copy-Paste | 854 B | (+1.1) 54.0 | (+0.7) 46.3 |
Average over these 7 models: +1.3 box AP, +0.8 mask AP §4.2.
Per object size (COCO val) tab. 13:
| Model | box AP | box AP_s | box AP_m | box AP_l | mask AP | mask AP_s | mask AP_m | mask AP_l |
|---|---|---|---|---|---|---|---|---|
| Res-50 FPN (1024) | 47.2 | 28.5 | 49.6 | 64.6 | 41.8 | 23.0 | 44.3 | 60.1 |
| w/ Copy-Paste | (+1.0) 48.2 | (+0.4) 28.9 | (+1.4) 51.0 | (+1.8) 66.4 | (+0.6) 42.4 | (+0.2) 23.2 | (+0.9) 45.2 | (+1.1) 61.2 |
| Res-101 FPN (1024) | 48.4 | 29.2 | 51.1 | 65.8 | 42.8 | 23.5 | 45.5 | 60.4 |
| w/ Copy-Paste | (+1.4) 49.8 | (+1.3) 30.5 | (+1.8) 52.9 | (+1.1) 66.9 | (+0.8) 43.6 | (+1.0) 24.5 | (+1.4) 46.9 | (+1.1) 61.5 |
| Res-101 FPN (1280) | 49.1 | 30.4 | 51.9 | 66.6 | 43.1 | 24.5 | 46.0 | 61.6 |
| w/ Copy-Paste | (+1.2) 50.3 | (+1.3) 31.7 | (+1.8) 53.7 | (+0.6) 67.2 | (+1.1) 44.2 | (+1.2) 25.7 | (+1.5) 47.5 | (+0.2) 61.8 |
| Eff-B7 FPN (1280) | 51.1 | 33.3 | 53.9 | 67.9 | 44.8 | 26.6 | 47.9 | 62.7 |
| w/ Copy-Paste | (+1.5) 52.6 | (+1.0) 34.3 | (+1.7) 55.6 | (+2.3) 70.2 | (+1.1) 45.9 | (+0.9) 27.5 | (+1.5) 49.4 | (+1.8) 64.5 |
Self-training, Eff-B7 FPN (640), COCO val tab. 2:
| Setup | Box AP | Mask AP |
|---|---|---|
| Eff-B7 FPN (640) | 48.5 | 42.7 |
| w/ self-training | (+1.5) 50.0 | (+1.3) 44.0 |
| w/ Copy-Paste | (+1.5) 50.0 | (+1.0) 43.7 |
| w/ self-training Copy-Paste | (+2.9) 51.4 | (+2.3) 45.0 |
Where to paste during self-training tab. 3:
| Setup | Pasting into | Box AP | Mask AP |
|---|---|---|---|
| self-training | - | 50.0 | 44.0 |
| +Copy-Paste | COCO | (+0.4) 50.4 | 44.0 |
| +Copy-Paste | Pseudo data | (+0.8) 50.8 | (+0.5) 44.5 |
| +Copy-Paste | COCO & Pseudo data | (+1.4) 51.4 | (+1.0) 45.0 |
COCO state of the art tab. 4 († = test-time augmentation):
| Model | FLOPs | Params | AP val | AP test-dev | Mask AP val | Mask AP test-dev |
|---|---|---|---|---|---|---|
| SpineNet-190 (1536) | 2076B | 176M | 52.2 | 52.5 | 46.1 | 46.3 |
| DetectoRS ResNeXt-101-64x4d | - | - | - | 55.7† | - | 48.5† |
| SpineNet-190 (1280) | 1885B | 164M | 52.6 | 52.8 | - | - |
| SpineNet-190 (1280) w/ self-training | 1885B | 164M | 54.2 | 54.3 | - | - |
| EfficientDet-D7x (1536) | 410B | 77M | 54.4 | 55.1 | - | - |
| YOLOv4-P7 (1536) | - | - | - | 55.8† | - | - |
| Cascade Eff-B7 NAS-FPN (1280) | 1440B | 185M | 54.5 | 54.8 | 46.8 | 46.9 |
| w/ Copy-Paste | 1440B | 185M | (+1.4) 55.9 | (+1.2) 56.0 | (+0.4) 47.2 | (+0.5) 47.4 |
| w/ self-training Copy-Paste | 1440B | 185M | (+2.5) 57.0 | (+2.5) 57.3 | (+2.1) 48.9 | (+2.2) 49.1 |
Self-training here uses unlabelled COCO and unlabelled Objects365 §4.5.
Data efficiency §4.3 fig. 5 fig. 1: on 10% of COCO (Eff-B7 FPN, 640), Copy-Paste adds 6.9 box AP over SSJ and 4.8 box AP over LSJ; with LSJ, 75% of COCO plus Copy-Paste roughly matches 100% of COCO without it. Copy-Paste plus LSJ versus SSJ alone is reported as up to 2x more data-efficient, with about +10 AP at 10% of data and +5 AP at full data fig. 1. mixup only helps in the low-data regime and not on top of LSJ §4.2 §4.3 fig. 5.
Training schedule and init §4.2 fig. 4: on Res-50 FPN (1024), Copy-Paste helps at 2x/3x schedules (24/36 epochs) and the gain grows with longer training; it helps with both ImageNet and random init, best with random init. The intro reports +1.0 AP at 48 epochs §1.
Transfer from COCO pre-training, Cascade / Eff-B7 NAS-FPN:
| Task | Metric | Baseline | w/ Copy-Paste pre-training | Source |
|---|---|---|---|---|
| PASCAL VOC 2007 detection (test) | AP50 | 88.6 | 89.3 | tab. 5 |
| PASCAL VOC 2007 detection (test) | AP | 75.0 | 76.5 | tab. 5 |
| PASCAL VOC 2012 semantic seg. (val) | mIOU | 83.9 | 86.6 | tab. 6 |
LVIS v1.0 val, single-stage, Eff-B7 FPN (640), mask AP tab. 8:
| Setup | AP | AP_r | AP_c | AP_f |
|---|---|---|---|---|
| Eff-B7 FPN (640) | 27.7 | 9.7 | 28.1 | 35.1 |
| w/ RFS | 28.2 | 15.4 | 27.8 | 34.3 |
| w/ Copy-Paste | 29.3 | 12.8 | 30.1 | 35.7 |
| w/ RFS w/ Copy-Paste | 30.1 | 18.4 | 30.0 | 35.4 |
LVIS v1.0 val, two-stage, Eff-B7 FPN (640), mask AP tab. 9:
| Setup | AP | AP_r | AP_c | AP_f |
|---|---|---|---|---|
| Eff-B7 FPN (640) | 31.3 | 25.0 | 30.6 | 34.9 |
| w/ RFS | 30.1 | 21.8 | 29.7 | 34.1 |
| w/ Copy-Paste | 33.0 | 27.3 | 33.2 | 35.7 |
| w/ RFS w/ Copy-Paste | 32.0 | 26.3 | 31.8 | 34.7 |
LVIS v1.0 val, two-stage models vs prior work tab. 7 († 2020 winner without TTA):
| Model | Mask AP | Mask AP_r | Mask AP_c | Mask AP_f | Box AP |
|---|---|---|---|---|---|
| cRT (ResNeXt-101-32x8d) | 27.2 | 19.6 | 26.0 | 31.9 | - |
| LVIS Challenge 2020 Winner† | 38.8 | 28.5 | 39.5 | 42.7 | 41.1 |
| ResNet-50 FPN (1024) | 30.3 | 22.2 | 29.5 | 34.7 | 31.5 |
| w/ Copy-Paste | (+2.0) 32.3 | (+4.3) 26.5 | (+2.3) 31.8 | (+0.6) 35.3 | (+2.8) 34.3 |
| ResNet-101 FPN (1024) | 31.9 | 24.7 | 30.5 | 36.3 | 33.3 |
| w/ Copy-Paste | (+2.1) 34.0 | (+2.7) 27.4 | (+3.4) 33.9 | (+0.9) 37.2 | (+3.1) 36.4 |
| EfficientNet-B7 FPN (1024) | 33.7 | 26.4 | 33.1 | 37.6 | 35.5 |
| w/ Copy-Paste | (+2.3) 36.0 | (+3.3) 29.7 | (+2.7) 35.8 | (+1.3) 38.9 | (+3.7) 39.2 |
| EfficientNet-B7 NAS-FPN (1280) | 34.7 | 26.0 | 33.4 | 39.8 | 37.2 |
| w/ Copy-Paste | (+3.4) 38.1 | (+6.1) 32.1 | (+3.7) 37.1 | (+2.1) 41.9 | (+4.4) 41.6 |
Ablations, Eff-B7 FPN (640), COCO tab. 10 tab. 11. Deltas in parentheses are relative to the full Copy-Paste row (50.0 / 43.7), not to the 48.5 / 42.7 baseline:
| Setup | Box AP | Mask AP |
|---|---|---|
| EfficientNetB7-FPN (640), no Copy-Paste | 48.5 | 42.7 |
| w/ Copy-Paste (one object) | (-0.9) 49.1 | (-0.6) 43.1 |
| w/ Copy-Paste (all objects) | (-0.3) 49.7 | (-0.4) 43.3 |
| w/ Copy-Paste (no blending) | 50.0 | 43.7 |
| w/ Copy-Paste | 50.0 | 43.7 |
| Main image | Pasted image | Box AP | Mask AP |
|---|---|---|---|
| SSJ | SSJ | (-1.9) 48.1 | (-1.6) 42.1 |
| SSJ | LSJ | (-2.3) 47.7 | (-1.9) 41.8 |
| LSJ | SSJ | (-0.3) 49.7 | (-0.2) 43.5 |
| LSJ | LSJ | 50.0 | 43.7 |
Other analyses: Copy-Paste raises per-class AP on all 80 COCO classes except hair drier, with the largest gains on classes with low baseline AP (average over 5 runs) app. B fig. 6. Using COCO-panoptic labels to split images into 42538 indoor and 71017 outdoor (4732 undetermined), random pairing pastes into a mismatched scene type in 46.8% of generated images app. C tab. 12:
| from \ to | indoor | outdoor |
|---|---|---|
| indoor | 14.1% | 23.4% |
| outdoor | 23.4% | 39.1% |
Paper vs code
No official code. The paper does not link a repository.
Pitfalls
- Location is not sampled separately. The intro says objects are pasted "at random locations" §1, but the method only describes independent scale jitter and flip of both images followed by pasting §3; position randomness comes from the jitter/crop of the pasted image. No separate translation, rotation or other geometric transform is applied §2.
- Unstated knobs. The probability of applying Copy-Paste per example, the distribution of the random subset size, the Gaussian sigma for blending, the LR decay factor, and pseudo-label filtering thresholds are not stated.
- Occlusion handling is described in one sentence §3. You must subtract the pasted alpha from existing masks, drop instances whose mask becomes empty, and recompute boxes from the remaining mask; a box-only pipeline cannot do this correctly. Whether nearly-occluded (tiny remaining area) instances are dropped is not stated.
- Use a binary alpha for labels. If you Gaussian-blur alpha for blending, the paper does not say which mask is used for updating annotations; blending made no difference to AP, so simply skipping it is safe tab. 10.
- LSJ on the main image matters most. SSJ on the main image costs about 2 box AP regardless of the pasted image's jitter tab. 11. Copy-Paste on an SSJ pipeline is not the paper's headline setup.
- Long training hides in the headline numbers. LSJ + Copy-Paste from scratch needs 576 epochs to converge §4.1; at 2x/3x schedules gains are smaller fig. 4. Batch size 256 with sync BN on accelerators is assumed.
- Delta columns change reference. In the ablation tables, red deltas are relative to the full Copy-Paste model, not the baseline tab. 10 tab. 11. In tab. 4, the self-training Copy-Paste deltas (+2.5 / +2.2) are against the no-Copy-Paste baseline, although the text calls them a "further improvement" §4.5.
- Two LVIS headline numbers come from different tables. "+6.1 mask AP_r" §1 is the Eff-B7 NAS-FPN (1280) two-stage model tab. 7, while the single-stage gain is +8.7 AP_r with RFS tab. 8. RFS helps single-stage but hurts two-stage training §4.7. Cascade was not used for the LVIS SOTA model because it hurt AP_r §4.7, footnote.
- Dataset size inconsistencies. COCO train is given as 118k §4.1 but "120k" in the self-training section, and unlabelled COCO as 120k §4.1 but "110k" in the pseudo-labelled pool §4.4.
- Copying from pseudo-labelled images does not help. Paste ground-truth instances into pseudo-labelled backgrounds, not pseudo-labelled instances into labelled images §4.4.
- The largest model is not from scratch: its backbone is initialised from a self-training ImageNet checkpoint §4.1, so tab. 4 is not a pure random-init result.
Lineage
- Builds on: Cut, Paste and Learn (Dwibedi et al., ICCV 2017), keeping its paste-and-blend idea but pasting between images that already contain instances, without geometric transforms, on COCO/LVIS §2; Contextual Copy-Paste (Dvornik et al., ECCV 2018) and InstaBoost (Fang et al., ICCV 2019), dropping their context modelling §2. Detector: Mask R-CNN, Cascade R-CNN, EfficientNet, NAS-FPN §4.1.
- Compared against: mixup fig. 5; Repeat Factor Sampling and Class-Balanced Loss on LVIS tab. 8 tab. 9; SpineNet, DetectoRS, EfficientDet, YOLOv4 on COCO tab. 4; cRT and the LVIS 2020 winner tab. 7.
- Self-training recipe is similar to Noisy Student (Xie et al., CVPR 2020) and Rethinking Pre-training and Self-training (Zoph et al., NeurIPS 2020) §4.4.
Source and license
Adapted from “Simple Copy-Paste is a Strong Data Augmentation Method for Instance Segmentation” by Golnaz Ghiasi, Yin Cui, Aravind Srinivas, Rui Qian, Tsung-Yi Lin, Ekin D. Cubuk, Quoc V. Le, Barret Zoph (arXiv:2012.07177), 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.