Image embeddings on GCP#19
Draft
tonytw1 wants to merge 41 commits into
Draft
Conversation
76da1b8 to
340dc0c
Compare
1509bdc to
ab636a3
Compare
b07d5ff to
4305b01
Compare
… a source image and for input into a prediction end point.
…observed results are based solely on the pixels.
Does it still work?
…ding source image to preserve the aspect ratio of the subjects and (maybe) avoid cropping out of subjects.
Bring in the GCP gen ai client library. Embedding source is presented as an array of image bytes.
Not here; it can go after the normal image upload so that it doesn't impact latency.
…st after the Image message. The update embeddings message needs to arrive after the Image create message.
…ile size so there is no penalty for trying to flex on max clarity of small tiles.
…mmended 768 dimensions.
…d 768 dimensions.
…d 768 dimensions.
…d 768 dimensions.
0.9 looks like a usable cutoff for visually similar.
…st filter clause.
…lar is handled with the knn special case.
Fixes no similar results because of:
```
"filter": {
"bool": {
"must": [
{
"match": {
"similar": {
"query": "f7bfe3925ac6562dbb7428e32b36c9f5e605a434",
"operator": "AND"
}
}
}
],
```
4305b01 to
d883393
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Implements the More Like This and semantic search features using GCP APIs rather than AWS Bedrock.
Uses Gemini Embedding 2 as the model.
Scales uploaded images using ImageOperations before submitting them to the prediction API.
Every image is scaled rather than relying on the original or optimised image.
Does not need a separate Lambda.
How should a reviewer test this change?
How can success be measured?
Who should look at this?
Tested? Documented?