这是一个为 Eagle 素材管理软件 开发的插件,旨在帮助用户快速构建 机器学习/深度学习训练数据集(如 Stable Diffusion LoRA, YOLO, 图像分类等)。
它可以将 Eagle 中选中的图像与对应的元数据(注释/标签)批量导出为一一对应的文件对。插件内置了针对深度学习优化的图像缩放、补边(Padding)和裁剪(Crop)逻辑,无需使用 Python 脚本二次处理。
- 图文成对导出:自动生成同名的图像和文本文件(例如
0001.jpg+0001.txt)。 - 分辨率对齐 (Stride Alignment):自动调整图像尺寸,使其长宽严格符合指定的倍数(如 32 或 64 像素倍数)。这对神经网络(如 ResNet, YOLO)非常重要,可避免推理报错。
- 3 种缩放模式:
- 填充至正方形 (Pad Square):强制输出正方形图像(如 1024x1024),保持原图比例,不足处填充背景色。适合目标检测 (YOLO)。
- 自适应补边 (Pad Adaptive):保持原图长宽比,仅在边缘进行微量填充以凑齐分辨率倍数。
- 裁剪去黑边 (Crop/Cover):等比缩放并居中裁剪,确保填满画布且无黑边。适合生成式 AI (LoRA/StyleGAN) 训练。
- 灵活的文本来源:可选择将 Eagle 的 注释、描述、标签 或 标题 导出为标签文件。
- 高度客制化:支持自定义背景色、输出格式 (JPG/PNG/WebP) 以及自动重命名规则 (序列号/原名/ID)。
本插件已打包为 .eagleplugin 格式,安装非常简单:
- 在 Releases 页面 下载最新版本的
.eagleplugin文件。 - 双击 下载的文件。
- Eagle 软件会自动弹出安装确认窗口,点击“安装”即可。
- 安装完成后,您可以在 Eagle 的“插件”菜单中找到它。
- 在 Eagle 图片列表中选中需要导出的图片(支持按住 Shift/Ctrl 多选)。
- 点击 导出训练集 插件图标。
- 选择导出目录:设置文件保存位置。
- 配置参数:
- 长边限制:例如
1024。设为0代表不缩放。 - 缩放模式:按需选择 Pad(补黑边)或 Crop(裁剪)。
- 分辨率倍数:例如
32。输出的宽高将自动调整为 32 的倍数。
- 长边限制:例如
- 点击 开始导出。
A plugin for Eagle App designed to streamline the creation of Machine Learning Datasets (e.g., for Stable Diffusion LoRA, YOLO, Image Classification).
It allows you to batch export selected images along with their metadata (annotations/tags) as paired .txt files. It features advanced resizing, padding, and cropping logic to ensure images meet specific resolution requirements (like stride alignment) without manual preprocessing.
- Batch Export: Export images and text files in pairs (e.g.,
0001.jpg+0001.txt). - Resolution Alignment: Automatically resize images so their dimensions are multiples of a specific number (e.g., 32, 64). Crucial for CNN architectures (ResNet, YOLO) to avoid inference errors.
- 3 Resizing Modes:
- Pad to Square: Force output to a square (e.g., 1024x1024) with background padding. Great for object detection models.
- Pad Adaptive: Keep original aspect ratio, but pad edges slightly to match the resolution multiple.
- Crop (Cover): Scale and center crop to fill the target resolution without any black borders. Great for generative AI training.
- Text Source Selection: Use Eagle's Annotation, Description, Tags, or Name as the dataset label.
- Customization: Configurable background color, output format (JPG/PNG/WebP), and filename sequence.
The plugin is packaged as an .eagleplugin file for one-click installation:
- Download the latest
.eaglepluginfile from the Releases page. - Double-click the downloaded file.
- Eagle App will prompt you to confirm installation. Click Install.
- Once installed, you can find it in the Eagle "Plugins" menu.
- Select the images you want to export in Eagle (hold
ShiftorCtrl/Cmdfor multiple selection). - Click the ML Dataset Export plugin icon.
- Select Output Directory: Choose where to save the dataset.
- Configure Parameters:
- Max Side: e.g.,
1024. Set0for no scaling. - Resize Mode: Choose between Pad or Crop.
- Multiple: e.g.,
32. (Output W/H will be divisible by 32).
- Max Side: e.g.,
- Click Start Export.
MIT License

