-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into feature/exif_to_prompt
- Loading branch information
Showing
7 changed files
with
268 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"schema": "caption", | ||
"context": { | ||
"contentFactory": "CachedContentFactory", | ||
"resolverName": "disk", | ||
"local": { | ||
"content": { | ||
"path": "../cache" | ||
}, | ||
"enumerator": { | ||
"path": "E:\\Joint-Image-EEG-Embedding\\Data\\Images", | ||
"depth": "5", | ||
"regex": ".*n014[0-9]{5}.*" | ||
}, | ||
"imageFilePathContent": { | ||
"field": "file" | ||
}, | ||
|
||
"captionContent": { | ||
"field": "captionSparse" | ||
}, | ||
"clip": { | ||
"contentSources": "imageDecoder" | ||
}, | ||
"captionSparse": { | ||
"contentSources": "imageDecoder" | ||
}, | ||
"captionDense": { | ||
"contentSources": "captionContent" | ||
}, | ||
"documentType": { | ||
"contentSources": "imageDecoder" | ||
}, | ||
"imagePrompt": { | ||
"template": "Create a short caption to the content of this image (file path: ${imageFilePathContent}) for the purpose of traning a co-embedding model. Use information from the internet to enhance the description, for instance by searching for proper nouns. If web sources turn out to be irrelevant, do not include them. The image is part of the imagenet-object-localization-challenge. Do not include general information about the imagenet-object-localization-challenge. Do not structure the description, put everything in one sentence. Do not mention words such as 'archive', 'documentation', 'archivist', 'search' or 'internet'. Do not mention any sources.", | ||
"defaultValue": "no content provided" | ||
}, | ||
|
||
"imageSourceFilter": { | ||
"type": "SOURCE:IMAGE" | ||
} | ||
} | ||
}, | ||
"operators": { | ||
"enumerator": { | ||
"type": "ENUMERATOR", | ||
"factory": "FileSystemEnumerator", | ||
"mediaTypes": ["IMAGE", "VIDEO"] | ||
}, | ||
"imageDecoder": { | ||
"type": "DECODER", | ||
"factory": "ImageDecoder" | ||
}, | ||
"fileMetadata":{ | ||
"type": "EXTRACTOR", | ||
"fieldName": "file" | ||
}, | ||
"imageFilePathContent": { | ||
"type": "TRANSFORMER", | ||
"factory":"DescriptorAsContentTransformer" | ||
}, | ||
|
||
"clip": { | ||
"type": "EXTRACTOR", | ||
"fieldName": "clip" | ||
}, | ||
|
||
"imagePrompt": { | ||
"type": "TRANSFORMER", | ||
"factory": "TemplateTextTransformer" | ||
}, | ||
"captionSparse": { | ||
"type": "EXTRACTOR", | ||
"fieldName": "captionSparse" | ||
}, | ||
"captionContent": { | ||
"type": "TRANSFORMER", | ||
"factory": "DescriptorAsContentTransformer" | ||
}, | ||
"captionDense": { | ||
"type": "EXTRACTOR", | ||
"fieldName": "captionDense" | ||
}, | ||
|
||
"imageSourceFilter": { | ||
"type": "TRANSFORMER", | ||
"factory": "TypeFilterTransformer" | ||
} | ||
}, | ||
"operations": { | ||
"enumerator-stage": {"operator": "enumerator"}, | ||
"image-decoder-stage": {"operator": "imageDecoder", "inputs": ["enumerator-stage"]}, | ||
"image-file-metadata-stage": {"operator": "fileMetadata", "inputs": ["image-decoder-stage"]}, | ||
"image-file-path-content-stage": {"operator": "imageFilePathContent", "inputs": ["image-file-metadata-stage"]}, | ||
|
||
"image-clip-stage": {"operator": "clip", "inputs": ["image-file-path-content-stage"]}, | ||
|
||
"image-prompt-stage": {"operator": "imagePrompt", "inputs": ["image-file-path-content-stage"]}, | ||
"image-caption-sparse-stage": {"operator": "captionSparse", "inputs": ["image-file-path-content-stage"]}, | ||
"image-caption-content-stage": {"operator": "captionContent", "inputs": ["image-caption-sparse-stage"]}, | ||
"image-caption-stage": {"operator": "captionDense", "inputs": ["image-caption-content-stage"]}, | ||
|
||
|
||
"image-final-stage": {"operator": "imageSourceFilter", "inputs": ["image-caption-stage","image-clip-stage"], "merge": "COMBINE"} | ||
}, | ||
"output": [ | ||
"image-final-stage" | ||
], | ||
"mergeType": "MERGE" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"schemas": { | ||
"caption": { | ||
"connection": { | ||
"database": "PgVectorConnectionProvider", | ||
"parameters": { | ||
"Host": "loalhost", | ||
"port": "5432", | ||
"username": "postgres", | ||
"password": "vitrivr" | ||
} | ||
}, | ||
"fields": { | ||
"file": { | ||
"factory": "FileSourceMetadata" | ||
}, | ||
"clip": { | ||
"factory": "DenseEmbedding", | ||
"parameters": { | ||
"host": "http://10.34.64.84:8888/", | ||
"model": "open-clip-vit-b32", | ||
"length": "512", | ||
"timeoutSeconds": "100", | ||
"retries": "1000" | ||
} | ||
}, | ||
"captionSparse": { | ||
"factory": "ImageCaption", | ||
"parameters": { | ||
"host": "http://10.34.64.84:8888/", | ||
"timeoutSeconds": "100", | ||
"retries": "1000", | ||
"model": "gpt4o", | ||
"prompt": "Create a short caption to the content of this image for the purpose of training a co-embedding model. Use information from the internet to enhance the description, for instance by searching for proper nouns. If web sources turn out to be irrelevant, do not include them. The image is part of the imagenet-object-localization-challenge. Do not include general information about the imagenet-object-localization-challenge. Do not structure the description, put everything in one sentence. Do not mention words such as 'archive', 'documentation', 'archivist', 'search' or 'internet'. Do not mention any sources." | ||
} | ||
}, | ||
"captionDense": { | ||
"factory": "DenseEmbedding", | ||
"parameters": { | ||
"host": "http://10.34.64.84:8888/", | ||
"model": "e5mistral7b-instruct", | ||
"length": "4096", | ||
"timeoutSeconds": "100", | ||
"retries": "1000" | ||
} | ||
} | ||
}, | ||
"resolvers": { | ||
"disk": { | ||
"factory": "DiskResolver", | ||
"parameters": { | ||
"location": "../thumbnails" | ||
} | ||
} | ||
}, | ||
"exporters": { | ||
"thumbnail": { | ||
"factory": "ThumbnailExporter", | ||
"resolverName": "disk", | ||
"parameters": { | ||
"maxSideResolution": "400", | ||
"mimeType": "JPG" | ||
} | ||
} | ||
}, | ||
"extractionPipelines": { | ||
"cap": { | ||
"path": "example-configs/ingestion/example/image-captions.json" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Module-specific settings | ||
|
||
# nopointergc https://github.com/bytedeco/javacv/issues/2266 | ||
org.bytedeco.javacpp.nopointergc=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.