You've already forked DataMate
feat(annotation): 添加图像分类内置模板
- 新增 IMAGE_CLASSIFICATION_LABEL_CONFIG 配置定义 - 添加图像分类内置模板定义,包含 Adult content、Weapons、Violence 分类选项 - 配置图像分类模板的数据类型为图片类型 - 设置图像分类模板的标签配置和样式 - 定义图像分类模板的描述信息和版本信息
This commit is contained in:
@@ -17,6 +17,15 @@ CATEGORY_COMPUTER_VISION = "computer-vision"
|
||||
STYLE_HORIZONTAL = "horizontal"
|
||||
VERSION_DEFAULT = "1.0.0"
|
||||
|
||||
IMAGE_CLASSIFICATION_LABEL_CONFIG = """<View>
|
||||
<Image name=\"image\" value=\"$image\"/>
|
||||
<Choices name=\"choice\" toName=\"image\">
|
||||
<Choice value=\"Adult content\"/>
|
||||
<Choice value=\"Weapons\" />
|
||||
<Choice value=\"Violence\" />
|
||||
</Choices>
|
||||
</View>"""
|
||||
|
||||
OBJECT_DETECTION_LABEL_CONFIG = """<View>
|
||||
<Image name=\"image\" value=\"$image\"/>
|
||||
<RectangleLabels name=\"label\" toName=\"image\">
|
||||
@@ -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="目标检测(边界框)",
|
||||
|
||||
Reference in New Issue
Block a user