@glodon-aiot/dataset-annotation 3.9.0-beta.9 → 3.10.0-alpha.11
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/DatasetContext/index.mjs +6 -3
- package/dist/es/components/Iconfont/index.mjs +2 -2
- package/dist/es/components/PicZipImportModal/config.mjs +41 -0
- package/dist/es/components/PicZipImportModal/index.mjs +317 -301
- package/dist/es/components/PicZipImportModal/pic_vlm_json_zip.svg.mjs +4 -0
- package/dist/es/components/PicZipImportModal/pic_vlm_zip.svg.mjs +4 -0
- package/dist/es/components/VLMAnnotation/RegionItem.mjs +95 -0
- package/dist/es/components/VLMAnnotation/TextAnnotationPanel.mjs +83 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.mjs +75 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.mjs +115 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.mjs +42 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.mjs +55 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.mjs +51 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.mjs +47 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.mjs +220 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.mjs +106 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.mjs +68 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.mjs +38 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.mjs +141 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.mjs +72 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.mjs +102 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.mjs +103 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.mjs +156 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/del.png.mjs +4 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/index.mjs +507 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.mjs +33 -0
- package/dist/es/components/VLMAnnotation/components/DragButton.mjs +18 -0
- package/dist/es/components/VLMAnnotation/components/FitToScreenButton.mjs +16 -0
- package/dist/es/components/VLMAnnotation/components/RectangleButton.mjs +30 -0
- package/dist/es/components/VLMAnnotation/components/Toolbar.mjs +40 -0
- package/dist/es/components/VLMAnnotation/components/ZoomControls.mjs +44 -0
- package/dist/es/components/VLMAnnotation/constants.mjs +50 -0
- package/dist/es/components/VLMAnnotation/index.mjs +242 -0
- package/dist/es/components/VLMAnnotation/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.mjs +345 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.mjs +240 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.mjs +201 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +399 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +139 -0
- package/dist/es/components/VLMAnnotationDetail/VlmModal/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/index.mjs +446 -0
- package/dist/es/components/VLMAnnotationDetail/style.less.mjs +4 -0
- package/dist/es/constant.mjs +3 -3
- package/dist/es/createVlmtasetAnnotation/index.mjs +131 -0
- package/dist/es/featuresConfig.mjs +13 -9
- package/dist/es/index.mjs +11 -7
- package/dist/lib/index.js +4 -3
- package/dist/src/DatasetContext/index.d.ts +2 -0
- package/dist/src/components/Iconfont/font_4439177_tgvowh6bmlb.d.ts +0 -0
- package/dist/src/components/PicZipImportModal/config.d.ts +20 -0
- package/dist/src/components/VLMAnnotation/ImageAnnotationDebugger.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/RegionItem.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/TextAnnotationPanel.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.d.ts +12 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.d.ts +38 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.d.ts +18 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.d.ts +13 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.d.ts +21 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.d.ts +31 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.d.ts +11 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.d.ts +28 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.d.ts +13 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.d.ts +37 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.d.ts +12 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.d.ts +15 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.d.ts +32 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.d.ts +25 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/index.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.d.ts +32 -0
- package/dist/src/components/VLMAnnotation/components/DragButton.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/components/FitToScreenButton.d.ts +6 -0
- package/dist/src/components/VLMAnnotation/components/RectangleButton.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/components/Toolbar.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/components/ZoomControls.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/constants.d.ts +97 -0
- package/dist/src/components/VLMAnnotation/index.d.ts +6 -0
- package/dist/src/components/VLMAnnotation/types.d.ts +172 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.d.ts +14 -0
- 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/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/index.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +16 -0
- package/dist/src/components/VLMAnnotationDetail/index.d.ts +6 -0
- package/dist/src/constant.d.ts +1 -1
- package/dist/src/createVlmtasetAnnotation/index.d.ts +16 -0
- package/dist/src/featuresConfig.d.ts +4 -0
- package/dist/src/index.d.ts +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { fabric } from 'fabric';
|
|
2
|
+
export interface IBbox {
|
|
3
|
+
bbox: [number, number][];
|
|
4
|
+
content: string;
|
|
5
|
+
no: number;
|
|
6
|
+
score: number;
|
|
7
|
+
type: string;
|
|
8
|
+
}
|
|
9
|
+
export type ShapeType = 'rect';
|
|
10
|
+
export interface Shape {
|
|
11
|
+
name: ShapeType;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
export interface Region {
|
|
18
|
+
id: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
shape: Shape;
|
|
21
|
+
content: Record<string, string>;
|
|
22
|
+
image?: string;
|
|
23
|
+
textLayouts?: IBbox[];
|
|
24
|
+
}
|
|
25
|
+
export interface VLMSample {
|
|
26
|
+
id: string;
|
|
27
|
+
fileUrl: string;
|
|
28
|
+
labels?: Region[];
|
|
29
|
+
sampleFileName?: {
|
|
30
|
+
originalName?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
};
|
|
33
|
+
versionId?: string;
|
|
34
|
+
fileKey?: string;
|
|
35
|
+
fileSize?: number;
|
|
36
|
+
countSubsection?: number;
|
|
37
|
+
statusSubsection?: number;
|
|
38
|
+
recordId?: string;
|
|
39
|
+
textContent?: {
|
|
40
|
+
instruction: string;
|
|
41
|
+
input: string;
|
|
42
|
+
output: string;
|
|
43
|
+
};
|
|
44
|
+
subsectionId?: string;
|
|
45
|
+
createdAt?: string;
|
|
46
|
+
updatedAt?: string;
|
|
47
|
+
deletedAt?: string;
|
|
48
|
+
creator?: string;
|
|
49
|
+
metadata?: {
|
|
50
|
+
height: string;
|
|
51
|
+
width: string;
|
|
52
|
+
charactersCount?: number;
|
|
53
|
+
};
|
|
54
|
+
operator?: {
|
|
55
|
+
creatorName?: string;
|
|
56
|
+
creatorUserName?: string;
|
|
57
|
+
updaterName?: string;
|
|
58
|
+
updaterUserName?: string;
|
|
59
|
+
};
|
|
60
|
+
updater?: string;
|
|
61
|
+
confirmStatus?: number;
|
|
62
|
+
}
|
|
63
|
+
export type VLMLabelType = 'text';
|
|
64
|
+
export interface VLMLabel {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
type: VLMLabelType;
|
|
68
|
+
}
|
|
69
|
+
export interface VLMAnnotationProps {
|
|
70
|
+
sample: VLMSample;
|
|
71
|
+
labelDefinitions: VLMLabel[];
|
|
72
|
+
onChange?: (sample: VLMSample) => void;
|
|
73
|
+
leftRatio?: number;
|
|
74
|
+
resizable?: boolean;
|
|
75
|
+
minLeftRatio?: number;
|
|
76
|
+
maxLeftRatio?: number;
|
|
77
|
+
minLeftWidth?: number;
|
|
78
|
+
onRatioChange?: (ratio: number) => void;
|
|
79
|
+
aiAssistantEnabled?: boolean;
|
|
80
|
+
ocrRecognize: (image: string) => Promise<IBbox[]>;
|
|
81
|
+
coordinateType?: 'top-left' | 'center';
|
|
82
|
+
hideRightSide?: boolean;
|
|
83
|
+
readOnly?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface VLMLabelMakerProps {
|
|
86
|
+
sample?: VLMSample;
|
|
87
|
+
labelDefinitions?: VLMLabel[];
|
|
88
|
+
/**
|
|
89
|
+
* Optional external labels state to keep canvas regions in sync
|
|
90
|
+
* (e.g. text edits from TextAnnotationPanel).
|
|
91
|
+
*/
|
|
92
|
+
labels?: Region[];
|
|
93
|
+
onImageLoad?: VoidFunction;
|
|
94
|
+
onChange?: (labels: Region[]) => void;
|
|
95
|
+
onRegionSelect?: (region: Region | null) => void;
|
|
96
|
+
onRegionChange?: (region: Region | null, action: 'create' | 'update' | 'delete') => void;
|
|
97
|
+
ocrRecognize?: (image: string) => Promise<IBbox[]>;
|
|
98
|
+
activeLabelValue?: {
|
|
99
|
+
label: VLMLabel;
|
|
100
|
+
region: Region;
|
|
101
|
+
} | null;
|
|
102
|
+
onClearActive?: () => void;
|
|
103
|
+
selectedRegion?: Region | null;
|
|
104
|
+
onAppendTextToActive?: (text: string) => void;
|
|
105
|
+
readOnly?: boolean;
|
|
106
|
+
}
|
|
107
|
+
export interface ToolbarProps {
|
|
108
|
+
drawingMode: boolean;
|
|
109
|
+
draggable: boolean;
|
|
110
|
+
scale: number;
|
|
111
|
+
onToggleDrawingMode: () => void;
|
|
112
|
+
onToggleDrag: () => void;
|
|
113
|
+
onZoom: (delta: number) => void;
|
|
114
|
+
onFitToScreen: () => void;
|
|
115
|
+
readOnly?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface ZoomControlsProps {
|
|
118
|
+
scale: number;
|
|
119
|
+
onZoomIn: () => void;
|
|
120
|
+
onZoomOut: () => void;
|
|
121
|
+
}
|
|
122
|
+
export interface TextAnnotationPanelProps {
|
|
123
|
+
labelDefinitions?: VLMLabel[];
|
|
124
|
+
labels?: Region[];
|
|
125
|
+
selectedRegion?: Region | null;
|
|
126
|
+
activeLabelValue?: {
|
|
127
|
+
label: VLMLabel;
|
|
128
|
+
region: Region;
|
|
129
|
+
} | null;
|
|
130
|
+
activeRegionNumber?: number | null;
|
|
131
|
+
onChange?: (activeLabelValue: {
|
|
132
|
+
label: VLMLabel;
|
|
133
|
+
region: Region;
|
|
134
|
+
} | null, index?: number) => void;
|
|
135
|
+
onInputActive?: (activeLabelValue: {
|
|
136
|
+
label: VLMLabel;
|
|
137
|
+
region: Region;
|
|
138
|
+
}, index?: number) => void;
|
|
139
|
+
onBlur?: (activeLabelValue: {
|
|
140
|
+
label: VLMLabel;
|
|
141
|
+
region: Region;
|
|
142
|
+
}, index?: number) => void;
|
|
143
|
+
readOnly?: boolean;
|
|
144
|
+
}
|
|
145
|
+
export interface RegionItemProps {
|
|
146
|
+
name: string;
|
|
147
|
+
labelDefinitions: VLMLabel[];
|
|
148
|
+
region: Region;
|
|
149
|
+
isSelected?: boolean;
|
|
150
|
+
isActive?: boolean;
|
|
151
|
+
activeLabelId?: string;
|
|
152
|
+
onChange?: (labelId: string, value: string) => void;
|
|
153
|
+
onFocus?: (labelId: string, value: string) => void;
|
|
154
|
+
onBlur?: (labelId: string, value: string) => void;
|
|
155
|
+
readOnly?: boolean;
|
|
156
|
+
}
|
|
157
|
+
export interface ImageAnnotationDebuggerProps {
|
|
158
|
+
sample?: VLMSample;
|
|
159
|
+
activeRegionNumber: number | null;
|
|
160
|
+
activeLabelValue?: {
|
|
161
|
+
label: VLMLabel;
|
|
162
|
+
region: Region;
|
|
163
|
+
} | null;
|
|
164
|
+
selectedRegion?: Region | null;
|
|
165
|
+
}
|
|
166
|
+
export interface ExtendedCanvas extends fabric.Canvas {
|
|
167
|
+
uniScaleKey?: string;
|
|
168
|
+
uniformScaling?: boolean;
|
|
169
|
+
}
|
|
170
|
+
export interface ExtendedRect extends fabric.Rect {
|
|
171
|
+
uniformScaling?: boolean;
|
|
172
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IVConfigsParams } from '@glodon-aiot/apis';
|
|
3
|
+
interface AttributeDetailProps {
|
|
4
|
+
datasetId?: string;
|
|
5
|
+
versionId?: string;
|
|
6
|
+
onAttributesChange?: (attributes: IVConfigsParams[]) => void;
|
|
7
|
+
onLoadingChange?: (loading: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface AttributeDetailRef {
|
|
10
|
+
hasUnsavedChanges: () => boolean;
|
|
11
|
+
checkDirtyAndConfirm: () => Promise<boolean>;
|
|
12
|
+
}
|
|
13
|
+
declare const AttributeDetail: React.ForwardRefExoticComponent<AttributeDetailProps & React.RefAttributes<AttributeDetailRef>>;
|
|
14
|
+
export default AttributeDetail;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Category, ILabel, ISample } from '@glodon-aiot/apis';
|
|
3
|
+
import { LabelItem } from '../../../DetectionImageAnnotation';
|
|
4
|
+
interface ImageDetailProps {
|
|
5
|
+
currentSample?: ISample;
|
|
6
|
+
onNextClick?: VoidFunction;
|
|
7
|
+
onPrevClick?: VoidFunction;
|
|
8
|
+
labels?: ILabel[];
|
|
9
|
+
onRefresh?: VoidFunction;
|
|
10
|
+
onChange?: (sample: ISample) => void;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
categories: Category[];
|
|
13
|
+
renderLabelItem?: (label: LabelItem) => string;
|
|
14
|
+
}
|
|
15
|
+
declare const ImageDetail: React.FC<ImageDetailProps>;
|
|
16
|
+
export default ImageDetail;
|
package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { OCRLabel } from './LabelEditorItem';
|
|
3
|
+
interface LabelEditorInputProps {
|
|
4
|
+
value?: Partial<OCRLabel>;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
holdingLabel?: OCRLabel;
|
|
7
|
+
clearHoldingLabel?: VoidFunction;
|
|
8
|
+
onChange?: (value: OCRLabel) => void;
|
|
9
|
+
onSelect?: (value?: Partial<OCRLabel>) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const LabelEditorInput: FC<LabelEditorInputProps>;
|
|
12
|
+
export default LabelEditorInput;
|
package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface OCRLabel {
|
|
3
|
+
uuid: string;
|
|
4
|
+
box: [number, number][];
|
|
5
|
+
words: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
catagoryId?: string;
|
|
8
|
+
}
|
|
9
|
+
interface LabelEditorItemProps {
|
|
10
|
+
name: string;
|
|
11
|
+
catagoryId: string;
|
|
12
|
+
values: OCRLabel[];
|
|
13
|
+
selectedLabel?: OCRLabel;
|
|
14
|
+
holdingLabel?: OCRLabel;
|
|
15
|
+
clearHoldingLabel?: VoidFunction;
|
|
16
|
+
onChange: (values: OCRLabel[]) => void;
|
|
17
|
+
onRemove: (label: OCRLabel) => void;
|
|
18
|
+
onSelect?: (value?: Partial<OCRLabel>) => void;
|
|
19
|
+
}
|
|
20
|
+
declare const LabelEditorItem: FC<LabelEditorItemProps>;
|
|
21
|
+
export default LabelEditorItem;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { OCRLabel } from './LabelEditorItem';
|
|
3
|
+
import { Category } from '@glodon-aiot/apis';
|
|
4
|
+
interface LabelEditorProps {
|
|
5
|
+
category: Category;
|
|
6
|
+
selectedLabel?: OCRLabel;
|
|
7
|
+
holdingLabel?: OCRLabel;
|
|
8
|
+
type?: OCRLabel[];
|
|
9
|
+
value?: OCRLabel[];
|
|
10
|
+
clearHoldingLabel?: VoidFunction;
|
|
11
|
+
onChange: (type: OCRLabel[], value: OCRLabel[]) => void;
|
|
12
|
+
onRemove: (label: OCRLabel) => void;
|
|
13
|
+
onSelect?: (value?: Partial<OCRLabel>) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const LabelEditor: FC<LabelEditorProps>;
|
|
16
|
+
export default LabelEditor;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { OCRLabel } from './LabelEditorItem';
|
|
3
|
+
import { LabelItem } from '../../../DetectionImageAnnotation';
|
|
4
|
+
interface Category {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
interface OCRBoxMakerProps {
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
id: string;
|
|
11
|
+
imageUrl: string;
|
|
12
|
+
canvasElement: HTMLCanvasElement | null;
|
|
13
|
+
categories: Category[];
|
|
14
|
+
labels: OCRLabel[];
|
|
15
|
+
onChange: (labels: OCRLabel[]) => void;
|
|
16
|
+
renderLabelItem?: (label: LabelItem) => string;
|
|
17
|
+
}
|
|
18
|
+
declare const OCRBoxMaker: FC<OCRBoxMakerProps>;
|
|
19
|
+
export default OCRBoxMaker;
|
package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface QAGenerationConfigProps {
|
|
3
|
+
visionId?: string;
|
|
4
|
+
datasetId?: string;
|
|
5
|
+
afterChangeTemplates?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface QAGenerationConfigRef {
|
|
8
|
+
hasUnsavedChanges: () => boolean;
|
|
9
|
+
checkDirtyAndConfirm: () => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
declare const QAGenerationConfig: React.ForwardRefExoticComponent<QAGenerationConfigProps & React.RefAttributes<QAGenerationConfigRef>>;
|
|
12
|
+
export default QAGenerationConfig;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface QADetailProps {
|
|
3
|
+
sample?: any;
|
|
4
|
+
datasetId?: string;
|
|
5
|
+
visionId?: string;
|
|
6
|
+
labels?: any[];
|
|
7
|
+
}
|
|
8
|
+
export interface QADetailRef {
|
|
9
|
+
checkDirtyAndConfirm: () => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
declare const QADetail: React.ForwardRefExoticComponent<QADetailProps & React.RefAttributes<QADetailRef>>;
|
|
12
|
+
export default QADetail;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ISample } from '@glodon-aiot/apis';
|
|
3
|
+
interface MarkVLMBoxModalProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
selectSampleId?: string;
|
|
6
|
+
datasetId?: string;
|
|
7
|
+
versionId?: string;
|
|
8
|
+
onClose: VoidFunction;
|
|
9
|
+
onSave: (record: ISample) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
declare const MarkVLMBoxModal: FC<MarkVLMBoxModalProps>;
|
|
12
|
+
export default MarkVLMBoxModal;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { ISample } from '@glodon-aiot/apis';
|
|
3
|
+
interface ImageDetailModalProps {
|
|
4
|
+
isVlmModalVisible: boolean;
|
|
5
|
+
setIsVlmModalVisible: Dispatch<SetStateAction<boolean>>;
|
|
6
|
+
record: ISample;
|
|
7
|
+
onNextClick: VoidFunction;
|
|
8
|
+
onPrevClick: VoidFunction;
|
|
9
|
+
datasetId?: string;
|
|
10
|
+
versionId?: string;
|
|
11
|
+
ocrMarkTmpl?: string;
|
|
12
|
+
handleMarkClick: (sampleId?: string) => void;
|
|
13
|
+
updateSampleList: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const VlmModal: React.FC<ImageDetailModalProps>;
|
|
16
|
+
export default VlmModal;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AnnotationProps } from '../../featuresConfig';
|
|
3
|
+
interface VLMAnnotationDetailProps extends AnnotationProps {
|
|
4
|
+
}
|
|
5
|
+
declare const VLMAnnotationDetail: React.FC<VLMAnnotationDetailProps>;
|
|
6
|
+
export default VLMAnnotationDetail;
|
package/dist/src/constant.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FeaturesConfig } from '../featuresConfig';
|
|
2
|
+
export type DatasetAnnotation = 'manage' | 'label' | 'view';
|
|
3
|
+
export interface DatasetAnnotationConfig extends FeaturesConfig {
|
|
4
|
+
getContainer: () => HTMLElement;
|
|
5
|
+
token: string;
|
|
6
|
+
datasetId: string;
|
|
7
|
+
versionId?: string;
|
|
8
|
+
apiUrl?: string;
|
|
9
|
+
mode?: DatasetAnnotation;
|
|
10
|
+
exampleSrcRoot?: string;
|
|
11
|
+
errorHandlers: {
|
|
12
|
+
aiotToken?: (error: Error) => void;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare const _default: (config: DatasetAnnotationConfig) => void;
|
|
16
|
+
export default _default;
|
|
@@ -33,6 +33,7 @@ export interface FeaturesConfig {
|
|
|
33
33
|
filterSwitch?: FilterSwitch;
|
|
34
34
|
header?: false | HeaderConfig;
|
|
35
35
|
exampleSrcRoot?: string;
|
|
36
|
+
vlmExampleSrcRoot?: string;
|
|
36
37
|
}
|
|
37
38
|
export type LabelFilter = 'hascode' | 'nocode' | '';
|
|
38
39
|
export interface AnnotationProps extends FeaturesConfig {
|
|
@@ -43,8 +44,11 @@ export interface AnnotationProps extends FeaturesConfig {
|
|
|
43
44
|
cvforceModelService: ModelServiceApi;
|
|
44
45
|
};
|
|
45
46
|
backTo?: string;
|
|
47
|
+
token?: string;
|
|
48
|
+
apiUrl?: string;
|
|
46
49
|
}
|
|
47
50
|
export declare const EXAMPLE_SRC_ROOT = "https://cv-aiot.obs.cn-north-4.myhuaweicloud.com:443/demodata";
|
|
51
|
+
export declare const VLM_EXAMPLE_SRC_ROOT = "https://sjzn-cv-data.obs.cn-north-4.myhuaweicloud.com:443/dataset_data";
|
|
48
52
|
export declare const MANAGE_MODE_FEATURES: FeaturesConfig;
|
|
49
53
|
export declare const LABEL_MODE_FEATURES: FeaturesConfig;
|
|
50
54
|
export declare const VIEW_MODE_FEATURES: FeaturesConfig;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,4 +2,7 @@ export { default as createDetectionDatasetAnnotation } from './createDetectionDa
|
|
|
2
2
|
export { default as createDetectionImageAnnotation } from './createDetectionImageAnnotation';
|
|
3
3
|
export { default as createOcrDatasetAnnotation } from './createOcrDatasetAnnotation';
|
|
4
4
|
export { default as createOcrImageAnnotation } from './createOcrImageAnnotation';
|
|
5
|
+
export { default as createVlmDatasetAnnotation } from './createVlmtasetAnnotation';
|
|
5
6
|
export { default as createDatasetAnnotation } from './createDatasetAnnotation';
|
|
7
|
+
export { default as VLMAnnotation } from './components/VLMAnnotation';
|
|
8
|
+
export type { VLMAnnotationProps, VLMLabel, VLMSample } from './components/VLMAnnotation';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/dataset-annotation",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0-alpha.11",
|
|
4
4
|
"module": "./dist/es/index.mjs",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ant-design/icons": "^5.3.4",
|
|
39
39
|
"@aws-crypto/sha256-js": "^3.0.0",
|
|
40
|
-
"@glodon-aiot/apis": "^3.
|
|
40
|
+
"@glodon-aiot/apis": "^3.10.0-alpha.11",
|
|
41
41
|
"@glodon-aiot/minio": "^0.1.6",
|
|
42
42
|
"@reduxjs/toolkit": "^1.9.5",
|
|
43
43
|
"@types/fabric": "^5.3.2",
|