Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
97cfd5f
chore(release): 1.4.10 [skip ci]
semantic-release-bot Apr 30, 2025
3a70e2a
chore(release): 1.8.4 [skip ci]
semantic-release-bot Apr 30, 2025
5494ae0
chore(release): 2.4.4 [skip ci]
semantic-release-bot Apr 30, 2025
8780135
chore(release): 5.8.9 [skip ci]
semantic-release-bot Apr 30, 2025
c1de2fd
chore: update frontend package.json version to 5.8.9 [skip ci]
gary-Shen Apr 30, 2025
a38b931
fix(frontend): pre-annotation is higher priority than default options
gary-Shen Apr 30, 2025
b94154c
fix(audio-annotator-react): pre-annotation is higher priority than de…
gary-Shen Apr 30, 2025
9867211
fix(image-annotator-react): pre-annotation is higher priority than de…
gary-Shen Apr 30, 2025
9deba02
update(audio-annotator-react): update
gary-Shen Apr 30, 2025
54f337d
update(image-annotator-react): update
gary-Shen Apr 30, 2025
bae052f
fix(frontend): pre-annotation is higher priority than default options
gary-Shen Apr 30, 2025
a1b3f16
fix(audio-annotator-react): pre-annotation is higher priority than de…
gary-Shen Apr 30, 2025
b325cfa
fix(image-annotator-react): pre-annotation is higher priority than de…
gary-Shen Apr 30, 2025
424a2db
update(audio-annotator-react): update
gary-Shen Apr 30, 2025
d00a72c
update(image-annotator-react): update
gary-Shen Apr 30, 2025
6575807
chore(release): 1.4.11 [skip ci]
semantic-release-bot Apr 30, 2025
50dc0be
chore(release): 1.8.5 [skip ci]
semantic-release-bot Apr 30, 2025
ad65d46
chore(release): 2.4.5 [skip ci]
semantic-release-bot Apr 30, 2025
2e02e98
chore(release): 5.8.10 [skip ci]
semantic-release-bot Apr 30, 2025
5ba904b
chore: update frontend package.json version to 5.8.10 [skip ci]
gary-Shen Apr 30, 2025
83a6c29
fix(frontend): default value onchange
gary-Shen Apr 30, 2025
a358393
fix(audio-annotator-react): default value onchange
gary-Shen Apr 30, 2025
54436a8
fix(components-react): default value onchange
gary-Shen Apr 30, 2025
bdf62e7
fix(image-annotator-react): default value onchange
gary-Shen Apr 30, 2025
72ba586
chore(frontend): merge release
gary-Shen Apr 30, 2025
1e302ac
Merge pull request #661 from opendatalab/fix/default-option
gary-Shen Apr 30, 2025
fd02950
fix(components-react): types
gary-Shen Apr 30, 2025
4959c35
chore(release): 1.5.3 [skip ci]
semantic-release-bot Apr 30, 2025
c51994f
chore(release): 1.8.6 [skip ci]
semantic-release-bot Apr 30, 2025
ad2f768
chore(release): 1.7.11 [skip ci]
semantic-release-bot Apr 30, 2025
f4355f3
chore(release): 2.4.6 [skip ci]
semantic-release-bot Apr 30, 2025
db669fb
chore(release): 1.4.12 [skip ci]
semantic-release-bot Apr 30, 2025
851675e
chore(release): 1.5.3 [skip ci]
semantic-release-bot Apr 30, 2025
6ab4168
chore(release): 5.8.11 [skip ci]
semantic-release-bot Apr 30, 2025
b54eddd
chore: update frontend package.json version to 5.8.11 [skip ci]
gary-Shen Apr 30, 2025
72d796e
fix(frontend): fix pagesize
gary-Shen May 19, 2025
8973699
chore: update frontend package.json version to 5.8.12 [skip ci]
gary-Shen May 19, 2025
ecc5c74
feat(image): add relation annotation tool and line arrow type
gary-Shen Jul 3, 2025
2f95a58
fix(i18n): add relation translation
gary-Shen Jul 3, 2025
5f5c4ef
feat(image-annotator-react): add relation tool
gary-Shen Jul 3, 2025
3b63514
feat(frontend): add relation tool
gary-Shen Jul 3, 2025
570c060
fix(frontend): paginate by data inner id
baymax2099 Jul 3, 2025
072a714
update(image-annotator-react): remove dead code
gary-Shen Jul 10, 2025
7bae522
chore(release): 1.6.0 [skip ci]
semantic-release-bot Jul 10, 2025
be898f7
chore(release): 1.9.0 [skip ci]
semantic-release-bot Jul 10, 2025
5ed53ab
chore(release): 1.6.0 [skip ci]
semantic-release-bot Jul 10, 2025
c054db4
chore(release): 1.8.0 [skip ci]
semantic-release-bot Jul 10, 2025
abdaebf
chore(release): 1.1.0 [skip ci]
semantic-release-bot Jul 10, 2025
3fda996
chore(release): 1.5.0 [skip ci]
semantic-release-bot Jul 10, 2025
2561697
chore(release): 2.5.0 [skip ci]
semantic-release-bot Jul 10, 2025
ed6a50f
chore(release): 1.5.0 [skip ci]
semantic-release-bot Jul 10, 2025
13c692d
chore(release): 5.9.0 [skip ci]
semantic-release-bot Jul 10, 2025
f8e2c65
chore: update frontend package.json version to 5.9.0 [skip ci]
gary-Shen Jul 10, 2025
6967a27
docs(workspace): update readme
gary-Shen Jul 10, 2025
b9a2ee5
Merge branch 'release' of https://github.com/opendatalab/labelU-Kit i…
gary-Shen Jul 10, 2025
68a3425
fix(frontend): fix #245
gary-Shen Aug 11, 2025
a2159af
chore: update frontend package.json version to 5.9.1 [skip ci]
gary-Shen Aug 11, 2025
6ed8ca2
fix: make file extension check case-insensitive in isCorrectFileType
Little-King2022 Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## 特性

- 支持图片 拉框、点、线(包含曲线)、多边形(包含闭合曲线)、立体框标注
- 支持图片 拉框、点、线(包含曲线)、多边形(包含闭合曲线)、立体框,同时支持目标检测之间的关联关系标注
- 支持视频标注
- 支持音频标注
- 原子化模块,可自由组合
Expand Down
2 changes: 1 addition & 1 deletion README_en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

## Features

- Supports 2D bounding box, point, line (spline), cuboid, and polygon (closed-spline) annotation for images
- Supports 2D bounding box, point, line (spline), cuboid, and polygon (closed-spline) and relation (for bbox / polygon) annotation for images
- Supports video annotation
- Supports audio annotation
- Modular components that can be freely combined
Expand Down
16 changes: 8 additions & 8 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "@labelu/frontend",
"version": "5.8.8",
"version": "5.9.1",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.6.2",
"@labelu/i18n": "1.0.6",
"@labelu/audio-annotator-react": "1.8.3",
"@labelu/components-react": "1.7.10",
"@labelu/image": "1.4.0",
"@labelu/i18n": "1.1.0",
"@labelu/audio-annotator-react": "1.9.0",
"@labelu/components-react": "1.8.0",
"@labelu/image": "1.5.0",
"@labelu/formatter": "1.0.2",
"@labelu/image-annotator-react": "2.4.3",
"@labelu/image-annotator-react": "2.5.0",
"@labelu/interface": "1.3.1",
"@labelu/video-annotator-react": "1.4.9",
"@labelu/video-react": "1.5.2",
"@labelu/video-annotator-react": "1.5.0",
"@labelu/video-react": "1.6.0",
"@tanstack/react-query": "^5.0.0",
"antd": "5.10.1",
"axios": "^1.3.4",
Expand Down
11 changes: 6 additions & 5 deletions apps/frontend/src/constants/toolName.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { i18n } from '@labelu/i18n'
import { i18n } from '@labelu/i18n';

import { EAudioToolName, EGlobalToolName, EVideoToolName, ImageToolName } from '@/enums';

Expand All @@ -10,8 +10,9 @@ export const TOOL_NAME: Record<string, string> = {
[ImageToolName.Polygon]: i18n.t('polygon'),
[ImageToolName.Cuboid]: i18n.t('cuboid'),
[ImageToolName.Line]: i18n.t('line'),
[EVideoToolName.VideoSegmentTool]: i18n.t("segment"),
[EVideoToolName.VideoFrameTool]: i18n.t("timestamp"),
[EAudioToolName.AudioSegmentTool]: i18n.t("segment"),
[EAudioToolName.AudioFrameTool]: i18n.t("timestamp"),
[ImageToolName.Relation]: i18n.t('relation'),
[EVideoToolName.VideoSegmentTool]: i18n.t('segment'),
[EVideoToolName.VideoFrameTool]: i18n.t('timestamp'),
[EAudioToolName.AudioSegmentTool]: i18n.t('segment'),
[EAudioToolName.AudioFrameTool]: i18n.t('timestamp'),
};
2 changes: 2 additions & 0 deletions apps/frontend/src/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export enum ImageToolName {
Line = 'lineTool',
/** 立体框 */
Cuboid = 'cuboidTool',
/** 关联关系 */
Relation = 'relationTool',
}

export enum EVideoToolName {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// import { ImageToolName, TOOL_NAME, EVideoToolName, EAudioToolName } from '@labelu/annotation';
import type { FormProps, SelectProps, TabsProps } from 'antd';
import { Popconfirm, Button, Form, Tabs, Select } from 'antd';
import { Popconfirm, Button, Form, Tabs, Select, Tooltip } from 'antd';
import React, { useContext, useEffect, useCallback, useMemo, useState } from 'react';
import _, { cloneDeep, find } from 'lodash-es';
import { PlusOutlined } from '@ant-design/icons';
import { InfoCircleOutlined, PlusOutlined } from '@ant-design/icons';
import { FlexLayout } from '@labelu/components-react';
import { createGlobalStyle } from 'styled-components';
import { useTranslation } from '@labelu/i18n';
Expand All @@ -18,6 +18,7 @@ import { TaskCreationContext } from '../../../taskCreation.context';
import { FancyAttributeList } from './customFancy/ListAttribute.fancy';
import { FancyCategoryAttribute } from './customFancy/CategoryAttribute.fancy';
import lineTemplate from './templates/line.template';
import relationTemplate from './templates/relation.template';
import rectTemplate from './templates/rect.template';
import polygonTemplate from './templates/polygon.template';
import cuboidTemplate from './templates/cuboid.template';
Expand Down Expand Up @@ -47,6 +48,7 @@ const graphicTools = [
ImageToolName.Polygon,
ImageToolName.Line,
ImageToolName.Cuboid,
ImageToolName.Relation,
];
const videoAnnotationTools = [EVideoToolName.VideoSegmentTool, EVideoToolName.VideoFrameTool];
const audioAnnotationTools = [EAudioToolName.AudioSegmentTool, EAudioToolName.AudioFrameTool];
Expand Down Expand Up @@ -91,6 +93,7 @@ const templateMapping: Record<string, any> = {
[ImageToolName.Polygon]: polygonTemplate,
[ImageToolName.Point]: pointTemplate,
[ImageToolName.Cuboid]: cuboidTemplate,
[ImageToolName.Relation]: relationTemplate,
[EGlobalToolName.Tag]: tagTemplate,
[EGlobalToolName.Text]: textTemplate,
[EVideoToolName.VideoSegmentTool]: videoSegmentTemplate,
Expand Down Expand Up @@ -228,11 +231,32 @@ const FormConfig = () => {
},
{
label: t('tools'),
options: _.map(toolOptions, ({ value, label }) => ({
disabled: selectedTools.includes(value),
value: value,
label: <span>{label}</span>,
})),
options: _.map(toolOptions, ({ value, label }) => {
let disabled = selectedTools.includes(value);

if (
!selectedTools.includes('rectTool') &&
!selectedTools.includes('polygonTool') &&
value === 'relationTool'
) {
disabled = true;
}

return {
disabled,
value: value,
label: (
<FlexLayout gap="0.2rem">
{label}
{value === 'relationTool' && (
<Tooltip title={t('relationToolTooltip')}>
<InfoCircleOutlined className="ml-2" />
</Tooltip>
)}
</FlexLayout>
),
};
}),
},
];
}, [selectedTools, task?.media_type, t]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ export default [
field: 'config',
type: 'group',
children: [
{
field: 'attributeConfigurable',
key: 'attributeConfigurable',
type: 'boolean',
hidden: true,
initialValue: true,
},
{
field: 'lineType',
key: 'lineType',
Expand All @@ -38,6 +31,29 @@ export default [
],
},
},
{
field: 'arrowType',
key: 'arrowType',
type: 'enum',
label: i18n.t('arrowType'),
initialValue: 'none',
antProps: {
options: [
{ label: i18n.t('single'), value: 'single' },
{ label: i18n.t('double'), value: 'double' },
{ label: i18n.t('none'), value: 'none' },
],
},
renderFormItem({ antProps, ...props }, form, fullField) {
const lineType = form.getFieldValue([...(fullField as any[]).slice(0, -1), 'lineType']);

if (lineType === 1) {
return null;
}

return <FancyInput {...props} {...antProps} />;
},
},
{
type: 'group',
key: 'pointNum',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { i18n } from '@labelu/i18n';

import type { FancyItemIdentifier } from '@/components/FancyInput/types';
import FancyInput from '@/components/FancyInput';

export default [
{
field: 'tool',
key: 'tool',
type: 'string',
hidden: true,
initialValue: 'relationTool',
},
{
key: 'config',
field: 'config',
type: 'group',
children: [
{
field: 'lineStyle',
key: 'lineStyle',
type: 'enum',
label: i18n.t('lineStyle'),
initialValue: 'dashed',
antProps: {
options: [
{ label: i18n.t('solid'), value: 'solid' },
{ label: i18n.t('dashed'), value: 'dashed' },
{ label: i18n.t('dotted'), value: 'dotted' },
],
},
renderFormItem({ antProps, ...props }, form, fullField) {
const lineType = form.getFieldValue([...(fullField as any[]).slice(0, -1), 'lineType']);

if (lineType === 1) {
return null;
}

return <FancyInput {...props} {...antProps} />;
},
},

{
field: 'arrowType',
key: 'arrowType',
type: 'enum',
label: i18n.t('arrowType'),
initialValue: 'single',
antProps: {
options: [
{ label: i18n.t('single'), value: 'single' },
{ label: i18n.t('double'), value: 'double' },
{ label: i18n.t('none'), value: 'none' },
],
},
renderFormItem({ antProps, ...props }, form, fullField) {
const lineType = form.getFieldValue([...(fullField as any[]).slice(0, -1), 'lineType']);

if (lineType === 1) {
return null;
}

return <FancyInput {...props} {...antProps} />;
},
},
{
field: 'attributes',
key: 'attributes',
type: 'list-attribute',
label: i18n.t('labelConfig'),
initialValue: [
{
color: '#ff6600',
key: i18n.t('label1'),
value: 'label-1',
},
],
},
],
},
] as FancyItemIdentifier[];
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
{
"$ref": "#/definitions/PolygonTool"
},
{
"$ref": "#/definitions/RelationTool"
},
{
"$ref": "#/definitions/CuboidTool"
},
Expand Down Expand Up @@ -323,6 +326,55 @@
},
"required": ["toolName", "result"]
},
"RelationTool": {
"type": "object",
"properties": {
"toolName": {
"type": "string",
"const": "relationTool"
},
"result": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "唯一标识"
},
"sourceId": {
"type": "string",
"description": "起始标注id"
},
"targetId": {
"type": "string",
"description": "目标标注id"
},
"visible": {
"type": "boolean",
"description": "是否可见",
"default": true
},
"attributes": {
"$ref": "#/definitions/Attribute"
},
"order": {
"type": "integer",
"description": "标注顺序",
"minimum": 0
},
"label": {
"type": "string",
"description": "标注标签",
"default": "none"
}
},
"required": ["sourceId", "targetId", "id", "order", "label"]
}
}
},
"required": ["toolName", "result"]
},
"RectTool": {
"type": "object",
"properties": {
Expand Down
Loading
Loading