mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
+20
-20
@@ -33,7 +33,7 @@ class SyncAssetOcrV1 {
|
|||||||
String assetId;
|
String assetId;
|
||||||
|
|
||||||
/// Confidence score of the bounding box
|
/// Confidence score of the bounding box
|
||||||
num boxScore;
|
double boxScore;
|
||||||
|
|
||||||
/// OCR entry ID
|
/// OCR entry ID
|
||||||
String id;
|
String id;
|
||||||
@@ -45,31 +45,31 @@ class SyncAssetOcrV1 {
|
|||||||
String text;
|
String text;
|
||||||
|
|
||||||
/// Confidence score of the recognized text
|
/// Confidence score of the recognized text
|
||||||
num textScore;
|
double textScore;
|
||||||
|
|
||||||
/// Top-left X coordinate (normalized 0–1)
|
/// Top-left X coordinate (normalized 0–1)
|
||||||
num x1;
|
double x1;
|
||||||
|
|
||||||
/// Top-right X coordinate (normalized 0–1)
|
/// Top-right X coordinate (normalized 0–1)
|
||||||
num x2;
|
double x2;
|
||||||
|
|
||||||
/// Bottom-right X coordinate (normalized 0–1)
|
/// Bottom-right X coordinate (normalized 0–1)
|
||||||
num x3;
|
double x3;
|
||||||
|
|
||||||
/// Bottom-left X coordinate (normalized 0–1)
|
/// Bottom-left X coordinate (normalized 0–1)
|
||||||
num x4;
|
double x4;
|
||||||
|
|
||||||
/// Top-left Y coordinate (normalized 0–1)
|
/// Top-left Y coordinate (normalized 0–1)
|
||||||
num y1;
|
double y1;
|
||||||
|
|
||||||
/// Top-right Y coordinate (normalized 0–1)
|
/// Top-right Y coordinate (normalized 0–1)
|
||||||
num y2;
|
double y2;
|
||||||
|
|
||||||
/// Bottom-right Y coordinate (normalized 0–1)
|
/// Bottom-right Y coordinate (normalized 0–1)
|
||||||
num y3;
|
double y3;
|
||||||
|
|
||||||
/// Bottom-left Y coordinate (normalized 0–1)
|
/// Bottom-left Y coordinate (normalized 0–1)
|
||||||
num y4;
|
double y4;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is SyncAssetOcrV1 &&
|
bool operator ==(Object other) => identical(this, other) || other is SyncAssetOcrV1 &&
|
||||||
@@ -138,19 +138,19 @@ class SyncAssetOcrV1 {
|
|||||||
|
|
||||||
return SyncAssetOcrV1(
|
return SyncAssetOcrV1(
|
||||||
assetId: mapValueOfType<String>(json, r'assetId')!,
|
assetId: mapValueOfType<String>(json, r'assetId')!,
|
||||||
boxScore: num.parse('${json[r'boxScore']}'),
|
boxScore: (mapValueOfType<num>(json, r'boxScore')!).toDouble(),
|
||||||
id: mapValueOfType<String>(json, r'id')!,
|
id: mapValueOfType<String>(json, r'id')!,
|
||||||
isVisible: mapValueOfType<bool>(json, r'isVisible')!,
|
isVisible: mapValueOfType<bool>(json, r'isVisible')!,
|
||||||
text: mapValueOfType<String>(json, r'text')!,
|
text: mapValueOfType<String>(json, r'text')!,
|
||||||
textScore: num.parse('${json[r'textScore']}'),
|
textScore: (mapValueOfType<num>(json, r'textScore')!).toDouble(),
|
||||||
x1: num.parse('${json[r'x1']}'),
|
x1: (mapValueOfType<num>(json, r'x1')!).toDouble(),
|
||||||
x2: num.parse('${json[r'x2']}'),
|
x2: (mapValueOfType<num>(json, r'x2')!).toDouble(),
|
||||||
x3: num.parse('${json[r'x3']}'),
|
x3: (mapValueOfType<num>(json, r'x3')!).toDouble(),
|
||||||
x4: num.parse('${json[r'x4']}'),
|
x4: (mapValueOfType<num>(json, r'x4')!).toDouble(),
|
||||||
y1: num.parse('${json[r'y1']}'),
|
y1: (mapValueOfType<num>(json, r'y1')!).toDouble(),
|
||||||
y2: num.parse('${json[r'y2']}'),
|
y2: (mapValueOfType<num>(json, r'y2')!).toDouble(),
|
||||||
y3: num.parse('${json[r'y3']}'),
|
y3: (mapValueOfType<num>(json, r'y3')!).toDouble(),
|
||||||
y4: num.parse('${json[r'y4']}'),
|
y4: (mapValueOfType<num>(json, r'y4')!).toDouble(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -23052,6 +23052,7 @@
|
|||||||
},
|
},
|
||||||
"boxScore": {
|
"boxScore": {
|
||||||
"description": "Confidence score of the bounding box",
|
"description": "Confidence score of the bounding box",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"id": {
|
"id": {
|
||||||
@@ -23068,38 +23069,47 @@
|
|||||||
},
|
},
|
||||||
"textScore": {
|
"textScore": {
|
||||||
"description": "Confidence score of the recognized text",
|
"description": "Confidence score of the recognized text",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"x1": {
|
"x1": {
|
||||||
"description": "Top-left X coordinate (normalized 0–1)",
|
"description": "Top-left X coordinate (normalized 0–1)",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"x2": {
|
"x2": {
|
||||||
"description": "Top-right X coordinate (normalized 0–1)",
|
"description": "Top-right X coordinate (normalized 0–1)",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"x3": {
|
"x3": {
|
||||||
"description": "Bottom-right X coordinate (normalized 0–1)",
|
"description": "Bottom-right X coordinate (normalized 0–1)",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"x4": {
|
"x4": {
|
||||||
"description": "Bottom-left X coordinate (normalized 0–1)",
|
"description": "Bottom-left X coordinate (normalized 0–1)",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"y1": {
|
"y1": {
|
||||||
"description": "Top-left Y coordinate (normalized 0–1)",
|
"description": "Top-left Y coordinate (normalized 0–1)",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"y2": {
|
"y2": {
|
||||||
"description": "Top-right Y coordinate (normalized 0–1)",
|
"description": "Top-right Y coordinate (normalized 0–1)",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"y3": {
|
"y3": {
|
||||||
"description": "Bottom-right Y coordinate (normalized 0–1)",
|
"description": "Bottom-right Y coordinate (normalized 0–1)",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"y4": {
|
"y4": {
|
||||||
"description": "Bottom-left Y coordinate (normalized 0–1)",
|
"description": "Bottom-left Y coordinate (normalized 0–1)",
|
||||||
|
"format": "double",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+10
-10
@@ -388,17 +388,17 @@ const SyncAssetOcrV1Schema = z
|
|||||||
id: z.string().describe('OCR entry ID'),
|
id: z.string().describe('OCR entry ID'),
|
||||||
assetId: z.string().describe('Asset ID'),
|
assetId: z.string().describe('Asset ID'),
|
||||||
|
|
||||||
x1: z.number().describe('Top-left X coordinate (normalized 0–1)'),
|
x1: z.number().meta({ format: 'double' }).describe('Top-left X coordinate (normalized 0–1)'),
|
||||||
y1: z.number().describe('Top-left Y coordinate (normalized 0–1)'),
|
y1: z.number().meta({ format: 'double' }).describe('Top-left Y coordinate (normalized 0–1)'),
|
||||||
x2: z.number().describe('Top-right X coordinate (normalized 0–1)'),
|
x2: z.number().meta({ format: 'double' }).describe('Top-right X coordinate (normalized 0–1)'),
|
||||||
y2: z.number().describe('Top-right Y coordinate (normalized 0–1)'),
|
y2: z.number().meta({ format: 'double' }).describe('Top-right Y coordinate (normalized 0–1)'),
|
||||||
x3: z.number().describe('Bottom-right X coordinate (normalized 0–1)'),
|
x3: z.number().meta({ format: 'double' }).describe('Bottom-right X coordinate (normalized 0–1)'),
|
||||||
y3: z.number().describe('Bottom-right Y coordinate (normalized 0–1)'),
|
y3: z.number().meta({ format: 'double' }).describe('Bottom-right Y coordinate (normalized 0–1)'),
|
||||||
x4: z.number().describe('Bottom-left X coordinate (normalized 0–1)'),
|
x4: z.number().meta({ format: 'double' }).describe('Bottom-left X coordinate (normalized 0–1)'),
|
||||||
y4: z.number().describe('Bottom-left Y coordinate (normalized 0–1)'),
|
y4: z.number().meta({ format: 'double' }).describe('Bottom-left Y coordinate (normalized 0–1)'),
|
||||||
|
|
||||||
boxScore: z.number().describe('Confidence score of the bounding box'),
|
boxScore: z.number().meta({ format: 'double' }).describe('Confidence score of the bounding box'),
|
||||||
textScore: z.number().describe('Confidence score of the recognized text'),
|
textScore: z.number().meta({ format: 'double' }).describe('Confidence score of the recognized text'),
|
||||||
text: z.string().describe('Recognized text content'),
|
text: z.string().describe('Recognized text content'),
|
||||||
isVisible: z.boolean().describe('Whether the OCR entry is visible'),
|
isVisible: z.boolean().describe('Whether the OCR entry is visible'),
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user