From c5aa0524513225f9f37e596411cdd8959dc95155 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sun, 25 Jan 2026 19:00:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(annotation):=20=E6=B7=BB=E5=8A=A0=E5=9B=BE?= =?UTF-8?q?=E5=83=8F=E5=88=86=E7=B1=BB=E5=86=85=E7=BD=AE=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 IMAGE_CLASSIFICATION_LABEL_CONFIG 配置定义 - 添加图像分类内置模板定义,包含 Adult content、Weapons、Violence 分类选项 - 配置图像分类模板的数据类型为图片类型 - 设置图像分类模板的标签配置和样式 - 定义图像分类模板的描述信息和版本信息 --- .../annotation/service/builtin_templates.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/runtime/datamate-python/app/module/annotation/service/builtin_templates.py b/runtime/datamate-python/app/module/annotation/service/builtin_templates.py index 3c3b9e0..7c9ec8b 100644 --- a/runtime/datamate-python/app/module/annotation/service/builtin_templates.py +++ b/runtime/datamate-python/app/module/annotation/service/builtin_templates.py @@ -17,6 +17,15 @@ CATEGORY_COMPUTER_VISION = "computer-vision" STYLE_HORIZONTAL = "horizontal" VERSION_DEFAULT = "1.0.0" +IMAGE_CLASSIFICATION_LABEL_CONFIG = """ + + + + + + +""" + OBJECT_DETECTION_LABEL_CONFIG = """ @@ -57,6 +66,20 @@ class BuiltInTemplateDefinition: BUILT_IN_TEMPLATES: List[BuiltInTemplateDefinition] = [ + BuiltInTemplateDefinition( + id="tpl-image-classification-001", + name="图像分类", + description=( + "对图像进行分类,适用于内容审核、安全检测、社交媒体审核等场景。" + "关联模型:ResNet、EfficientNet、Vision Transformer" + ), + data_type=DATA_TYPE_IMAGE, + labeling_type="image-classification", + label_config=IMAGE_CLASSIFICATION_LABEL_CONFIG, + style=STYLE_HORIZONTAL, + category=CATEGORY_COMPUTER_VISION, + version=VERSION_DEFAULT, + ), BuiltInTemplateDefinition( id="tpl-object-detection-001", name="目标检测(边界框)",