Computer vision
Augmentation, Synthetic Data, and Simulation
Learn how transformations, compositing, simulation, and generated images affect invariance, realism, coverage, and evaluation.
By the end you can
- Distinguish label-preserving augmentation from task-changing transformation
- Choose augmentation distributions that reflect plausible deployment variation
- Evaluate synthetic data for coverage, realism, and shortcut artifacts
- Design mixed real and synthetic experiments with independent test evidence
An augmentation is a hypothesis about what should not matter
Flipping a cat image horizontally usually preserves the label “cat.” Flipping an X-ray or a road sign may change anatomical laterality or symbol meaning.
Every transformation asserts an invariance. The assertion must be justified by the task, sensor, and decision rather than borrowed from a generic recipe.
The assertion is also testable. When it is wrong, the cost shows up in the metric. Later in this lesson, four published geometric recipes measured side by side on chest X-rays each score below doing no augmentation at all. A copy-paste pipeline loses eight points of detection accuracy to nothing but the seams around the pasted objects.
Augmentation policy is part of the target definition.
Case
Networks read texture where people read shape
A network and a person can look at the same picture and answer from different evidence. In 2018 Geirhos and five co-authors put that to a direct test rather than an argument. They evaluated “CNNs and human observers on images with a texture-shape cue conflict” — images whose shape says one category and whose texture says another. The scale was “nine experiments totalling 48,560 psychophysical trials across 97 observers”.
The two kinds of observer split. Their finding is that “ImageNet-trained CNNs are strongly biased towards recognising textures rather than shapes, which is in stark contrast to human behavioural evidence”. The cue the network had settled on was not the cue the task designer assumed it was using.
What fixed it was training data, not architecture. “the same standard architecture (ResNet-50)” that learns a texture-based representation on ImageNet “is able to learn a shape-based representation instead when trained on” Stylized-ImageNet. The shift brought better object detection and more robustness to image distortions with it.
That is the whole argument for treating augmentation as target definition. A stylization pipeline is an augmentation. It changed which cue the network used to answer the same question, on the same labels, in the same architecture.
Comparison
Four ways to manufacture training variation
These four methods differ in control, realism, annotation cost, and failure mode.
Geometric transforms alter position, scale, crop, orientation, or perspective. They are useful for viewpoint variation, they can cut away the evidence the label depends on, they oblige you to transform coordinates and masks with the pixels, and they risk producing geometry the camera could never have produced.
Photometric transforms change brightness, contrast, color, blur, or noise. They are useful for capture variation, they can violate physical sensor behavior, they may destroy subtle diagnostic cues, and they risk unrealistic appearance.
Compositing and copy-paste insert foreground objects or regions into new contexts. They offer label control and raise rare-object counts, they require plausible boundaries and occlusion, and they risk paste artifacts becoming shortcuts.
Simulation or generative synthesis renders scenes or generates images from a model. It controls rare scenarios and can vary geometry and metadata, it inherits simulator or generator bias, and it risks the synthetic-to-real gap.
The compositing row has measurements attached to it. In 2021 Google Research pasted objects at random, with no context modelling of any kind, on top of an already strong baseline. The abstract of Simple Copy-Paste reports: “On COCO instance segmentation, we achieve 49.1 mask AP and 57.3 box AP, an improvement of +0.6 mask AP and +1.5 box AP over the previous state-of-the-art.” On rare categories the margin is larger. They beat the LVIS 2020 Challenge winning entry by +3.6 mask AP.
A second organisation reproduced the direction of the effect on its own runs. OpenMMLab's MMDetection reimplementation reports 43.5 box / 39.1 mask AP with standard scale jittering, against 45.1 box / 40.3 mask AP with scale jittering plus Simple Copy-Paste, at a 270k schedule. Rare-object counts are not the abstract virtue of compositing. They are the +3.6 mask AP.
Geometric transforms
Alter position, scale, crop, orientation, or perspective.
- Useful for viewpoint variation
- Can cut away label evidence
- Must transform coordinates and masks
- Risk: impossible geometry
Photometric transforms
Change brightness, contrast, color, blur, or noise.
- Useful for capture variation
- Can violate physical sensor behavior
- May destroy subtle diagnostic cues
- Risk: unrealistic appearance
Compositing and copy-paste
Insert foreground objects or regions into new contexts.
- Offers label control
- Improves rare-object counts
- Requires plausible boundaries and occlusion
- Risk: paste artifacts become shortcuts
Simulation or generative synthesis
Render scenes or generate images from a model.
- Controls rare scenarios
- Can vary geometry and metadata
- Inherits simulator or generator bias
- Risk: synthetic-to-real gap
Visual
Three tests for a proposed transformation
A useful augmentation must survive semantic, physical, and operational scrutiny. Each of these tests has a failure with a number behind it.
Label validity: the transformed example should retain the intended target or receive an updated target. A crop that removes the evidence is not a harder example, it is a wrong one.
Plausibility: the result should belong to conditions that could arise in the deployment process. This is the test the chest X-ray recipes below fail. Rotated and translated radiographs are not images a scanner produces, and the accuracy gap between recipe and no recipe was 93.42% against 97.95%.
Coverage value: the transformation should add variation missing from the observed training set, which is what the +3.6 mask AP on rare LVIS categories buys.
Artifact control: the operation should not introduce a cue that reveals how the sample was produced. On the GMU Kitchens benchmark that cue was worth the difference between 65.9 and 73.7 mAP, with the objects in the identical places both times.
Label validity
The transformed example should retain the intended target or receive an updated target.
Plausibility
The result should belong to conditions that could arise in the deployment process.
Coverage value
The transformation should add variation missing from the observed training set.
Artifact control
The operation should not introduce a cue that reveals how the sample was produced.
Example
Transformations that are valid in one domain and dangerous in another
These examples show why augmentation policies must be task-specific. The medical case is not a caution. It is a measurement.
Chest radiography has the sharpest number. In 2021 Elgendi and 13 co-authors compared 17 deep-learning models for COVID-19 detection on chest X-rays, with and without four published geometric augmentation recipes taken from other papers. Their abstract states the result: “The MCC without augmentation (MCC = 0.51) outperformed four recent geometrical augmentations (MCC = 0.47 for Data Augmentation 1, MCC = 0.44 for Data Augmentation 2, MCC = 0.48 for Data Augmentation 3, and MCC = 0.49 for Data Augmentation 4).”
All four recipes lost to the empty policy. Retraining a published model without augmentation raised its accuracy from 93.42% to 97.95%. The McNemar chi-square was 163.2, with p = 2.23 x 10^-37, so the gap is not sampling noise. The authors attribute it to training on rotated and translated X-rays that do not occur in real acquisition. The network spent capacity on a world the scanner never produces.
- Retail recognition: Horizontal flips may be valid, while mirrored brand text can create impossible packages.
- Autonomous driving: Random rotations can violate the camera's fixed horizon and road geometry.
- Medical imaging: Intensity changes may simulate scanner variation, but four geometric recipes measured on chest X-rays each scored below no augmentation at all (Matthews correlation coefficient 0.47, 0.44, 0.48 and 0.49 against 0.51), and removing augmentation moved one published model from 93.42% to 97.95% accuracy.
- Remote sensing: Rotations may be valid for overhead scenes, while cloud insertion must respect spectral bands.
- Document AI: Perspective warps can simulate phone capture, but character-mirroring changes the written content.
- Pose estimation: Crops must update keypoints and visibility flags rather than silently dropping joints.
Analogy
Training a pilot in a simulator
A flight simulator exposes a pilot to rain, crosswinds, instrument failures, and unusual airports. It helps when scenarios obey aviation physics and reveal conditions absent from routine flights.
Simulation experience is not sufficient evidence for real flight. Synthetic vision data still has to be tested on independent real-world conditions.
The most careful published version of this argument is about cars. Waymo reconstructed every available fatal collision in Chandler, Arizona for 2008-2017 that fell inside its operating domain: 72 crashes, 91 vehicle actors, 52 of them initiators and 39 responders. It then replaced the human drivers one at a time with the Waymo Driver in simulation. Every collision in the initiator role was avoided. In the responder role, the 2021 paper reports: “Replacing the driver reacting (the responder) to the actions of the crash initiator with the Waymo Driver resulted in an estimated 82% of simulations where a collision was prevented and an additional 10% of simulations where the collision severity was mitigated (reduction in crash-level serious injury risk).”
Those are real reconstructions and a real counterfactual. In 2022 Björn Lundgren accepted the figures and disputed what they support. The accident-selection criteria, he argues, are the wrong comparison for a policy decision about deployment. Notice what is being contested. Not the simulator, not the 82%, but the step from a simulated result to a claim about the road.
Simulation can expand practice; it cannot certify deployment performance.
Key idea
Synthetic artifacts can become easier than the intended task
Paste an object onto a new background and the seam is a cue. A detector can learn the seam instead of the object. In 2017 Dwibedi, Misra and Hebert measured that shortcut instead of warning about it. Their abstract states the problem in one sentence: “A naive way to do this results in pixel artifacts which result in poor performance for trained models.”
The size of it: on the GMU Kitchens benchmark, pasting object masks onto random backgrounds with no blending gave 65.9 mAP. Rendering the identical scene, with the identical object placement, under several blending modes gave 73.7 mAP. The paper states the gain as 8 AP points over not using any form of blending. The objects were in the same places, the labels were the same, the detector was the same. The 8 points came from boundary artifacts the detector had learned to lock onto instead of object appearance. That also names the fix. Render the same composite several ways, so the seam stops being a reliable cue.
The same principle generalises. A generator may place certain classes against stereotyped backgrounds; a model can exploit that while appearing to learn the target concept. Train a classifier to distinguish real from synthetic data and inspect whether its cues overlap with task predictions.
Synthetic data can go a long way, and there is a measurement of where it stops. Richter and three co-authors reconstructed label associations in 2016 “from the communication between the game and the graphics hardware”, which propagates semantic labels “with no access to the source code or the content”. They released “dense pixel-level semantic annotations for 25 thousand images synthesized by a photorealistic open-world computer game”, and report that “models trained with game data and just 1/3 of the CamVid training set outperform models trained on the complete CamVid training set”. That is a real gain. It was still measured on real images.
Realism should be measured, not assumed from visual appeal.
Steps
Evaluate an augmentation policy as a causal intervention
Treat augmentation changes as experiments with explicit hypotheses.
1. Name the missing variation. Identify the deployment condition the policy is intended to cover. If the condition cannot be named, the recipe is inherited, not chosen. That is how four published geometric recipes ended up on chest X-rays that no scanner produces.
2. Define label transformations. Specify how boxes, masks, keypoints, depth, and metadata change under the operation.
3. Create matched training runs. Hold data split, model, and evaluation protocol constant, so that the only difference is the policy. The 65.9 against 73.7 mAP above is informative precisely because the object placement was identical in both arms.
4. Measure targeted slices. Test the condition the augmentation should improve and the slices it might harm; report both directions.
5. Validate on real evidence. Require gains on independent real samples before accepting the policy. This step now has regulatory weight behind it as well as methodological weight. The US Food and Drug Administration's draft guidance of 7 January 2025 asks sponsors to describe “Data augmentation or synthesis” among the methods applied to inputs and outputs. It also asks them to show that test data are independent of the training data and sequestered from the developers, with the testing data processed only in a way representative of the real-world data the model will meet in use.
1. Name the missing variation
Identify the deployment condition the policy is intended to cover.
2. Define label transformations
Specify how boxes, masks, keypoints, depth, and metadata change.
3. Create matched training runs
Hold data split, model, and evaluation protocol constant.
4. Measure targeted slices
Test the condition the augmentation should improve and slices it might harm.
5. Validate on real evidence
Require gains on independent real samples before accepting the policy.
More synthetic data can reduce real-world performance
If synthetic samples dominate, the model may optimize for their textures, object frequencies, or camera assumptions. Simple ratios such as 50:50 have no universal meaning.
The mechanism has now been measured, in the extreme case where the synthetic data comes from the model's own predecessors. Shumailov and five co-authors reported in Nature in 2024 that “indiscriminate use of model-generated content in training causes irreversible defects in the resulting models, in which tails of the original content distribution disappear”. They found it across large language models, variational autoencoders and Gaussian mixture models. What vanishes first is the rare end of the distribution, which is exactly the part augmentation was supposed to reinforce.
A separate group reached the same conclusion on images. Alemohammad and seven co-authors at Rice University named it Model Autophagy Disorder, and report that quality or diversity decays within a few generations unless enough fresh real data enters each generation. Two independent teams, two model families, the same failure and the same condition on avoiding it.
So tune the mixture using real validation slices and keep the final real test set untouched. Consider curriculum schedules, synthetic pretraining, or targeted oversampling rather than swapping real data out wholesale.
Synthetic volume is useful only when it improves the real deployment claim.
Example
Evidence to include in an augmentation audit
An audit should make the policy reproducible and expose what it was designed to change. In one regulated domain the contents of that audit are no longer a matter of house style.
The US Food and Drug Administration issued draft guidance on AI-enabled device software functions on 7 January 2025. Its section on data collection states: “Synthetic data used in support of a regulatory submission should be accompanied by a comprehensive explanation of how the data were generated and why they are fit-for-purpose.” The same guidance asks sponsors to describe data augmentation or synthesis among the methods applied to inputs and outputs, and to show that test data are independent of training data and sequestered from the developers.
Fit-for-purpose is the operative phrase. It is what the studies in this lesson were each answering with a number.
- Transformation code, versions, parameter distributions, and random-seed policy
- Examples before and after transformation for each annotation type
- Tests confirming coordinate, mask, depth, and visibility updates
- Real-versus-synthetic discrimination results and artifact review, of the kind that separates a 65.9 mAP pipeline from a 73.7 mAP one
- Slice metrics for targeted conditions and possible regressions
- Ablations for each major transform and for the combined policy, plus, for a US marketing submission for an AI-enabled device, the explanation of how any synthetic data were generated and why they are fit-for-purpose
Key takeaways
- Every augmentation encodes an invariance or a controlled change that must be justified: stylizing ImageNet moved the same ResNet-50 from texture to shape, and four geometric recipes on chest X-rays each scored below no augmentation.
- Geometric, photometric, composited, and simulated data have distinct validity and artifact risks; random copy-paste added +3.6 mask AP on rare LVIS categories, and unblended copy-paste cost 8 AP points on GMU Kitchens.
- Annotations must transform consistently with image geometry and visibility.
- Synthetic realism should be evaluated through artifacts, coverage, and real-world transfer: game-generated training data still had to prove itself on real CamVid images.
- Training mixtures should be tuned against real validation slices rather than fixed by convention: recursive training on generated content makes the tails of the original distribution disappear.
- Independent real test data remains necessary when synthetic data expands training coverage, and the FDA's 7 January 2025 draft guidance asks for test data independent of training data and sequestered from the developers.