Alex Emaire's Blog

个人归档站

输入关键词搜索全站文章

SmartLabeling

SmartLabeling 是一个 AI 辅助数据标注工具。它把桌面端交互、Python 推理服务和标注导出流程连在一起,用于降低基于图像 mask 的标注成本。

技术栈 Vue 3, TypeScript, Electron, FastAPI, SAM, CLIP
记录重点 Prompt tools, mask generation, export pipeline

项目背景

传统图像标注需要大量手工描边。SmartLabeling 的核心问题是:如何让标注员用更少的点击表达意图,同时保留可撤销、可导出、可继续修正的工程流程。

系统结构

01 Desktop shell

Electron 承载 Vue 前端,并把桌面分发与本地服务流程放进同一个产品形态。

02 Annotation UI

前端管理点、框、类别、mask 叠加和工具状态,让标注行为保持可解释。

03 FastAPI service

Python 服务暴露 prompt、upload、switch image、export 等路由,承接模型和文件操作。

04 Model pipeline

SAM 生成候选 mask,CLIP-style 分类流程辅助把视觉结果映射到类别语义。

05 Export

导出 mask、YAML label 映射和 cache,方便后续训练或检查。

实现笔记

  • Prompt operation state: foreground/background points and boxes are tracked with undo/redo history before regenerating masks.
  • Async model orchestration: mask generation and class inference can run through Python service boundaries instead of blocking UI logic.
  • Export discipline: generated masks and YAML label names are written as explicit project artifacts, not hidden UI state.
  • Desktop packaging path: the repository includes Electron build configuration and keeps the Python `core/` service as part of the packaged file set.

过程中的取舍

  • Local inference gives privacy and control, but increases installation and GPU-runtime complexity.
  • Electron lowers desktop delivery cost, but requires clear separation between renderer interaction and Python service responsibilities.
  • Mask quality should be presented honestly: the browser demo should show saved/static artifacts unless live inference is actually running.

当前状态

  • The repository contains a Vue/Electron frontend, Python FastAPI service, SAM/CLIP model integration files, and desktop packaging configuration.
  • The service layer includes prompt, project, image, mask, CLIP, and export modules, connecting the annotation path from interaction to saved artifacts.
  • 目前还缺少有代表性的界面截图和 mask 示例,现阶段页面主要记录代码结构与流程。

相关入口

想继续了解实现时,可以从这些目录开始:

后续记录

后续会补本地截图或 mask 示例到 `assets/projects/smartlabeling/`,再在本页加入静态 before/after 对比,把标注结果与使用过程记录得更完整。