mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: add OCR functionality and related configurations
This commit is contained in:
parent
23fb2e0fae
commit
0e8ca1c159
64 changed files with 3998 additions and 1669 deletions
|
|
@ -678,6 +678,7 @@ export type AllJobStatusResponseDto = {
|
|||
metadataExtraction: JobStatusDto;
|
||||
migration: JobStatusDto;
|
||||
notifications: JobStatusDto;
|
||||
ocr: JobStatusDto;
|
||||
search: JobStatusDto;
|
||||
sidecar: JobStatusDto;
|
||||
smartSearch: JobStatusDto;
|
||||
|
|
@ -957,6 +958,37 @@ export type SearchResponseDto = {
|
|||
albums: SearchAlbumResponseDto;
|
||||
assets: SearchAssetResponseDto;
|
||||
};
|
||||
export type OcrSearchDto = {
|
||||
albumIds?: string[];
|
||||
city?: string | null;
|
||||
country?: string | null;
|
||||
createdAfter?: string;
|
||||
createdBefore?: string;
|
||||
deviceId?: string;
|
||||
isEncoded?: boolean;
|
||||
isFavorite?: boolean;
|
||||
isMotion?: boolean;
|
||||
isNotInAlbum?: boolean;
|
||||
isOffline?: boolean;
|
||||
lensModel?: string | null;
|
||||
libraryId?: string | null;
|
||||
make?: string;
|
||||
model?: string | null;
|
||||
ocr: string;
|
||||
page?: number;
|
||||
personIds?: string[];
|
||||
rating?: number;
|
||||
state?: string | null;
|
||||
tagIds?: string[] | null;
|
||||
takenAfter?: string;
|
||||
takenBefore?: string;
|
||||
trashedAfter?: string;
|
||||
trashedBefore?: string;
|
||||
"type"?: AssetTypeEnum;
|
||||
updatedAfter?: string;
|
||||
updatedBefore?: string;
|
||||
visibility?: AssetVisibility;
|
||||
};
|
||||
export type PlacesResponseDto = {
|
||||
admin1name?: string;
|
||||
admin2name?: string;
|
||||
|
|
@ -1117,6 +1149,7 @@ export type ServerFeaturesDto = {
|
|||
map: boolean;
|
||||
oauth: boolean;
|
||||
oauthAutoLaunch: boolean;
|
||||
ocr: boolean;
|
||||
passwordLogin: boolean;
|
||||
reverseGeocoding: boolean;
|
||||
search: boolean;
|
||||
|
|
@ -1362,6 +1395,7 @@ export type SystemConfigJobDto = {
|
|||
metadataExtraction: JobSettingsDto;
|
||||
migration: JobSettingsDto;
|
||||
notifications: JobSettingsDto;
|
||||
ocr: JobSettingsDto;
|
||||
search: JobSettingsDto;
|
||||
sidecar: JobSettingsDto;
|
||||
smartSearch: JobSettingsDto;
|
||||
|
|
@ -1398,11 +1432,17 @@ export type FacialRecognitionConfig = {
|
|||
minScore: number;
|
||||
modelName: string;
|
||||
};
|
||||
export type OcrConfig = {
|
||||
enabled: boolean;
|
||||
minScore: number;
|
||||
modelName: string;
|
||||
};
|
||||
export type SystemConfigMachineLearningDto = {
|
||||
clip: ClipConfig;
|
||||
duplicateDetection: DuplicateDetectionConfig;
|
||||
enabled: boolean;
|
||||
facialRecognition: FacialRecognitionConfig;
|
||||
ocr: OcrConfig;
|
||||
/** This property was deprecated in v1.122.0 */
|
||||
url?: string;
|
||||
urls: string[];
|
||||
|
|
@ -3457,6 +3497,18 @@ export function searchAssets({ metadataSearchDto }: {
|
|||
body: metadataSearchDto
|
||||
})));
|
||||
}
|
||||
export function searchOcr({ ocrSearchDto }: {
|
||||
ocrSearchDto: OcrSearchDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: SearchResponseDto;
|
||||
}>("/search/ocr", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: ocrSearchDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* This endpoint requires the `person.read` permission.
|
||||
*/
|
||||
|
|
@ -4862,7 +4914,8 @@ export enum JobName {
|
|||
Sidecar = "sidecar",
|
||||
Library = "library",
|
||||
Notifications = "notifications",
|
||||
BackupDatabase = "backupDatabase"
|
||||
BackupDatabase = "backupDatabase",
|
||||
Ocr = "ocr"
|
||||
}
|
||||
export enum JobCommand {
|
||||
Start = "start",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue