@glodon-aiot/dataset-annotation 3.19.0 → 3.19.2-alpha.0
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/PicZipImportModal/config.mjs +17 -7
- package/dist/es/components/PicZipImportModal/index.mjs +142 -142
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/index.mjs +93 -91
- package/dist/es/components/VLMAnnotation/components/Toolbar.mjs +17 -16
- package/dist/es/components/VLMAnnotationDetail/VLMDetail/index.mjs +341 -318
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +199 -184
- package/dist/es/components/VLMAnnotationDetail/index.mjs +67 -66
- package/dist/es/components/VQAAnnotation/VQAAnnotationPanel.mjs +69 -0
- package/dist/es/components/VQAAnnotation/index.mjs +80 -0
- package/dist/es/components/VQAAnnotation/style.less.mjs +4 -0
- package/dist/es/index.mjs +9 -7
- package/dist/lib/index.js +4 -4
- package/dist/src/components/PicZipImportModal/config.d.ts +2 -1
- package/dist/src/components/VLMAnnotation/types.d.ts +2 -0
- package/dist/src/components/VLMAnnotationDetail/VLMDetail/index.d.ts +1 -0
- package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +1 -0
- package/dist/src/components/VQAAnnotation/VQAAnnotationPanel.d.ts +12 -0
- package/dist/src/components/VQAAnnotation/index.d.ts +38 -0
- package/dist/src/index.d.ts +2 -0
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ export interface ImportConfig {
|
|
|
5
5
|
imageFormatsText: string;
|
|
6
6
|
labelFormat?: 'json' | 'jsonl' | 'folder' | 'dwg-json';
|
|
7
7
|
maxZipSize: number;
|
|
8
|
+
showExampleImage?: boolean;
|
|
8
9
|
labelFormatLabel?: string;
|
|
9
10
|
zipUploadTexts: {
|
|
10
11
|
labeled: {
|
|
@@ -21,4 +22,4 @@ export interface ImportConfig {
|
|
|
21
22
|
* @param vlmLabelFormat VLM 专用:区分 jsonl 和 dwg-json 子格式
|
|
22
23
|
* @returns 导入配置
|
|
23
24
|
*/
|
|
24
|
-
export declare const getImportConfig: (markType?: string, vlmLabelFormat?: string) => ImportConfig;
|
|
25
|
+
export declare const getImportConfig: (markType?: string, vlmLabelFormat?: string, vlmMarkTmpl?: string) => ImportConfig;
|
|
@@ -109,6 +109,7 @@ export interface VLMLabelMakerProps {
|
|
|
109
109
|
selectedRegion?: Region | null;
|
|
110
110
|
onAppendTextToActive?: (text: string) => void;
|
|
111
111
|
readOnly?: boolean;
|
|
112
|
+
hideDrawRect?: boolean;
|
|
112
113
|
}
|
|
113
114
|
export interface ToolbarProps {
|
|
114
115
|
drawingMode: boolean;
|
|
@@ -119,6 +120,7 @@ export interface ToolbarProps {
|
|
|
119
120
|
onZoom: (delta: number) => void;
|
|
120
121
|
onFitToScreen: () => void;
|
|
121
122
|
readOnly?: boolean;
|
|
123
|
+
hideDrawRect?: boolean;
|
|
122
124
|
}
|
|
123
125
|
export interface ZoomControlsProps {
|
|
124
126
|
scale: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { IPagination, ISample } from '@glodon-aiot/apis';
|
|
3
3
|
interface ImageDetailModalProps {
|
|
4
|
+
vlmMarkTmpl?: string;
|
|
4
5
|
isVlmModalVisible: boolean;
|
|
5
6
|
setIsVlmModalVisible: Dispatch<SetStateAction<boolean>>;
|
|
6
7
|
record?: ISample;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface VQAAnnotationPanelRef {
|
|
3
|
+
validate: () => boolean;
|
|
4
|
+
}
|
|
5
|
+
interface VQAAnnotationPanelProps {
|
|
6
|
+
question: string;
|
|
7
|
+
answer: string;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
onChange?: (question: string, answer: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const VQAAnnotationPanel: React.ForwardRefExoticComponent<VQAAnnotationPanelProps & React.RefAttributes<VQAAnnotationPanelRef>>;
|
|
12
|
+
export default VQAAnnotationPanel;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface VQAConversation {
|
|
3
|
+
from: 'human' | 'gpt';
|
|
4
|
+
value: string;
|
|
5
|
+
messageId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface VQAContent {
|
|
8
|
+
conversations?: VQAConversation[];
|
|
9
|
+
images?: {
|
|
10
|
+
fileKey: string;
|
|
11
|
+
order: number;
|
|
12
|
+
}[];
|
|
13
|
+
schemaVersion?: string;
|
|
14
|
+
system?: string;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
export interface VQASample {
|
|
18
|
+
id: string;
|
|
19
|
+
fileUrl: string;
|
|
20
|
+
fileKey?: string;
|
|
21
|
+
content?: VQAContent;
|
|
22
|
+
isLabeled?: boolean;
|
|
23
|
+
sampleFileName?: {
|
|
24
|
+
originalName?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
};
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
29
|
+
export interface VQAAnnotationRef {
|
|
30
|
+
validate: () => boolean;
|
|
31
|
+
}
|
|
32
|
+
interface VQAAnnotationProps {
|
|
33
|
+
sample: VQASample;
|
|
34
|
+
onChange?: (sample: VQASample) => void;
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
}
|
|
37
|
+
declare const VQAAnnotation: React.ForwardRefExoticComponent<VQAAnnotationProps & React.RefAttributes<VQAAnnotationRef>>;
|
|
38
|
+
export default VQAAnnotation;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -9,3 +9,5 @@ export { default as createVlmDatasetAnnotation } from './createVlmtasetAnnotatio
|
|
|
9
9
|
export { default as createDatasetAnnotation } from './createDatasetAnnotation';
|
|
10
10
|
export { default as VLMAnnotation } from './components/VLMAnnotation';
|
|
11
11
|
export type { VLMAnnotationProps, VLMLabel, VLMSample } from './components/VLMAnnotation';
|
|
12
|
+
export { default as VQAAnnotation } from './components/VQAAnnotation';
|
|
13
|
+
export type { VQAAnnotationRef, VQASample, VQAConversation } from './components/VQAAnnotation';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/dataset-annotation",
|
|
3
|
-
"version": "3.19.0",
|
|
3
|
+
"version": "3.19.2-alpha.0",
|
|
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.19.0",
|
|
40
|
+
"@glodon-aiot/apis": "^3.19.2-alpha.0",
|
|
41
41
|
"@glodon-aiot/minio": "^0.1.6",
|
|
42
42
|
"@reduxjs/toolkit": "^1.9.5",
|
|
43
43
|
"@types/fabric": "^5.3.2",
|