技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
generators-and-frameworks【数据与研究】Use Augmentor generator APIs, array generators, framework preprocessing callables, torch-style transforms, and DataFramePipeline boundaries without making optional ML frameworks required.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task asks for Augmentor data generators, in-memory array batches, Keras/TensorFlow-style training integration, PyTorch/torchvision-style transforms, or DataFrame-backed image sources.
Pipeline.keras_generator(batch_size, scaled=True, image_data_format="channels_last") from a directory-backed pipeline.Pipeline.keras_generator_from_array(images, labels, batch_size, scaled=True, image_data_format="channels_last") from NumPy-like image arrays.Pipeline.keras_preprocess_func() for a Keras ImageDataGenerator preprocessing callable.Pipeline.torch_transform() for a callable that can be placed in a torchvision transform composition.DataFramePipeline(source_dataframe, image_col, category_col, output_directory="output", save_format=None) and its pandas compatibility boundary.Pipeline(...), sample(...), output directories, class-folder scanning, or save formats, use the pipeline-augmentation sub-skill.DataPipeline in-memory grouped images/masks and mask-safe array augmentation, use the masks-and-arrays sub-skill.operation-reference sub-skill.keras_generator, keras_generator_from_array, keras_preprocess_func, and torch_transform do not import Keras, TensorFlow, torch, or torchvision by themselves.scaled=True converts image batches to float32 and divides pixel values by 255. scaled=False keeps unscaled image array values.image_data_format="channels_last" for (batch, height, width, channels) and "channels_first" for (batch, channels, height, width).keras_generator_from_array requires len(images) == len(labels) and raises IndexError if they differ.DataFramePipeline requires pandas, but this repository version calls Categorical.get_values(), which is missing in pandas 1.5.3 and 3.0.5. Treat DataFramePipeline as an optional legacy surface unless the user pins/patches it.torch_transform() without torchvision, and optionally checks DataFramePipeline.channels_last or channels_first.scaled=True) or raw pixel values (scaled=False).Categorical.get_values() issue and prefer ordinary Pipeline/DataPipeline, pinning/patching, or maintaining a patched scan_dataframe.