CAS2UML
收藏资源简介:
CAS2UML是由科隆大学创建的一个公开数据集,包含557幅手绘UML类图与活动图,每幅图均配有经过人工验证的可执行PlantUML代码。其中类图271张、活动图286张,数据来源包括复用Piucco数据集及新增手绘样本,并覆盖了多种UML构造和设计模式。数据集创建过程包括定义规范、生成PlantUML参考、手绘图像及验证一致性,最终通过HuggingFace平台发布。该数据集旨在为手绘识别、图像转UML及多模态AI研究提供可重复评估的基准,弥补现有资源缺乏可执行真值的不足。
CAS2UML is a public dataset developed by the University of Cologne. It comprises 557 hand-drawn UML class diagrams and activity diagrams, with each diagram paired with manually validated executable PlantUML code. Specifically, the dataset contains 271 class diagrams and 286 activity diagrams. Its data sources include repurposed samples from the Piucco dataset and newly hand-drawn examples, covering a wide range of UML constructs and design patterns. The dataset creation process includes defining standard specifications, generating reference PlantUML code, creating hand-drawn images, and verifying consistency between the images and the reference code. Finally, the dataset was released via the Hugging Face platform. This dataset aims to provide a reproducible evaluation benchmark for hand-drawn diagram recognition, image-to-UML conversion, and multimodal AI research, addressing the gap that existing resources lack executable ground truth.
数据集概述:CAS2UML
基本信息
- 数据集名称:CAS2UML
- 语言:英语
- 许可证:CC-BY-4.0
- 数据集规模:少于1K样本(n<1K)
- 任务类别:图像到文本(image-to-text)和特征提取(feature-extraction)
数据内容
该数据集包含 557张手绘UML图,分为两类:
- 271张类图(class diagrams)
- 286张活动图(activity diagrams)
每个样本包含四种特征:
- image:手绘图对应的图像(PIL.Image格式)
- type:标注类型(取值为"class_diagram"或"activity_diagram")
- code:对应的真实PlantUML代码
- xmi:对应的真实XMI表示形式
数据划分
数据集包含训练集和测试集两个划分:
| 划分 | 样本数量 | 大小 |
|---|---|---|
| train | 527 | 155,577,424 字节 |
| test | 30 | 8,006,608 字节 |
总下载大小:161,478,504 字节
总数据集大小:163,584,032 字节
相关资源
- 论文:CAS2UML: A Handwritten Sketch-to-PlantUML Dataset for Class and Activity Diagrams
- 代码:https://github.com/Seym0n/handwritten-uml-dataset
使用示例
可通过Hugging Face datasets库直接加载:
python
from datasets import load_dataset
dataset = load_dataset("Seym0n/handwritten_plantuml_dataset") example = dataset["train"][0]
应用领域
该数据集适用于以下方向的研究与应用:
- 手绘图表识别(diagram recognition)
- 软件工程中的UML建模
- 图像到代码的转换任务

- 1CAS2UML: A Handwritten Sketch-to-PlantUML Dataset for Class and Activity Diagrams科隆大学 · 2026年



