Pipeline overview¶
A study runs through the stages below. Every stage reads its inputs from the study repository and writes its results back, so stages can run in separate processes and a study can be continued at any point. The quick start shows all calls in order.
| # | Stage | Call | Result | Guide |
|---|---|---|---|---|
| 1 | Ingest | generator.ingest_dataset(dataloader) |
originals, classified as anomalous or control | Input data |
| 2 | Extraction | generator.extract_anomalies() |
real anomaly cutouts, masks and ROIs | Extraction |
| 3 | Training | generator.train_generator() |
trained generator checkpoints | Generator training |
| 4 | Generation | generator.generate_synthetic_anomalies() |
synthetic variants of every real anomaly | Synthetic variants |
| 5 | Planning | generator.plan_hybrid_samples() |
hybrid and placement records | Hybrid planning |
| 6 | Fusion | generator.materialize_hybrid_samples() |
hybrid images and label masks | Fusion |
| 7 | Postprocessing (optional) | generator.postprocess_hybrid_samples() |
accept/reject decision per hybrid | Postprocessing |
| 8 | Evaluation (optional) | evaluate_study(config) |
metric differences and outliers | Evaluation |
generator is a HybridDataGenerator(config). Only ingest takes the source
dataloader; all later stages select their inputs by database fields. The
generator model is the only in-memory component: load it with
generator.load_generator() before stage 4 when stage 3 ran in an earlier
process.
Each stage is configured by its own section of
Configuration:
| Stage | Configuration section |
|---|---|
| Extraction | config.extraction |
| Training | config.training, config.model, config.augmentation |
| Generation | config.generation, config.augmentation.mask_transforms |
| Planning | config.matching |
| Fusion | config.fusion |
| Postprocessing | config.postprocessing |
| Evaluation | config.evaluation |
The results can be inspected at any stage in the study browser. Terms such as control, cutout or placement are defined in the glossary.