Train Custom ModelChinese & English

DL Model Organizer

DL Model Organizer manages the deep-learning segmentation models trained by Dragonfly's DeepTrainer from one central library: move them off C: to any drive with space, temporarily attach them back to a given Dragonfly ve

Updated 2026-07-26User manual

DL Model Organizer(深度学习模型管理器)

DL Model Organizer - User Manual

Dragonfly Prototype Apps · DL Model Organizer...

版本 Version 1.0 · 2026-07-26


第一部分 中文手册

目录

1. 简介

2. 功能特点

3. 使用步骤

4. 挂载方式对比

5. 查看训练图像与可视化反馈

6. 环境需求与注意事项

1. 简介

DL Model Organizer(深度学习模型管理器) 用一个「中央模型库」统一管理 Dragonfly DeepTrainer 训练出来的深度学习分割模型:把它们从 C 盘搬到任意有空间的盘,需要时再临时挂载回某个 Dragonfly 版本用于训练/推理,用完再释放 C 盘——并且只保留一份模型,让不同版本按需共享。

背景:DeepTrainer 把每个模型存成一个文件夹(model.ORSModel + data.json + checkpoints),固定放在每个版本各自的 C 盘目录 %LOCALAPPDATA%\comet\Dragonfly<版本>\pythonUserExtensions\PythonPluginExtensions\DeepTrainer\models\ 下。官方没有改变该位置的设置,于是 C 盘容易被吃满(实测单个版本可达数十 GB),而且多个 Dragonfly 版本会各存一份。本插件正是为解决这两件事而生。

适用场景:C 盘被 DeepTrainer 模型占满想搬到别的盘;在多个 Dragonfly 版本(如 2025.1 与 2027.1)之间共享同一批训练好的模型而不想各存一份;训练/推理前临时把需要的模型挂到当前版本、用完再释放空间。

2. 功能特点

  • 中央模型库:设一个库根目录(例如 D:\DragonflyModels),路径会被持久化保存,下次打开自动记住。
  • 跨版本汇总表:自动扫描 C 盘上每个 Dragonfly 版本 + 模型库里的所有模型,每个模型一行,显示名称、来源版本(读自 data.json 的 dragonflyVersion)、大小、是否在库中、最后修改时间、所在版本。
  • 移入模型库(Move to Library):把某版本占用 C 盘的模型移进库,立即释放 C 盘空间。
  • 挂载(Attach →):把库里的模型挂到「目标版本」。默认用 Windows 目录联接(mklink /J)——免管理员、瞬时、几乎不占 C 盘、库里只留一份共享副本;也可改为物理移动(把那一份副本搬进该版本)。
  • 卸载(Detach):从某版本移除。若是联接,只删除联接、库中真身丝毫不动;若是回移的真实文件夹,则搬回库;若是库中已有的重复真实拷贝,二次确认后可删除。
  • 免重启即时刷新:挂载/卸载后,对当前正在运行的这个 Dragonfly 版本会自动调用 refreshModelsList 刷新模型列表,无需重启即可在 AI/DeepTrainer 中看到变化(其它版本下次启动生效)。
  • 批量操作:表格支持 Ctrl/Shift 多选、Ctrl+A 全选;移入库 / 挂载 / 卸载对所有选中行一次性生效,版本不匹配或删除重复副本等确认对整批只询问一次。
  • 搜索、备注、可视化反馈:顶部搜索框可按名称/ID/版本/位置快速筛选;每行有 Notes 按钮编辑随模型迁移的 notes.md;右键某模型可查看训练图像与可视化反馈快照(详见后文)。
  • 空间提示:底部实时显示模型库可用空间(GB)与每个版本占用的可回收空间。

3. 使用步骤

1. 打开 Prototype Apps ▸ Train Custom Model ▸ DL Model Organizer...,弹出可停靠面板。

2. 在 Central model library(中央模型库) 一行点 Browse… 选一个空间充足的盘上的文件夹(例如 D:\DragonflyModels),或直接粘贴路径。该路径会被记住。

3. 在表格里用 Ctrl/Shift 单击选中一个或多个模型(Ctrl+A 全选);表格右侧列会标出每个模型当前所在的版本、大小与是否在库中。

4. 释放 C 盘:选中某版本占用 C 盘的模型,点 Move to Library(移入模型库)——文件被移进库,C 盘立即腾出空间。

5. 挂载回某版本:在 Target version(目标版本) 下拉选好目标版本,选择 Attach mode(挂载方式)(默认 Junction 联接;也可选 Move 物理移动),选中库中模型,点 Attach →。默认联接方式瞬时完成,几乎不占 C 盘。

6. 用完释放:选中某版本里不再需要的模型,点 Detach(卸载);若是联接只删链接,库中真身保留。

7. 挂载/卸载后,当前运行版本的模型列表会自动刷新——可直接在 AI / DeepTrainer 中使用,无需重启 Dragonfly。

底部日志区会逐条记录每次移动/挂载/卸载的动作与结果;顶部状态行给出完成条数与失败条数(失败详情见日志)。

4. 挂载方式对比

Attach(挂载) 时有两种方式,通过面板上的单选按钮选择:

挂载方式

原理

C 盘占用

副本数

卸载效果

Junction 联接(默认)

在版本文件夹里建一个指向库中那一份的 Windows 目录联接(mklink /J,免管理员、瞬时)

几乎为 0

全局只有一份(共享)

只删除联接,库中真身不动

Move 物理移动

把那一份副本从库中物理搬进版本文件夹

占满整份模型大小

仍只有一份(位置改变)

把文件夹搬回库

  • 联接仅适用于同机各 NTFS 盘之间。 网络盘/可移动盘不支持目录联接,请改用 Move 模式。
  • 版本兼容性:2026.1 与 2027.1 视为同一格式(仅改名),互相兼容。当所选模型的来源版本与目标版本不同(且不属于此等价关系)时,会弹出兼容性警告让你确认是否继续。

5. 查看训练图像与可视化反馈

在表格里右键某个模型,选择 Review Training Images and Visual Feedback(查看训练图像与可视化反馈),即可浏览该模型训练过程中保存的可视化反馈快照(模型文件夹内的 visual_feedback_*.ORSObject 文件)。

查看器以灰度显示输入图像,并叠加各类别的彩色分割(预测标签),提供:

  • 快照选择器:按时间戳在训练过程中保存的多个快照之间切换(下拉框 + ◀ 上一个 / 下一个 ▶)。
  • 叠加层控制:选择要显示的预测层,并可勾选/取消「显示叠加」。
  • 预测切片滑块:对三维预测逐切片浏览。
  • 不透明度滑块:调节分割叠加层的透明度;底部有类别颜色图例。
  • Save PNG…:把当前视图另存为 PNG 图片。

右键菜单还提供 Open notes…(打开/编辑该模型的备注)与 Open model folder(在资源管理器中打开模型的真实文件夹)。

6. 环境需求与注意事项

  • 纯进程内运行:无需 venv、无需联网、无需 GPU、无需管理员权限(目录联接 mklink /J 不需要管理员)。安装后重启 Dragonfly 即可在菜单中看到。
  • 仅 Windows / 同机 NTFS:联接只在本机各 NTFS 盘之间有效;网络盘、可移动盘请使用 Move 模式。
  • 安全保护:删除类操作(移除库中已有的重复真实拷贝)有二次确认;卸载联接时只用 os.rmdir 删除联接点本身,绝不会顺着联接把库里的真实文件误删。
  • 备注随模型迁移:notes.md 保存在模型的真实文件夹内(联接会解析到其目标),因此备注始终跟随那一份库副本移动。

本功能由第三方(Prototype Labs / Prototype Apps)提供,并非 Dragonfly 官方开发,Dragonfly 也不提供技术支持;使用风险由使用者自行承担。


Part II English Manual

Contents

1. Introduction

2. Features

3. How to use

4. Attach modes compared

5. Review Training Images and Visual Feedback

6. Requirements & notes

1. Introduction

DL Model Organizer manages the deep-learning segmentation models trained by Dragonfly's DeepTrainer from one central library: move them off C: to any drive with space, temporarily attach them back to a given Dragonfly version for training/inference, then free C: again — while keeping a single copy shared across versions on demand.

Background: DeepTrainer stores each model as a folder (model.ORSModel + data.json + checkpoints) in a fixed per-version C: directory, %LOCALAPPDATA%\comet\Dragonfly<ver>\pythonUserExtensions\PythonPluginExtensions\DeepTrainer\models\. There is no built-in setting to relocate it, so C: fills up (tens of GB per version in practice) and every Dragonfly version keeps its own duplicate. This plugin exists to fix exactly those two problems.

Use it to: reclaim C: when DeepTrainer models fill it; share one set of trained models across multiple Dragonfly versions (e.g. 2025.1 and 2027.1) without duplicating them; and attach the models you need to the current version for a training/inference session, then free the space afterwards.

2. Features

  • Central model library: set one library root (e.g. D:\DragonflyModels); the path is persisted and remembered next time.
  • Cross-version table: scans every Dragonfly version on C: plus the library, one row per model, showing name, origin version (read from data.json's dragonflyVersion), size, whether it is in the library, last-modified time, and which versions it is present in.
  • Move to Library: move a version's C: model into the library, freeing C: immediately.
  • Attach →: place a library model into a chosen target version. By default this uses a Windows directory junction (mklink /J) — no admin, instant, ~0 C: usage, one shared copy kept in the library; or switch to Move to physically relocate the single copy into that version.
  • Detach: remove a model from a version. A junction is just unlinked and the library copy is untouched; a real folder that was move-attached is moved back to the library; a redundant real duplicate already in the library can be deleted after confirmation.
  • Live refresh, no restart: after attach/detach the CURRENTLY running version's model list is auto-refreshed (refreshModelsList), so the change shows in AI/DeepTrainer without a restart (other versions pick it up on next launch).
  • Batch actions: the table supports Ctrl/Shift multi-select and Ctrl+A select-all; Move to Library / Attach / Detach act on every selected row, and each confirmation (version mismatch, deleting duplicates) is asked once for the whole batch.
  • Search, notes, visual feedback: a search box filters by name/ID/version/location; every row has a Notes button editing a notes.md that travels with the model; right-clicking a model opens a training-image visual-feedback viewer (see below).
  • Space hints: the bottom line shows the library's free space (GB) and each version's reclaimable size.

3. How to use

1. Open Prototype Apps ▸ Train Custom Model ▸ DL Model Organizer... to bring up the dockable panel.

2. On the Central model library row, click Browse… and pick a folder on a drive with space (e.g. D:\DragonflyModels), or paste the path. It is remembered.

3. In the table, Ctrl/Shift-click one or more models (Ctrl+A selects all); the right-hand columns show which versions each model lives in, its size, and whether it is in the library.

4. Free C: — select a version's C: model and click Move to Library; the files are moved into the library and C: is freed immediately.

5. Attach back to a version — pick the Target version in the dropdown, choose an Attach mode (Junction by default, or Move), select a library model, and click Attach →. The default junction completes instantly with ~0 C: usage.

6. Free the space when done — select a model no longer needed in a version and click Detach; a junction is just unlinked, and the library copy stays.

7. After attach/detach, the running version's model list auto-refreshes — the model is usable in AI / DeepTrainer with no Dragonfly restart.

The log pane at the bottom records each move/attach/detach action and its result; the status line reports how many succeeded and how many failed (failures detailed in the log).

4. Attach modes compared

Attach offers two modes, chosen with the radio buttons on the panel:

Mode

How it works

C: usage

Copies

On Detach

Junction (default)

creates a Windows directory junction (mklink /J, no admin, instant) in the version folder pointing at the one library copy

~0

one shared copy

removes only the junction; library copy untouched

Move (physical)

physically relocates the single copy from the library into the version folder

the full model size

still one (relocated)

moves the folder back to the library

  • Junctions work between local NTFS drives on the same machine only. Network/removable drives do not support them — use Move mode there.
  • Version compatibility: 2026.1 and 2027.1 are treated as the same format (a rename) and are compatible. Attaching a model whose origin version differs from the target (outside that equivalence) raises a compatibility warning to confirm before proceeding.

5. Review Training Images and Visual Feedback

Right-click a model in the table and choose Review Training Images and Visual Feedback to browse the visual-feedback snapshots saved during that model's training (the visual_feedback_*.ORSObject files inside the model folder).

The viewer shows the input image in grayscale with the per-class predicted segmentation overlaid, and provides:

  • Snapshot selector: switch between the snapshots saved at different timestamps during training (a dropdown plus ◀ Prev / Next ▶).
  • Overlay control: pick which prediction layer to show, and toggle "Show overlay" on/off.
  • Prediction-slice slider: scrub slice by slice through a 3D prediction.
  • Opacity slider: adjust the segmentation overlay's transparency; a class-color legend sits below the image.
  • Save PNG…: save the current view as a PNG image.

The right-click menu also offers Open notes… (open/edit the model's notes) and Open model folder (reveal the model's real folder in Explorer).

6. Requirements & notes

  • Runs purely in-process: no venv, no internet, no GPU, and no admin rights (directory junctions via mklink /J need no admin). After installing, restart Dragonfly to see the menu item.
  • Windows / same-machine NTFS only: junctions only work between local NTFS drives; use Move mode for network or removable drives.
  • Safety: destructive actions (deleting a redundant real duplicate already in the library) require confirmation; detaching a junction uses os.rmdir on the reparse point only, so it can never follow the link and delete the library's real files.
  • Notes travel with the model: notes.md lives inside the model's real folder (a junction is resolved to its target), so notes always follow the single library copy.

This feature is provided by a third party (Prototype Labs / Prototype Apps), not officially developed or supported by Dragonfly. Use at your own risk.

You’ve reached the end of this manual.Explore the library →