PerturbationChain
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- class PerturbationChain(steps: Sequence[ImagePerturbation])[source]
Bases:
objectApply several image perturbations in sequence to one subject.
- Parameters:
steps – Perturbations applied in the given order; each receives the output of the previous one. At least one step is required.
- __init__(steps: Sequence[ImagePerturbation]) None[source]
- __call__(subject: Subject, *, rng: Generator) Subject[source]
Return a copy of
subjectwith every step applied in order.- Parameters:
subject – Subject to perturb.
rng – Random generator shared by all stochastic steps, so one seed defines the whole simulated retest.
- Returns:
The perturbed subject copy.