@glodon-aiot/dataset-annotation 3.25.1-alpha.7 → 3.26.0-alpha.4
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/dataset-annotation.js +123598 -0
- package/dist/dataset-annotation.umd.cjs +1017 -0
- package/dist/es/components/DetectionAnnotation/index.mjs +529 -535
- package/dist/es/components/OCRImageViewer/index.mjs +117 -130
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +65 -65
- package/dist/es/components/OcrAnnotation/OCRBoxDetail/index.mjs +92 -94
- package/dist/es/index.mjs +15 -21
- package/dist/example/DatasetAnnotationDemo.d.ts +3 -0
- package/dist/example/DemoTabs.d.ts +3 -0
- package/dist/example/DetectionDatasetDemo.d.ts +5 -0
- package/dist/example/DetectionImageDemo.d.ts +5 -0
- package/dist/example/OcrDatasetDemo.d.ts +5 -0
- package/dist/example/OcrImageDemo.d.ts +5 -0
- package/dist/example/OcrkvcDatasetDemo.d.ts +5 -0
- package/dist/example/constant.local.d.ts +6 -0
- package/dist/example/index.d.ts +1 -0
- package/dist/lib/index.js +4 -37
- package/dist/src/components/OCRImageViewer/index.d.ts +0 -1
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/ImageDetail/index.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +21 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LableEditor.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/index.d.ts +19 -0
- package/dist/src/index.d.ts +0 -6
- package/dist/src/utils/reactCompatibility.d.ts +5 -0
- package/package.json +2 -2
- package/dist/es/_virtual/_commonjsHelpers.mjs +0 -8
- package/dist/es/_virtual/dayjs.min.mjs +0 -4
- package/dist/es/components/VersionCompare/VersionCompareSelectModal/index.mjs +0 -122
- package/dist/es/components/VersionCompare/adapter.mjs +0 -215
- package/dist/es/components/VersionCompare/components/DataChangeStatsCard.mjs +0 -68
- package/dist/es/components/VersionCompare/components/DiffValue.mjs +0 -31
- package/dist/es/components/VersionCompare/components/LabelComparisonCard.mjs +0 -130
- package/dist/es/components/VersionCompare/components/ModifiedSampleCompareModal.mjs +0 -207
- package/dist/es/components/VersionCompare/components/SampleChangeDetailsCard.mjs +0 -160
- package/dist/es/components/VersionCompare/components/SingleSampleDetailModal.mjs +0 -165
- package/dist/es/components/VersionCompare/components/VersionCompareHeader.mjs +0 -106
- package/dist/es/components/VersionCompare/components/VersionOverviewCard.mjs +0 -70
- package/dist/es/components/VersionCompare/index.mjs +0 -416
- package/dist/es/components/VersionCompare/mock.mjs +0 -571
- package/dist/es/components/VersionCompare/style.less.mjs +0 -4
- package/dist/es/components/VersionCompare/utils/labelColors.mjs +0 -45
- package/dist/es/createDatasetVersionCompare/index.mjs +0 -124
- package/dist/es/node_modules/dayjs/dayjs.min.mjs +0 -324
- package/dist/src/components/VersionCompare/VersionCompareSelectModal/index.d.ts +0 -16
- package/dist/src/components/VersionCompare/adapter.d.ts +0 -50
- package/dist/src/components/VersionCompare/components/DataChangeStatsCard.d.ts +0 -9
- package/dist/src/components/VersionCompare/components/DiffValue.d.ts +0 -23
- package/dist/src/components/VersionCompare/components/LabelComparisonCard.d.ts +0 -12
- package/dist/src/components/VersionCompare/components/ModifiedSampleCompareModal.d.ts +0 -48
- package/dist/src/components/VersionCompare/components/SampleChangeDetailsCard.d.ts +0 -21
- package/dist/src/components/VersionCompare/components/SingleSampleDetailModal.d.ts +0 -46
- package/dist/src/components/VersionCompare/components/VersionCompareHeader.d.ts +0 -13
- package/dist/src/components/VersionCompare/components/VersionOverviewCard.d.ts +0 -9
- package/dist/src/components/VersionCompare/index.d.ts +0 -34
- package/dist/src/components/VersionCompare/mock.d.ts +0 -25
- package/dist/src/components/VersionCompare/types.d.ts +0 -75
- package/dist/src/components/VersionCompare/utils/labelColors.d.ts +0 -13
- package/dist/src/createDatasetVersionCompare/index.d.ts +0 -26
|
@@ -1,571 +0,0 @@
|
|
|
1
|
-
import { SubsectionStatus as k } from "@glodon-aiot/apis";
|
|
2
|
-
const o = (i, a, l, n) => [[i, a], [i + l, a], [i + l, a + n], [i, a + n]], p = (i, a, l, n) => {
|
|
3
|
-
const d = n === "detection" ? "#1e293b" : "#f8fafc", r = n === "detection" ? "#334155" : "#e2e8f0", u = n === "detection" ? "#f8fafc" : "#1e293b", b = n === "detection" ? "#94a3b8" : "#475569", $ = n === "detection" ? `
|
|
4
|
-
<rect x="110" y="150" width="180" height="280" rx="12" fill="#475569" stroke="${l}" stroke-width="2" stroke-dasharray="6 4" />
|
|
5
|
-
<circle cx="200" cy="115" r="34" fill="#fbbf24" />
|
|
6
|
-
<rect x="370" y="190" width="220" height="240" rx="12" fill="#475569" stroke="#38bdf8" stroke-width="2" stroke-dasharray="6 4" />
|
|
7
|
-
<circle cx="480" cy="155" r="32" fill="#f97316" />
|
|
8
|
-
<rect x="630" y="280" width="110" height="150" rx="8" fill="#64748b" />
|
|
9
|
-
` : `
|
|
10
|
-
<rect x="80" y="100" width="640" height="420" rx="6" fill="#ffffff" stroke="#cbd5e1" stroke-width="2" />
|
|
11
|
-
<rect x="120" y="140" width="320" height="44" rx="4" fill="#f1f5f9" />
|
|
12
|
-
<text x="135" y="168" font-family="sans-serif" font-size="20" font-weight="600" fill="#0f172a">工程图纸编号:GB-2026-OCR</text>
|
|
13
|
-
<rect x="120" y="210" width="540" height="40" rx="4" fill="#f1f5f9" />
|
|
14
|
-
<text x="135" y="236" font-family="sans-serif" font-size="18" fill="#334155">构件规格:HRB400E Φ25@150 抗震等级一级</text>
|
|
15
|
-
<rect x="120" y="280" width="460" height="40" rx="4" fill="#f1f5f9" />
|
|
16
|
-
<text x="135" y="306" font-family="sans-serif" font-size="18" fill="#334155">施工部位:二层核心筒剪力墙 WZ-03</text>
|
|
17
|
-
<rect x="120" y="350" width="380" height="40" rx="4" fill="#f1f5f9" />
|
|
18
|
-
<text x="135" y="376" font-family="sans-serif" font-size="18" fill="#334155">检验结论:外观及尺寸复核合格</text>
|
|
19
|
-
<rect x="490" y="420" width="190" height="60" rx="4" fill="#fef2f2" stroke="#fca5a5" />
|
|
20
|
-
<text x="510" y="456" font-family="sans-serif" font-size="18" font-weight="600" fill="#dc2626">质检签章区域</text>
|
|
21
|
-
`, y = `<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600">
|
|
22
|
-
<defs>
|
|
23
|
-
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
24
|
-
<stop offset="0%" stop-color="${d}" />
|
|
25
|
-
<stop offset="100%" stop-color="${r}" />
|
|
26
|
-
</linearGradient>
|
|
27
|
-
</defs>
|
|
28
|
-
<rect width="800" height="600" fill="url(#bg)" />
|
|
29
|
-
${$}
|
|
30
|
-
<rect x="24" y="20" width="752" height="56" rx="8" fill="rgba(15, 23, 42, 0.72)" />
|
|
31
|
-
<text x="44" y="54" font-family="sans-serif" font-size="20" font-weight="bold" fill="#ffffff">${i}</text>
|
|
32
|
-
<text x="756" y="54" text-anchor="end" font-family="sans-serif" font-size="15" fill="#cbd5e1">${a}</text>
|
|
33
|
-
<text x="40" y="572" font-family="sans-serif" font-size="14" fill="${b}">分辨率: 800 × 600 | 场景: ${n === "detection" ? "物体检测 (Detection)" : "OCR检测 (DetectionOCR)"}</text>
|
|
34
|
-
<circle cx="750" cy="566" r="8" fill="${l}" />
|
|
35
|
-
<text x="732" y="571" text-anchor="end" font-family="sans-serif" font-size="13" fill="${u}">Mock Sample</text>
|
|
36
|
-
</svg>`;
|
|
37
|
-
return `data:image/svg+xml;utf8,${encodeURIComponent(y)}`;
|
|
38
|
-
}, g = (i) => {
|
|
39
|
-
const {
|
|
40
|
-
id: a,
|
|
41
|
-
versionId: l,
|
|
42
|
-
fileKey: n,
|
|
43
|
-
fileName: d,
|
|
44
|
-
imageUrl: r,
|
|
45
|
-
labels: u,
|
|
46
|
-
isLabeled: b = u.length > 0,
|
|
47
|
-
confirmStatus: $ = 0
|
|
48
|
-
} = i;
|
|
49
|
-
return {
|
|
50
|
-
id: a,
|
|
51
|
-
versionId: l,
|
|
52
|
-
fileKey: n,
|
|
53
|
-
fileName: d,
|
|
54
|
-
fileUrl: r,
|
|
55
|
-
thumbnailUrl: r,
|
|
56
|
-
labels: u,
|
|
57
|
-
isLabeled: b,
|
|
58
|
-
confirmStatus: $,
|
|
59
|
-
createdAt: "2026-10-10 10:00:00",
|
|
60
|
-
updatedAt: "2026-10-11 18:30:00",
|
|
61
|
-
creator: "系统管理员",
|
|
62
|
-
modifier: "系统管理员",
|
|
63
|
-
ocrJson: null,
|
|
64
|
-
textContent: {
|
|
65
|
-
instruction: "",
|
|
66
|
-
input: "",
|
|
67
|
-
output: ""
|
|
68
|
-
},
|
|
69
|
-
charactersCount: 0,
|
|
70
|
-
fileSize: 204800,
|
|
71
|
-
statusSubsection: k.success,
|
|
72
|
-
countSubsection: 0,
|
|
73
|
-
recordId: `rec-${a}`,
|
|
74
|
-
metadata: {
|
|
75
|
-
fileName: d,
|
|
76
|
-
oriUrl: r
|
|
77
|
-
},
|
|
78
|
-
sampleFileName: {
|
|
79
|
-
name: d,
|
|
80
|
-
oriSize: 204800,
|
|
81
|
-
originalName: d
|
|
82
|
-
},
|
|
83
|
-
operator: {
|
|
84
|
-
creatorName: "系统管理员",
|
|
85
|
-
creatorUserName: "admin",
|
|
86
|
-
updaterName: "系统管理员",
|
|
87
|
-
updaterUserName: "admin"
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
}, T = [{
|
|
91
|
-
id: "ver-v1",
|
|
92
|
-
no: "V1",
|
|
93
|
-
datasetId: "mock-dataset-detection",
|
|
94
|
-
samplesCount: 100,
|
|
95
|
-
samplesSizeKb: 20480,
|
|
96
|
-
createdAt: 1760064e6,
|
|
97
|
-
updatedAt: 1760064e6,
|
|
98
|
-
description: "初始基线版本",
|
|
99
|
-
parentId: "",
|
|
100
|
-
freezeHistory: !1,
|
|
101
|
-
creator: "张三",
|
|
102
|
-
modifier: "张三",
|
|
103
|
-
subsectionCount: 0,
|
|
104
|
-
subsectionFiles: [],
|
|
105
|
-
unSubsectionFiles: [],
|
|
106
|
-
effectSamCount: 98,
|
|
107
|
-
versionAsyncTask: {},
|
|
108
|
-
qaTemplate: []
|
|
109
|
-
}, {
|
|
110
|
-
id: "ver-v2",
|
|
111
|
-
no: "V2",
|
|
112
|
-
datasetId: "mock-dataset-detection",
|
|
113
|
-
samplesCount: 106,
|
|
114
|
-
samplesSizeKb: 21504,
|
|
115
|
-
createdAt: 17601504e5,
|
|
116
|
-
updatedAt: 17601504e5,
|
|
117
|
-
description: "补充夜间施工样本",
|
|
118
|
-
parentId: "ver-v1",
|
|
119
|
-
freezeHistory: !1,
|
|
120
|
-
creator: "张三",
|
|
121
|
-
modifier: "张三",
|
|
122
|
-
subsectionCount: 0,
|
|
123
|
-
subsectionFiles: [],
|
|
124
|
-
unSubsectionFiles: [],
|
|
125
|
-
effectSamCount: 104,
|
|
126
|
-
versionAsyncTask: {},
|
|
127
|
-
qaTemplate: []
|
|
128
|
-
}, {
|
|
129
|
-
id: "ver-v3",
|
|
130
|
-
no: "V3",
|
|
131
|
-
datasetId: "mock-dataset-detection",
|
|
132
|
-
samplesCount: 113,
|
|
133
|
-
samplesSizeKb: 23552,
|
|
134
|
-
createdAt: 176020896e4,
|
|
135
|
-
updatedAt: 176020896e4,
|
|
136
|
-
description: "修正漏标与新增塔吊视角样本",
|
|
137
|
-
parentId: "ver-v2",
|
|
138
|
-
freezeHistory: !1,
|
|
139
|
-
creator: "李四",
|
|
140
|
-
modifier: "李四",
|
|
141
|
-
subsectionCount: 0,
|
|
142
|
-
subsectionFiles: [],
|
|
143
|
-
unSubsectionFiles: [],
|
|
144
|
-
effectSamCount: 112,
|
|
145
|
-
versionAsyncTask: {},
|
|
146
|
-
qaTemplate: []
|
|
147
|
-
}], B = {
|
|
148
|
-
"ver-v1": "V1",
|
|
149
|
-
"ver-v2": "V2",
|
|
150
|
-
"ver-v3": "V3",
|
|
151
|
-
v1: "V1",
|
|
152
|
-
v2: "V2",
|
|
153
|
-
v3: "V3"
|
|
154
|
-
}, v = (i, a) => i ? B[i] || (i.toUpperCase().startsWith("V") ? i.toUpperCase() : a) : a, N = (i, a, l) => {
|
|
155
|
-
const n = v(a, "V1"), d = v(l, "V3");
|
|
156
|
-
if (i === "ocr") {
|
|
157
|
-
const C = Array.from({
|
|
158
|
-
length: 15
|
|
159
|
-
}, (m, t) => {
|
|
160
|
-
const s = `ocr_blueprint_added_${String(t + 1).padStart(3, "0")}.png`, f = `mock/ocr/added/${s}`, S = t === 2, _ = S ? [] : [{
|
|
161
|
-
id: `ocr-add-${t}-1`,
|
|
162
|
-
label: "工程图纸编号:GB-2026-OCR",
|
|
163
|
-
box: o(120, 140, 320, 44)
|
|
164
|
-
}, {
|
|
165
|
-
id: `ocr-add-${t}-2`,
|
|
166
|
-
label: "构件规格:HRB400E Φ25@150",
|
|
167
|
-
box: o(120, 210, 540, 40)
|
|
168
|
-
}, {
|
|
169
|
-
id: `ocr-add-${t}-3`,
|
|
170
|
-
label: "施工部位:二层核心筒剪力墙",
|
|
171
|
-
box: o(120, 280, 460, 40)
|
|
172
|
-
}];
|
|
173
|
-
return {
|
|
174
|
-
fileKey: f,
|
|
175
|
-
changeType: "added",
|
|
176
|
-
sample: g({
|
|
177
|
-
id: `ocr-sample-added-${t + 1}`,
|
|
178
|
-
versionId: l,
|
|
179
|
-
fileKey: f,
|
|
180
|
-
fileName: s,
|
|
181
|
-
imageUrl: p(s, `新增样本 · ${d}`, "#52c41a", "ocr"),
|
|
182
|
-
labels: _,
|
|
183
|
-
isLabeled: !S,
|
|
184
|
-
confirmStatus: t === 1 ? 1 : 0
|
|
185
|
-
}),
|
|
186
|
-
baseSample: null
|
|
187
|
-
};
|
|
188
|
-
}), e = Array.from({
|
|
189
|
-
length: 2
|
|
190
|
-
}, (m, t) => {
|
|
191
|
-
const s = `ocr_blueprint_deleted_${String(t + 1).padStart(3, "0")}.png`, f = `mock/ocr/deleted/${s}`, S = [{
|
|
192
|
-
id: `ocr-del-${t}-1`,
|
|
193
|
-
label: "工程图纸编号:GB-2026-OCR",
|
|
194
|
-
box: o(120, 140, 320, 44)
|
|
195
|
-
}, {
|
|
196
|
-
id: `ocr-del-${t}-2`,
|
|
197
|
-
label: "构件规格:HRB400E Φ25@150",
|
|
198
|
-
box: o(120, 210, 540, 40)
|
|
199
|
-
}];
|
|
200
|
-
return {
|
|
201
|
-
fileKey: f,
|
|
202
|
-
changeType: "deleted",
|
|
203
|
-
sample: g({
|
|
204
|
-
id: `ocr-sample-deleted-${t + 1}`,
|
|
205
|
-
versionId: a,
|
|
206
|
-
fileKey: f,
|
|
207
|
-
fileName: s,
|
|
208
|
-
imageUrl: p(s, `已删除样本 · ${n}`, "#ff4d4f", "ocr"),
|
|
209
|
-
labels: S,
|
|
210
|
-
isLabeled: !0,
|
|
211
|
-
confirmStatus: 0
|
|
212
|
-
}),
|
|
213
|
-
baseSample: null
|
|
214
|
-
};
|
|
215
|
-
}), x = Array.from({
|
|
216
|
-
length: 6
|
|
217
|
-
}, (m, t) => {
|
|
218
|
-
const s = `ocr_blueprint_modified_${String(t + 1).padStart(3, "0")}.png`, f = `mock/ocr/modified/${s}`, S = [{
|
|
219
|
-
id: `ocr-mod-base-${t}-1`,
|
|
220
|
-
label: "工程图纸编号:GB-2026-OCR",
|
|
221
|
-
box: o(120, 140, 320, 44)
|
|
222
|
-
}, {
|
|
223
|
-
id: `ocr-mod-base-${t}-2`,
|
|
224
|
-
label: "构件规格:HRB400E Φ25@150",
|
|
225
|
-
box: o(120, 210, 540, 40)
|
|
226
|
-
}], _ = [...S, {
|
|
227
|
-
id: `ocr-mod-target-${t}-3`,
|
|
228
|
-
label: "施工部位:二层核心筒剪力墙 WZ-03",
|
|
229
|
-
box: o(120, 280, 460, 40)
|
|
230
|
-
}, {
|
|
231
|
-
id: `ocr-mod-target-${t}-4`,
|
|
232
|
-
label: "检验结论:外观及尺寸复核合格",
|
|
233
|
-
box: o(120, 350, 380, 40)
|
|
234
|
-
}, {
|
|
235
|
-
id: `ocr-mod-target-${t}-5`,
|
|
236
|
-
label: "质检签章区域",
|
|
237
|
-
box: o(490, 420, 190, 60)
|
|
238
|
-
}];
|
|
239
|
-
return {
|
|
240
|
-
fileKey: f,
|
|
241
|
-
changeType: "modified",
|
|
242
|
-
baseSample: g({
|
|
243
|
-
id: `ocr-sample-mod-base-${t + 1}`,
|
|
244
|
-
versionId: a,
|
|
245
|
-
fileKey: f,
|
|
246
|
-
fileName: s,
|
|
247
|
-
imageUrl: p(s, `基准版本 ${n}(2 个文本检测框)`, "#faad14", "ocr"),
|
|
248
|
-
labels: S,
|
|
249
|
-
isLabeled: !0,
|
|
250
|
-
confirmStatus: 0
|
|
251
|
-
}),
|
|
252
|
-
sample: g({
|
|
253
|
-
id: `ocr-sample-mod-target-${t + 1}`,
|
|
254
|
-
versionId: l,
|
|
255
|
-
fileKey: f,
|
|
256
|
-
fileName: s,
|
|
257
|
-
imageUrl: p(s, `目标版本 ${d}(补充至 5 个文本检测框)`, "#1677ff", "ocr"),
|
|
258
|
-
labels: _,
|
|
259
|
-
isLabeled: !0,
|
|
260
|
-
confirmStatus: 0
|
|
261
|
-
})
|
|
262
|
-
};
|
|
263
|
-
}), c = Array.from({
|
|
264
|
-
length: 88
|
|
265
|
-
}, (m, t) => {
|
|
266
|
-
const s = `ocr_blueprint_unchanged_${String(t + 1).padStart(3, "0")}.png`, f = `mock/ocr/unchanged/${s}`, S = [{
|
|
267
|
-
id: `ocr-unc-${t}-1`,
|
|
268
|
-
label: "工程图纸编号:GB-2026-OCR",
|
|
269
|
-
box: o(120, 140, 320, 44)
|
|
270
|
-
}, {
|
|
271
|
-
id: `ocr-unc-${t}-2`,
|
|
272
|
-
label: "构件规格:HRB400E Φ25@150",
|
|
273
|
-
box: o(120, 210, 540, 40)
|
|
274
|
-
}, {
|
|
275
|
-
id: `ocr-unc-${t}-3`,
|
|
276
|
-
label: "施工部位:二层核心筒剪力墙",
|
|
277
|
-
box: o(120, 280, 460, 40)
|
|
278
|
-
}];
|
|
279
|
-
return {
|
|
280
|
-
fileKey: f,
|
|
281
|
-
changeType: "unchanged",
|
|
282
|
-
sample: g({
|
|
283
|
-
id: `ocr-sample-unchanged-${t + 1}`,
|
|
284
|
-
versionId: l,
|
|
285
|
-
fileKey: f,
|
|
286
|
-
fileName: s,
|
|
287
|
-
imageUrl: p(s, `无变动样本 · ${d}`, "#1677ff", "ocr"),
|
|
288
|
-
labels: S,
|
|
289
|
-
isLabeled: !0,
|
|
290
|
-
confirmStatus: 0
|
|
291
|
-
}),
|
|
292
|
-
baseSample: null
|
|
293
|
-
};
|
|
294
|
-
});
|
|
295
|
-
return {
|
|
296
|
-
added: C,
|
|
297
|
-
deleted: e,
|
|
298
|
-
modified: x,
|
|
299
|
-
unchanged: c
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
const r = ["person", "helmet", "vest", "crane", "cone"], u = Array.from({
|
|
303
|
-
length: 15
|
|
304
|
-
}, (C, e) => {
|
|
305
|
-
const c = `site_cam_added_${String(e + 1).padStart(3, "0")}.jpg`, m = `mock/detection/added/${c}`, t = e === 3, h = r[e % r.length], s = r[(e + 1) % r.length], f = t ? [] : [{
|
|
306
|
-
id: `det-add-${e}-1`,
|
|
307
|
-
label: h,
|
|
308
|
-
box: o(110, 150, 180, 280)
|
|
309
|
-
}, {
|
|
310
|
-
id: `det-add-${e}-2`,
|
|
311
|
-
label: s,
|
|
312
|
-
box: o(162, 80, 76, 70)
|
|
313
|
-
}, {
|
|
314
|
-
id: `det-add-${e}-3`,
|
|
315
|
-
label: "vest",
|
|
316
|
-
box: o(370, 190, 220, 240)
|
|
317
|
-
}];
|
|
318
|
-
return {
|
|
319
|
-
fileKey: m,
|
|
320
|
-
changeType: "added",
|
|
321
|
-
sample: g({
|
|
322
|
-
id: `det-sample-added-${e + 1}`,
|
|
323
|
-
versionId: l,
|
|
324
|
-
fileKey: m,
|
|
325
|
-
fileName: c,
|
|
326
|
-
imageUrl: p(c, `新增样本 · ${d}`, "#52c41a", "detection"),
|
|
327
|
-
labels: f,
|
|
328
|
-
isLabeled: !t,
|
|
329
|
-
confirmStatus: e === 1 ? 1 : 0
|
|
330
|
-
}),
|
|
331
|
-
baseSample: null
|
|
332
|
-
};
|
|
333
|
-
}), b = Array.from({
|
|
334
|
-
length: 2
|
|
335
|
-
}, (C, e) => {
|
|
336
|
-
const c = `site_cam_deleted_${String(e + 1).padStart(3, "0")}.jpg`, m = `mock/detection/deleted/${c}`, t = [{
|
|
337
|
-
id: `det-del-${e}-1`,
|
|
338
|
-
label: "person",
|
|
339
|
-
box: o(110, 150, 180, 280)
|
|
340
|
-
}, {
|
|
341
|
-
id: `det-del-${e}-2`,
|
|
342
|
-
label: "helmet",
|
|
343
|
-
box: o(162, 80, 76, 70)
|
|
344
|
-
}];
|
|
345
|
-
return {
|
|
346
|
-
fileKey: m,
|
|
347
|
-
changeType: "deleted",
|
|
348
|
-
sample: g({
|
|
349
|
-
id: `det-sample-deleted-${e + 1}`,
|
|
350
|
-
versionId: a,
|
|
351
|
-
fileKey: m,
|
|
352
|
-
fileName: c,
|
|
353
|
-
imageUrl: p(c, `已删除样本 · ${n}`, "#ff4d4f", "detection"),
|
|
354
|
-
labels: t,
|
|
355
|
-
isLabeled: !0,
|
|
356
|
-
confirmStatus: 0
|
|
357
|
-
}),
|
|
358
|
-
baseSample: null
|
|
359
|
-
};
|
|
360
|
-
}), $ = Array.from({
|
|
361
|
-
length: 6
|
|
362
|
-
}, (C, e) => {
|
|
363
|
-
const c = `site_cam_modified_${String(e + 1).padStart(3, "0")}.jpg`, m = `mock/detection/modified/${c}`, t = [{
|
|
364
|
-
id: `det-mod-base-${e}-1`,
|
|
365
|
-
label: "person",
|
|
366
|
-
box: o(110, 150, 180, 280)
|
|
367
|
-
}, {
|
|
368
|
-
id: `det-mod-base-${e}-2`,
|
|
369
|
-
label: "helmet",
|
|
370
|
-
box: o(162, 80, 76, 70)
|
|
371
|
-
}], h = [{
|
|
372
|
-
id: `det-mod-target-${e}-1`,
|
|
373
|
-
label: "person",
|
|
374
|
-
box: o(110, 150, 180, 280)
|
|
375
|
-
}, {
|
|
376
|
-
id: `det-mod-target-${e}-2`,
|
|
377
|
-
label: "helmet",
|
|
378
|
-
box: o(162, 80, 76, 70)
|
|
379
|
-
}, {
|
|
380
|
-
id: `det-mod-target-${e}-3`,
|
|
381
|
-
label: "person",
|
|
382
|
-
box: o(370, 190, 220, 240)
|
|
383
|
-
}, {
|
|
384
|
-
id: `det-mod-target-${e}-4`,
|
|
385
|
-
label: "vest",
|
|
386
|
-
box: o(442, 120, 76, 68)
|
|
387
|
-
}, {
|
|
388
|
-
id: `det-mod-target-${e}-5`,
|
|
389
|
-
label: "cone",
|
|
390
|
-
box: o(630, 280, 110, 150)
|
|
391
|
-
}];
|
|
392
|
-
return {
|
|
393
|
-
fileKey: m,
|
|
394
|
-
changeType: "modified",
|
|
395
|
-
baseSample: g({
|
|
396
|
-
id: `det-sample-mod-base-${e + 1}`,
|
|
397
|
-
versionId: a,
|
|
398
|
-
fileKey: m,
|
|
399
|
-
fileName: c,
|
|
400
|
-
imageUrl: p(c, `基准版本 ${n}(原标注 2 框)`, "#faad14", "detection"),
|
|
401
|
-
labels: t,
|
|
402
|
-
isLabeled: !0,
|
|
403
|
-
confirmStatus: 0
|
|
404
|
-
}),
|
|
405
|
-
sample: g({
|
|
406
|
-
id: `det-sample-mod-target-${e + 1}`,
|
|
407
|
-
versionId: l,
|
|
408
|
-
fileKey: m,
|
|
409
|
-
fileName: c,
|
|
410
|
-
imageUrl: p(c, `目标版本 ${d}(修正后 5 框)`, "#1677ff", "detection"),
|
|
411
|
-
labels: h,
|
|
412
|
-
isLabeled: !0,
|
|
413
|
-
confirmStatus: 0
|
|
414
|
-
})
|
|
415
|
-
};
|
|
416
|
-
}), y = Array.from({
|
|
417
|
-
length: 88
|
|
418
|
-
}, (C, e) => {
|
|
419
|
-
const c = `site_cam_unchanged_${String(e + 1).padStart(3, "0")}.jpg`, m = `mock/detection/unchanged/${c}`, t = r[e % r.length], h = r[(e + 2) % r.length], s = [{
|
|
420
|
-
id: `det-unc-${e}-1`,
|
|
421
|
-
label: t,
|
|
422
|
-
box: o(110, 150, 180, 280)
|
|
423
|
-
}, {
|
|
424
|
-
id: `det-unc-${e}-2`,
|
|
425
|
-
label: h,
|
|
426
|
-
box: o(370, 190, 220, 240)
|
|
427
|
-
}];
|
|
428
|
-
return {
|
|
429
|
-
fileKey: m,
|
|
430
|
-
changeType: "unchanged",
|
|
431
|
-
sample: g({
|
|
432
|
-
id: `det-sample-unchanged-${e + 1}`,
|
|
433
|
-
versionId: l,
|
|
434
|
-
fileKey: m,
|
|
435
|
-
fileName: c,
|
|
436
|
-
imageUrl: p(c, `无变动样本 · ${d}`, "#1677ff", "detection"),
|
|
437
|
-
labels: s,
|
|
438
|
-
isLabeled: !0,
|
|
439
|
-
confirmStatus: 0
|
|
440
|
-
}),
|
|
441
|
-
baseSample: null
|
|
442
|
-
};
|
|
443
|
-
});
|
|
444
|
-
return {
|
|
445
|
-
added: u,
|
|
446
|
-
deleted: b,
|
|
447
|
-
modified: $,
|
|
448
|
-
unchanged: y
|
|
449
|
-
};
|
|
450
|
-
}, U = (i) => {
|
|
451
|
-
const {
|
|
452
|
-
datasetId: a,
|
|
453
|
-
baseVersionId: l,
|
|
454
|
-
targetVersionId: n,
|
|
455
|
-
scene: d = a.toLowerCase().includes("ocr") ? "ocr" : "detection",
|
|
456
|
-
datasetName: r
|
|
457
|
-
} = i, u = v(l, "V1"), b = v(n, "V3");
|
|
458
|
-
return d === "ocr" ? {
|
|
459
|
-
datasetId: a,
|
|
460
|
-
datasetName: r || "工程图纸文字与铭牌OCR检测数据集",
|
|
461
|
-
markType: "ocr",
|
|
462
|
-
ocrMarkTmpl: "DetectionOCR",
|
|
463
|
-
baseVersionId: l,
|
|
464
|
-
baseVersionNo: u,
|
|
465
|
-
targetVersionId: n,
|
|
466
|
-
targetVersionNo: b,
|
|
467
|
-
compareTime: 176018016e4,
|
|
468
|
-
// 2025-10-11 18:56:00
|
|
469
|
-
overview: {
|
|
470
|
-
baseVersion: {
|
|
471
|
-
totalSampleCount: 96,
|
|
472
|
-
labeledSampleCount: 95,
|
|
473
|
-
totalBoxCount: 153
|
|
474
|
-
},
|
|
475
|
-
targetVersion: {
|
|
476
|
-
totalSampleCount: 109,
|
|
477
|
-
labeledSampleCount: 94,
|
|
478
|
-
totalBoxCount: 165
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
changeStats: {
|
|
482
|
-
addedCount: 15,
|
|
483
|
-
deletedCount: 2,
|
|
484
|
-
modifiedCount: 6,
|
|
485
|
-
unchangedCount: 88
|
|
486
|
-
},
|
|
487
|
-
labelComparisons: [],
|
|
488
|
-
taskStatus: "SUCCESS"
|
|
489
|
-
} : {
|
|
490
|
-
datasetId: a,
|
|
491
|
-
datasetName: r || "施工现场安全帽与反光衣检测数据集",
|
|
492
|
-
markType: "detection",
|
|
493
|
-
baseVersionId: l,
|
|
494
|
-
baseVersionNo: u,
|
|
495
|
-
targetVersionId: n,
|
|
496
|
-
targetVersionNo: b,
|
|
497
|
-
compareTime: 176018016e4,
|
|
498
|
-
overview: {
|
|
499
|
-
baseVersion: {
|
|
500
|
-
totalSampleCount: 96,
|
|
501
|
-
labeledSampleCount: 95,
|
|
502
|
-
totalBoxCount: 153
|
|
503
|
-
},
|
|
504
|
-
targetVersion: {
|
|
505
|
-
totalSampleCount: 109,
|
|
506
|
-
labeledSampleCount: 94,
|
|
507
|
-
totalBoxCount: 165
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
changeStats: {
|
|
511
|
-
addedCount: 15,
|
|
512
|
-
deletedCount: 2,
|
|
513
|
-
modifiedCount: 6,
|
|
514
|
-
unchangedCount: 88
|
|
515
|
-
},
|
|
516
|
-
labelComparisons: [{
|
|
517
|
-
label: "person",
|
|
518
|
-
baseBoxCount: 96,
|
|
519
|
-
baseSampleCount: 96,
|
|
520
|
-
targetBoxCount: 96,
|
|
521
|
-
targetSampleCount: 98
|
|
522
|
-
}, {
|
|
523
|
-
label: "helmet",
|
|
524
|
-
baseBoxCount: 95,
|
|
525
|
-
baseSampleCount: 95,
|
|
526
|
-
targetBoxCount: 95,
|
|
527
|
-
targetSampleCount: 90
|
|
528
|
-
}, {
|
|
529
|
-
label: "vest",
|
|
530
|
-
baseBoxCount: 156,
|
|
531
|
-
baseSampleCount: 96,
|
|
532
|
-
targetBoxCount: 162,
|
|
533
|
-
targetSampleCount: 96
|
|
534
|
-
}, {
|
|
535
|
-
label: "crane",
|
|
536
|
-
baseBoxCount: 14,
|
|
537
|
-
baseSampleCount: 12,
|
|
538
|
-
targetBoxCount: 14,
|
|
539
|
-
targetSampleCount: 12
|
|
540
|
-
}, {
|
|
541
|
-
label: "cone",
|
|
542
|
-
baseBoxCount: 18,
|
|
543
|
-
baseSampleCount: 15,
|
|
544
|
-
targetBoxCount: 15,
|
|
545
|
-
targetSampleCount: 13
|
|
546
|
-
}],
|
|
547
|
-
taskStatus: "SUCCESS"
|
|
548
|
-
};
|
|
549
|
-
}, A = (i) => {
|
|
550
|
-
const {
|
|
551
|
-
datasetId: a,
|
|
552
|
-
baseVersionId: l,
|
|
553
|
-
targetVersionId: n,
|
|
554
|
-
changeType: d,
|
|
555
|
-
pageNo: r = 1,
|
|
556
|
-
pageSize: u = 20,
|
|
557
|
-
scene: b = a.toLowerCase().includes("ocr") ? "ocr" : "detection"
|
|
558
|
-
} = i, y = N(b, l, n)[d] || [], C = (r - 1) * u, e = y.slice(C, C + u);
|
|
559
|
-
return {
|
|
560
|
-
recordList: e,
|
|
561
|
-
numResults: e.length,
|
|
562
|
-
totalResults: y.length,
|
|
563
|
-
pageNo: r,
|
|
564
|
-
pageSize: u
|
|
565
|
-
};
|
|
566
|
-
};
|
|
567
|
-
export {
|
|
568
|
-
T as MOCK_DATASET_VERSIONS,
|
|
569
|
-
A as getMockVersionCompareSamples,
|
|
570
|
-
U as getMockVersionCompareSummary
|
|
571
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var i = Object.defineProperty, g = Object.defineProperties;
|
|
2
|
-
var u = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var d = Object.getOwnPropertySymbols;
|
|
4
|
-
var C = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var s = (n, o, r) => o in n ? i(n, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[o] = r, h = (n, o) => {
|
|
6
|
-
for (var r in o || (o = {}))
|
|
7
|
-
C.call(o, r) && s(n, r, o[r]);
|
|
8
|
-
if (d)
|
|
9
|
-
for (var r of d(o))
|
|
10
|
-
E.call(o, r) && s(n, r, o[r]);
|
|
11
|
-
return n;
|
|
12
|
-
}, f = (n, o) => g(n, u(o));
|
|
13
|
-
import { tagColors as a } from "../../../utils/index.mjs";
|
|
14
|
-
const L = /* @__PURE__ */ new Set(["nocode", "hascode", "allcode", "pending"]), x = (n = [], o = []) => {
|
|
15
|
-
const r = /* @__PURE__ */ new Map();
|
|
16
|
-
let c = 0;
|
|
17
|
-
const e = (t) => {
|
|
18
|
-
const l = t == null ? void 0 : t.trim();
|
|
19
|
-
!l || L.has(l) || r.has(l) || (r.set(l, a[c % a.length]), c += 1);
|
|
20
|
-
};
|
|
21
|
-
return n.forEach((t) => e(t)), o.forEach((t) => {
|
|
22
|
-
var l;
|
|
23
|
-
(l = t == null ? void 0 : t.labels) == null || l.forEach((b) => {
|
|
24
|
-
e(b.label || b.id);
|
|
25
|
-
});
|
|
26
|
-
}), r;
|
|
27
|
-
}, w = (n, o) => {
|
|
28
|
-
var c;
|
|
29
|
-
if (!((c = n == null ? void 0 : n.labels) != null && c.length))
|
|
30
|
-
return [];
|
|
31
|
-
const r = o != null ? o : x([], [n]);
|
|
32
|
-
return n.labels.map((e, t) => {
|
|
33
|
-
const l = (e.label || e.id || "").trim(), b = r.get(l) || a[t % a.length];
|
|
34
|
-
return f(h({}, e), {
|
|
35
|
-
id: e.id || `${l || "box"}-${t}`,
|
|
36
|
-
label: e.label || "",
|
|
37
|
-
box: e.box,
|
|
38
|
-
color: b
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
x as buildCompareLabelColorMap,
|
|
44
|
-
w as injectSampleLabelColors
|
|
45
|
-
};
|