Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 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
107f353
fix(image, image-annotator-react): 修复浏览器缩放/全屏切换后标注框位置偏移
Mar 18, 2026
0d3f2f8
feat(frontend): add s3 datasrouce and ai annotation
Apr 20, 2026
730d3e4
fix(i18n): update translation
Apr 20, 2026
5cecb43
update(frontend): update ai auto label button
Apr 20, 2026
412915e
update(i18n): update translates
Apr 20, 2026
c84291a
fix(audio-annotator-react): replace noneLabel to input label
Apr 20, 2026
48fe581
fix(image-annotator-react): replace noneLabel to input label
Apr 20, 2026
645ee26
fix(image): replace noneLabel to input label
Apr 20, 2026
e1629a2
Revert "fix(audio-annotator-react): replace noneLabel to input label"
Apr 20, 2026
9063815
update(frontend): batch ai annotation
Apr 20, 2026
0875292
update(i18n): update translates
Apr 20, 2026
9ab6969
update(frontend): update ui
Apr 21, 2026
224ee72
chore(release): 1.6.1 [skip ci]
semantic-release-bot Apr 21, 2026
ccbef3d
chore(release): 1.9.1 [skip ci]
semantic-release-bot Apr 21, 2026
387693c
chore(release): 1.8.1 [skip ci]
semantic-release-bot Apr 21, 2026
1cd60ce
chore(release): 1.1.1 [skip ci]
semantic-release-bot Apr 21, 2026
dc465c7
chore(release): 1.5.1 [skip ci]
semantic-release-bot Apr 21, 2026
290300f
chore(release): 2.5.1 [skip ci]
semantic-release-bot Apr 21, 2026
1fa7c02
chore(release): 1.5.1 [skip ci]
semantic-release-bot Apr 21, 2026
97981ef
chore(release): 1.6.1 [skip ci]
semantic-release-bot Apr 21, 2026
c306261
chore(release): 5.10.0 [skip ci]
semantic-release-bot Apr 21, 2026
f1b8639
chore: update frontend package.json version to 5.10.0 [skip ci]
gary-Shen Apr 21, 2026
8331827
fix(website): build error
Apr 21, 2026
c7da118
chore: update frontend package.json version to 5.10.1 [skip ci]
gary-Shen Apr 21, 2026
88979e6
fix(frontend): add vis3 link to s3 datasource
Apr 21, 2026
99d3b6e
chore: update frontend package.json version to 5.10.2 [skip ci]
gary-Shen Apr 21, 2026
fbf1838
fix(frontend): fix s3 datasource import
Apr 21, 2026
c25486c
fix(i18n): update translation
Apr 21, 2026
34b6c6d
fix(frontend): data export from labelu[276](https://github.com/openda…
Apr 21, 2026
83d6fd4
chore(release): 1.8.2 [skip ci]
semantic-release-bot Apr 21, 2026
b36f653
chore(release): 1.9.2 [skip ci]
semantic-release-bot Apr 21, 2026
2cbe0bf
chore(release): 1.6.2 [skip ci]
semantic-release-bot Apr 21, 2026
f5b2b79
chore(release): 1.1.2 [skip ci]
semantic-release-bot Apr 21, 2026
6a01a4c
chore(release): 2.5.2 [skip ci]
semantic-release-bot Apr 21, 2026
94c486a
chore(release): 1.5.2 [skip ci]
semantic-release-bot Apr 21, 2026
783e137
chore(release): 1.6.2 [skip ci]
semantic-release-bot Apr 21, 2026
c403ea2
chore(release): 5.10.3 [skip ci]
semantic-release-bot Apr 21, 2026
da5c612
chore: update frontend package.json version to 5.10.3 [skip ci]
gary-Shen Apr 21, 2026
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.10.3",
"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.2",
"@labelu/audio-annotator-react": "1.9.2",
"@labelu/components-react": "1.8.2",
"@labelu/image": "1.5.1",
"@labelu/formatter": "1.0.2",
"@labelu/image-annotator-react": "2.4.3",
"@labelu/image-annotator-react": "2.5.2",
"@labelu/interface": "1.3.1",
"@labelu/video-annotator-react": "1.4.9",
"@labelu/video-react": "1.5.2",
"@labelu/video-annotator-react": "1.5.2",
"@labelu/video-react": "1.6.2",
"@tanstack/react-query": "^5.0.0",
"antd": "5.10.1",
"axios": "^1.3.4",
Expand Down
51 changes: 51 additions & 0 deletions apps/frontend/src/api/mutations/datasource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { useMutation, useQueryClient } from '@tanstack/react-query';

import { createDataSource, deleteDataSource, importS3Samples, updateDataSource } from '@/api/services/datasource';
import { datasourceKey } from '@/api/queryKeyFactories/datasource';
import { sampleKey } from '@/api/queryKeyFactories/sample';

import type { CreateDataSourceCommand, ImportS3SamplesCommand, UpdateDataSourceCommand } from '../types';

export function useCreateDataSourceMutation() {
const queryClient = useQueryClient();

return useMutation({
mutationFn: (data: CreateDataSourceCommand) => createDataSource(data),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: datasourceKey.lists() });
},
});
}

export function useUpdateDataSourceMutation(dsId: number) {
const queryClient = useQueryClient();

return useMutation({
mutationFn: (data: UpdateDataSourceCommand) => updateDataSource(dsId, data),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: datasourceKey.lists() });
},
});
}

export function useDeleteDataSourceMutation() {
const queryClient = useQueryClient();

return useMutation({
mutationFn: (dsId: number) => deleteDataSource(dsId),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: datasourceKey.lists() });
},
});
}

export function useImportS3SamplesMutation(taskId: number) {
const queryClient = useQueryClient();

return useMutation({
mutationFn: (data: ImportS3SamplesCommand) => importS3Samples(taskId, data),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: sampleKey.lists() });
},
});
}
11 changes: 11 additions & 0 deletions apps/frontend/src/api/queryKeyFactories/datasource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { ListDataSourcesParams, ListS3ObjectsParams } from '../types';

export const datasourceKey = {
all: ['datasourceKey'] as const,
lists: () => [...datasourceKey.all, 'list'] as const,
list: (filter: ListDataSourcesParams) => [...datasourceKey.lists(), filter] as const,
details: () => [...datasourceKey.all, 'details'] as const,
detail: (id: number) => [...datasourceKey.details(), id] as const,
objects: () => [...datasourceKey.all, 'objects'] as const,
objectList: (filter: ListS3ObjectsParams) => [...datasourceKey.objects(), filter] as const,
};
1 change: 1 addition & 0 deletions apps/frontend/src/api/queryKeyFactories/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './sample';
export * from './task';
export * from './datasource';
58 changes: 58 additions & 0 deletions apps/frontend/src/api/services/datasource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import request from '../request';
import type {
CreateDataSourceCommand,
UpdateDataSourceCommand,
ListDataSourcesParams,
DataSourceListResponse,
DataSourceResponse,
ListS3ObjectsParams,
S3ObjectListResponse,
ImportS3SamplesCommand,
OkResponse,
OkRespCommonDataResp,
OkRespCreateSampleResponse,
} from '../types';

export async function getDataSources({ page, ...params }: ListDataSourcesParams): Promise<DataSourceListResponse> {
return await request.get('/v1/datasources', {
params: {
...params,
page: typeof page === 'undefined' ? 0 : page - 1,
},
});
}

export async function getDataSource(dsId: number): Promise<OkResponse<DataSourceResponse>> {
return await request.get(`/v1/datasources/${dsId}`);
}

export async function createDataSource(data: CreateDataSourceCommand): Promise<OkResponse<DataSourceResponse>> {
return await request.post('/v1/datasources', data);
}

export async function updateDataSource(
dsId: number,
data: UpdateDataSourceCommand,
): Promise<OkResponse<DataSourceResponse>> {
return await request.patch(`/v1/datasources/${dsId}`, data);
}

export async function deleteDataSource(dsId: number): Promise<OkRespCommonDataResp> {
return await request.delete(`/v1/datasources/${dsId}`);
}

export async function listS3Objects({
ds_id,
...params
}: ListS3ObjectsParams): Promise<OkResponse<S3ObjectListResponse>> {
return await request.get(`/v1/datasources/${ds_id}/objects`, {
params,
});
}

export async function importS3Samples(
taskId: number,
data: ImportS3SamplesCommand,
): Promise<OkRespCreateSampleResponse> {
return await request.post(`/v1/tasks/${taskId}/samples/import_s3`, data);
}
107 changes: 65 additions & 42 deletions apps/frontend/src/api/services/samples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import commonController from '@/utils/common';
import request from '../request';
import { getTask } from './task';
import {
type AutoLabelCommand,
type BatchAutoLabelCommand,
type AutoLabelJobResponse,
ExportType,
type DeleteApiV1TasksTaskIdDeleteParams,
type DeleteSampleCommand,
Expand All @@ -11,6 +14,7 @@ import {
type ListByApiV1TasksTaskIdSamplesGetParams,
type OkRespCommonDataResp,
type OkRespCreateSampleResponse,
type OkRespAutoLabelResponse,
type OkRespSampleResponse,
type PatchSampleCommand,
type SampleData,
Expand Down Expand Up @@ -80,61 +84,80 @@ export async function updateSampleAnnotationResult(
);
}

export async function outputSample(taskId: number, sampleIds: number[], activeTxt: ExportType) {
const headers = {} as any;

if (
[
ExportType.MASK,
ExportType.LABEL_ME,
ExportType.YOLO,
ExportType.CSV,
ExportType.XML,
ExportType.TF_RECORD,
ExportType.PASCAL_VOC,
].includes(activeTxt)
) {
headers.responseType = 'blob';
}
export async function autoLabelSample(
taskId: number,
sampleId: number,
body: AutoLabelCommand = {},
): Promise<OkRespAutoLabelResponse> {
return await request.post(`/v1/tasks/${taskId}/samples/${sampleId}/auto_label`, body, {
timeout: 5 * 60 * 1000,
params: {
sample_id: sampleId,
},
});
}

const data = await request.post(
export async function createAutoLabelJob(
taskId: number,
body: BatchAutoLabelCommand = {},
): Promise<{ data: AutoLabelJobResponse }> {
return await request.post(`/v1/tasks/${taskId}/auto_label_job`, body);
}

export async function getAutoLabelJobStatus(taskId: number, jobId: number): Promise<{ data: AutoLabelJobResponse }> {
return await request.get(`/v1/tasks/${taskId}/auto_label_job/${jobId}`);
}

export async function outputSample(taskId: number, sampleIds: number[], activeTxt: ExportType) {
// 1. Create export job
const jobRes = await request.post(
`/v1/tasks/${taskId}/samples/export`,
{
sample_ids: sampleIds,
},
{
params: {
task_id: taskId,
export_type: activeTxt,
},
...headers,
},
{ sample_ids: sampleIds },
{ params: { export_type: activeTxt } },
);
const taskRes = await getTask(taskId);

const blobData = new Blob([JSON.stringify(data)]);
let url = window.URL.createObjectURL(blobData);
const a = document.createElement('a');
let filename = taskRes.data.name;
const jobId = jobRes.data.id;

// 2. Poll until completed
let job = jobRes.data;
while (job.status !== 'COMPLETED' && job.status !== 'FAILED') {
await new Promise((resolve) => setTimeout(resolve, 2000));
const statusRes = await request.get(`/v1/tasks/${taskId}/samples/export/${jobId}`);
job = statusRes.data;
}

if (job.status === 'FAILED') {
commonController.notificationErrorMessage({ message: job.error_message || 'Export failed' }, 3);
return;
}

// 3. Download the exported file
const blob = await request.get(`/v1/tasks/${taskId}/samples/export/${jobId}/download`, {
responseType: 'blob',
});

const taskRes = await getTask(taskId);
let filename = taskRes.data.name || 'export';

switch (activeTxt) {
case ExportType.JSON:
case ExportType.COCO:
filename = filename + '.json';
filename += '.json';
break;
case ExportType.MASK:
case ExportType.CSV:
case ExportType.XML:
case ExportType.LABEL_ME:
case ExportType.YOLO:
case ExportType.TF_RECORD:
case ExportType.PASCAL_VOC:
url = window.URL.createObjectURL(data as any);
filename += '.xml';
break;
default:
filename += '.zip';
break;
}
a.download = filename!;

const url = window.URL.createObjectURL(blob as Blob);
const a = document.createElement('a');
a.href = url;
a.download = filename;
a.click();
window.URL.revokeObjectURL(url);
}

export async function outputSamples(taskId: number, activeTxt: ExportType) {
Expand All @@ -147,7 +170,7 @@ export async function outputSamples(taskId: number, activeTxt: ExportType) {
}

if (sampleIds.length === 0) {
commonController.notificationErrorMessage({ message: '后端返回数据出现问题' }, 1);
commonController.notificationErrorMessage({ message: 'No samples to export' }, 1);
return;
}

Expand Down
Loading