pipeline-augmentation
Directory-backed Augmentor Pipeline workflows for folder scanning, class-aware disk augmentation, output control, sampling, status, seeding, and threading.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- pipeline-augmentation
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Directory-backed Augmentor Pipeline workflows for folder scanning, class-aware disk augmentation, output control, sampling, status, seeding, and threading.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/data-layouts.md3.4 KB
- 参考文档references/troubleshooting.md4.7 KB
- 参考文档references/workflows.md5.3 KB
- 脚本scripts/augmentor_pipeline_disk_smoke.py4.1 KB
03 SKILL.md 正文
Pipeline Augmentation
Use this sub-skill when the task is a directory-backed Augmentor.Pipeline workflow: scan image folders, interpret class subfolders, add pipeline-level operations, write augmented samples to disk, process every image once, set output save formats, inspect status, set seeds, or decide whether to disable multithreading.
Fast routing
- For the operation catalog, probability/range validation, or custom
Operationsubclasses, route tooperation-reference. - For ground-truth masks, paired mask directories, or in-memory grouped image/mask arrays, route to
masks-and-arrays. - For Keras-style generators, PyTorch/torchvision transforms, DataFrame input, or framework integration, route to
generators-and-frameworks. - For disk pipeline layout, sampling, output folders, class subfolders, reproducibility, and per-class strategy, stay here and use the bundled references.
Core API facts
- Constructor:
Augmentor.Pipeline(source_directory=None, output_directory="output", save_format=None). - Disk execution:
sample(n, multi_threaded=True)writesnsampled augmented images;process()processes every image once and internally usessample(0, multi_threaded=True). - Output/save controls:
set_save_format(save_format)accepts formats understood by Pillow; pass"auto"to return to per-input extension behavior. - Inspection/control:
status()prints operation/image/class/dimension/format status;set_seed(seed)seeds Pythonrandomand NumPy random state. - Directory switching:
add_further_directory(new_source_directory, new_output_directory="output")reruns the same population path for another source directory; inspectstatus()after calling before assuming what images are active. ImageUtilities.scan()ignores the configured output directory and treats immediate source subdirectories as class labels.
Minimal disk pattern
import Augmentor
p = Augmentor.Pipeline("train_images", output_directory="output")
p.rotate(probability=0.7, max_left_rotation=10, max_right_rotation=10)
p.flip_left_right(probability=0.5)
p.resize(probability=1.0, width=224, height=224)
p.set_save_format("PNG")
p.set_seed(123)
p.sample(500, multi_threaded=False) # deterministic transform order is easiest single-threaded
Use p.process() when each source image should be processed once, usually with every required operation set to probability=1. If exact single-threaded execution matters, prefer p.sample(0, multi_threaded=False).
Bundled references and helper
- Workflows: end-to-end disk recipes,
sample()versusprocess(),add_further_directory(), and per-class augmentation strategy. - Data layouts: class-subfolder scanning, output directory placement, file extensions, and class labels.
- Troubleshooting: empty inputs, output surprises, save-format errors, missing operations, and reproducibility.
- Disk smoke script: generates temporary PIL images, builds a class-aware disk pipeline, samples tiny PNG outputs, and asserts files were written.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).