@glodon-aiot/dataset-annotation 3.24.0-alpha.4 → 3.24.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/DetectionAnnotation/index.mjs +210 -210
- package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +33 -33
- package/dist/es/components/OcrAnnotation/index.mjs +170 -170
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.mjs +169 -149
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +83 -83
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +4 -4
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a, Fragment as O } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as k, useState as r, useContext as se, useEffect as R } from "react";
|
|
3
|
-
import { Modal as w, Button as
|
|
3
|
+
import { Modal as w, Button as m, Tabs as V, Tooltip as ie, Space as ne, message as I } from "antd";
|
|
4
4
|
import "./style.less.mjs";
|
|
5
5
|
import T from "react-json-view";
|
|
6
6
|
import { useKeyPress as j } from "ahooks";
|
|
@@ -16,18 +16,18 @@ const Ce = T.default || T, {
|
|
|
16
16
|
} = V, we = (z) => {
|
|
17
17
|
var x, u, M;
|
|
18
18
|
const {
|
|
19
|
-
mode:
|
|
19
|
+
mode: p = "preview",
|
|
20
20
|
visible: d,
|
|
21
|
-
onClose:
|
|
22
|
-
record:
|
|
23
|
-
onNextClick:
|
|
24
|
-
onPrevClick:
|
|
21
|
+
onClose: C,
|
|
22
|
+
record: f,
|
|
23
|
+
onNextClick: b,
|
|
24
|
+
onPrevClick: v,
|
|
25
25
|
datasetId: i,
|
|
26
26
|
versionId: l,
|
|
27
27
|
ocrMarkTmpl: n,
|
|
28
28
|
handleMarkClick: F,
|
|
29
29
|
updateSampleList: J,
|
|
30
|
-
isPreLabel:
|
|
30
|
+
isPreLabel: h,
|
|
31
31
|
selectSampleId: K,
|
|
32
32
|
onSave: L,
|
|
33
33
|
onPending: B,
|
|
@@ -37,29 +37,29 @@ const Ce = T.default || T, {
|
|
|
37
37
|
onFilterModeChange: U,
|
|
38
38
|
onPaginationChange: W,
|
|
39
39
|
samples: G
|
|
40
|
-
} = z, H = k(null), Q = k({}), [
|
|
40
|
+
} = z, H = k(null), Q = k({}), [g, X] = r("annotation"), [e, Y] = r(), [Z, _] = r(), [y, $] = r([]), [S, N] = r(!1), {
|
|
41
41
|
services: {
|
|
42
42
|
cvforceDatahub: o
|
|
43
43
|
},
|
|
44
44
|
featuresConfig: {
|
|
45
|
-
datasetManager:
|
|
45
|
+
datasetManager: c
|
|
46
46
|
} = {
|
|
47
47
|
datasetManager: !1
|
|
48
48
|
}
|
|
49
49
|
} = se(re);
|
|
50
50
|
j("rightarrow", () => {
|
|
51
|
-
g();
|
|
52
|
-
}), j("leftarrow", () => {
|
|
53
51
|
b();
|
|
52
|
+
}), j("leftarrow", () => {
|
|
53
|
+
v();
|
|
54
54
|
}), R(() => {
|
|
55
55
|
i && (o == null || o.listCategory(i).then((s) => $(s || [])));
|
|
56
56
|
}, [i]), R(() => {
|
|
57
|
-
d && i && l &&
|
|
57
|
+
d && i && l && f && p === "preview" && (o == null || o.getDatasetsIdVersionsVidSsamplesSid(i, l, f.id).then((s) => {
|
|
58
58
|
Y(s);
|
|
59
59
|
}));
|
|
60
|
-
}, [d,
|
|
60
|
+
}, [d, f]);
|
|
61
61
|
const ee = () => {
|
|
62
|
-
|
|
62
|
+
C();
|
|
63
63
|
}, te = (s) => {
|
|
64
64
|
X(s);
|
|
65
65
|
}, ae = (s) => {
|
|
@@ -70,13 +70,13 @@ const Ce = T.default || T, {
|
|
|
70
70
|
content: "删除后不可恢复,请慎重操作",
|
|
71
71
|
onOk: () => {
|
|
72
72
|
!i || !l || !(e != null && e.id) || o == null || o.delDatasetsIdVersionsVidSamplesId(i, l, e.id).then(() => {
|
|
73
|
-
I.success("删除成功"),
|
|
73
|
+
I.success("删除成功"), C(), J();
|
|
74
74
|
}).catch(() => I.error("删除失败"));
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
78
|
return /* @__PURE__ */ t(w, {
|
|
79
|
-
title:
|
|
79
|
+
title: p === "preview" ? /* @__PURE__ */ a("div", {
|
|
80
80
|
children: ["详情", /* @__PURE__ */ a("span", {
|
|
81
81
|
className: "ocr-modal-label-count",
|
|
82
82
|
children: ["标注框数量:", (x = e == null ? void 0 : e.labels) == null ? void 0 : x.length]
|
|
@@ -94,18 +94,18 @@ const Ce = T.default || T, {
|
|
|
94
94
|
maskClosable: !1,
|
|
95
95
|
centered: !0,
|
|
96
96
|
footer: null,
|
|
97
|
-
children:
|
|
97
|
+
children: p === "preview" ? /* @__PURE__ */ a(O, {
|
|
98
98
|
children: [/* @__PURE__ */ a("div", {
|
|
99
99
|
className: "ocr-detail",
|
|
100
100
|
children: [/* @__PURE__ */ a("div", {
|
|
101
101
|
className: "detail-content",
|
|
102
|
-
children: [/* @__PURE__ */ t(
|
|
102
|
+
children: [/* @__PURE__ */ t(m, {
|
|
103
103
|
className: "select-prev",
|
|
104
104
|
icon: /* @__PURE__ */ t(P, {
|
|
105
105
|
type: "icon-zuojiantou"
|
|
106
106
|
}),
|
|
107
107
|
type: "text",
|
|
108
|
-
onClick: () =>
|
|
108
|
+
onClick: () => v()
|
|
109
109
|
}), /* @__PURE__ */ a("div", {
|
|
110
110
|
className: "select-main",
|
|
111
111
|
ref: Q,
|
|
@@ -125,13 +125,13 @@ const Ce = T.default || T, {
|
|
|
125
125
|
ref: H,
|
|
126
126
|
labels: e == null ? void 0 : e.labels
|
|
127
127
|
})]
|
|
128
|
-
}), /* @__PURE__ */ t(
|
|
128
|
+
}), /* @__PURE__ */ t(m, {
|
|
129
129
|
className: "select-next",
|
|
130
130
|
icon: /* @__PURE__ */ t(P, {
|
|
131
131
|
type: "icon-youjiantou"
|
|
132
132
|
}),
|
|
133
133
|
type: "text",
|
|
134
|
-
onClick: () =>
|
|
134
|
+
onClick: () => b()
|
|
135
135
|
})]
|
|
136
136
|
}), n !== "DetectionOCR" && /* @__PURE__ */ a("div", {
|
|
137
137
|
className: "detail-slide",
|
|
@@ -140,7 +140,7 @@ const Ce = T.default || T, {
|
|
|
140
140
|
children: /* @__PURE__ */ a(V, {
|
|
141
141
|
className: "header-tab",
|
|
142
142
|
onChange: te,
|
|
143
|
-
activeKey:
|
|
143
|
+
activeKey: g,
|
|
144
144
|
children: [/* @__PURE__ */ t(D, {
|
|
145
145
|
tab: "标注信息"
|
|
146
146
|
}, "annotation"), /* @__PURE__ */ t(D, {
|
|
@@ -149,16 +149,16 @@ const Ce = T.default || T, {
|
|
|
149
149
|
})
|
|
150
150
|
}), /* @__PURE__ */ a("div", {
|
|
151
151
|
className: "slide-main",
|
|
152
|
-
children: [
|
|
152
|
+
children: [g === "annotation" && /* @__PURE__ */ t(O, {
|
|
153
153
|
children: n === "TableOCR" ? /* @__PURE__ */ t(ce, {
|
|
154
154
|
currentInfer: e == null ? void 0 : e.labels,
|
|
155
155
|
onCellSelect: (s) => ae(s),
|
|
156
156
|
currentCell: Z
|
|
157
157
|
}) : (M = e == null ? void 0 : e.labels) != null && M.length ? /* @__PURE__ */ t(le, {
|
|
158
158
|
labels: e == null ? void 0 : e.labels,
|
|
159
|
-
catagories:
|
|
159
|
+
catagories: y
|
|
160
160
|
}) : "暂无标注信息"
|
|
161
|
-
}),
|
|
161
|
+
}), g === "json" && /* @__PURE__ */ t(Ce, {
|
|
162
162
|
name: !1,
|
|
163
163
|
iconStyle: "square",
|
|
164
164
|
indentWidth: 2,
|
|
@@ -178,18 +178,18 @@ const Ce = T.default || T, {
|
|
|
178
178
|
title: "预标注进行中,请任务完成后再试",
|
|
179
179
|
open: S,
|
|
180
180
|
children: /* @__PURE__ */ a(ne, {
|
|
181
|
-
onMouseEnter: () =>
|
|
182
|
-
onMouseLeave: () =>
|
|
183
|
-
children: [/* @__PURE__ */ t(
|
|
181
|
+
onMouseEnter: () => h && N(!0),
|
|
182
|
+
onMouseLeave: () => N(!1),
|
|
183
|
+
children: [c && c.label && /* @__PURE__ */ t(m, {
|
|
184
184
|
type: "primary",
|
|
185
|
-
disabled: n !== "StructKVCOCR" && n !== "DetectionOCR" ||
|
|
185
|
+
disabled: n !== "StructKVCOCR" && n !== "DetectionOCR" || h,
|
|
186
186
|
onClick: () => F(e == null ? void 0 : e.id),
|
|
187
187
|
children: "标注"
|
|
188
|
-
}),
|
|
188
|
+
}), c && c.delete && /* @__PURE__ */ t(m, {
|
|
189
189
|
danger: !0,
|
|
190
190
|
type: "ghost",
|
|
191
191
|
onClick: oe,
|
|
192
|
-
disabled:
|
|
192
|
+
disabled: h,
|
|
193
193
|
children: "删除数据"
|
|
194
194
|
})]
|
|
195
195
|
})
|
|
@@ -201,10 +201,10 @@ const Ce = T.default || T, {
|
|
|
201
201
|
ocrMarkTmpl: n,
|
|
202
202
|
datasetId: i,
|
|
203
203
|
versionId: l,
|
|
204
|
-
onClose:
|
|
204
|
+
onClose: C,
|
|
205
205
|
onSave: L,
|
|
206
206
|
onPending: B,
|
|
207
|
-
categories:
|
|
207
|
+
categories: y,
|
|
208
208
|
externalFilterMode: E,
|
|
209
209
|
onFilterModeChange: U,
|
|
210
210
|
onPaginationChange: W,
|