Skip to content

someone97421/Eagle-Dataset-Export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eagle ML Dataset Export Plugin (Eagle 机器学习数据集导出插件)

中文 | English


🇨🇳 中文说明

这是一个为 Eagle 素材管理软件 开发的插件,旨在帮助用户快速构建 机器学习/深度学习训练数据集(如 Stable Diffusion LoRA, YOLO, 图像分类等)。

它可以将 Eagle 中选中的图像与对应的元数据(注释/标签)批量导出为一一对应的文件对。插件内置了针对深度学习优化的图像缩放、补边(Padding)和裁剪(Crop)逻辑,无需使用 Python 脚本二次处理。

PixPin_2026-01-30_12-29-21

PixPin_2026-01-30_12-28-59

✨ 核心功能

  • 图文成对导出:自动生成同名的图像和文本文件(例如 0001.jpg + 0001.txt)。
  • 分辨率对齐 (Stride Alignment):自动调整图像尺寸,使其长宽严格符合指定的倍数(如 3264 像素倍数)。这对神经网络(如 ResNet, YOLO)非常重要,可避免推理报错。
  • 3 种缩放模式
    1. 填充至正方形 (Pad Square):强制输出正方形图像(如 1024x1024),保持原图比例,不足处填充背景色。适合目标检测 (YOLO)。
    2. 自适应补边 (Pad Adaptive):保持原图长宽比,仅在边缘进行微量填充以凑齐分辨率倍数。
    3. 裁剪去黑边 (Crop/Cover):等比缩放并居中裁剪,确保填满画布且无黑边。适合生成式 AI (LoRA/StyleGAN) 训练。
  • 灵活的文本来源:可选择将 Eagle 的 注释描述标签标题 导出为标签文件。
  • 高度客制化:支持自定义背景色、输出格式 (JPG/PNG/WebP) 以及自动重命名规则 (序列号/原名/ID)。

🚀 安装指南

本插件已打包为 .eagleplugin 格式,安装非常简单:

  1. Releases 页面 下载最新版本的 .eagleplugin 文件。
  2. 双击 下载的文件。
  3. Eagle 软件会自动弹出安装确认窗口,点击“安装”即可。
  4. 安装完成后,您可以在 Eagle 的“插件”菜单中找到它。

🛠 使用方法

  1. 在 Eagle 图片列表中选中需要导出的图片(支持按住 Shift/Ctrl 多选)。
  2. 点击 导出训练集 插件图标。
  3. 选择导出目录:设置文件保存位置。
  4. 配置参数
    • 长边限制:例如 1024。设为 0 代表不缩放。
    • 缩放模式:按需选择 Pad(补黑边)或 Crop(裁剪)。
    • 分辨率倍数:例如 32。输出的宽高将自动调整为 32 的倍数。
  5. 点击 开始导出

🇬🇧 English Description

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.

✨ Key Features

  • 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:
    1. Pad to Square: Force output to a square (e.g., 1024x1024) with background padding. Great for object detection models.
    2. Pad Adaptive: Keep original aspect ratio, but pad edges slightly to match the resolution multiple.
    3. 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.

🚀 Installation

The plugin is packaged as an .eagleplugin file for one-click installation:

  1. Download the latest .eagleplugin file from the Releases page.
  2. Double-click the downloaded file.
  3. Eagle App will prompt you to confirm installation. Click Install.
  4. Once installed, you can find it in the Eagle "Plugins" menu.

🛠 Usage

  1. Select the images you want to export in Eagle (hold Shift or Ctrl/Cmd for multiple selection).
  2. Click the ML Dataset Export plugin icon.
  3. Select Output Directory: Choose where to save the dataset.
  4. Configure Parameters:
    • Max Side: e.g., 1024. Set 0 for no scaling.
    • Resize Mode: Choose between Pad or Crop.
    • Multiple: e.g., 32. (Output W/H will be divisible by 32).
  5. Click Start Export.

License

MIT License

About

这是一个为 [Eagle 素材管理软件](https://cn.eagle.cool/) 开发的插件,旨在帮助用户快速构建 **机器学习/深度学习训练数据集**(如 Stable Diffusion LoRA, YOLO, 图像分类等)。

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors