-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow searching for similar images by providing a path or URL to an image #20
Comments
I like the option to search for similar images. This will affect optimizing querying by splitting the model into text and vision transformers, but we may only load the vision transformer when the user needs to search for similar images. I also like an option to search for Let's merge the feature for adding and subtracting queries first. I left a few comments here: ramayer@ea09b08 |
Let's merge this whenever you are ready 😄 |
I have some questions about the desired syntax/behavior. How do we want to decide when to treat something as an image? One possibility would be to add two new command line parameters:
Each of those parameters could take a reference to an image that could start with . A different possibility would be not add any new parameters, but rather use the same parameters (query, --add, --sub) that we currently use; but try to guess the user's intent based on the format of the string like:
That's what my current local environment is doing. Kinda convenient to just go . Yet another possibility would be a hybrid - where the default . Or would we want even more parameters to separate out local files vs network access; or to distinguish between URIs and local paths? I'm not sure which option I like best. I can imagine annoyances with each of them. |
Hi @ramayer, I like the idea of having a simple parser that treats everything that starts with I would love to keep the number of parameters to a minimum unless we really need to add them. I can't imagine a situation when you'll want to include these prefixes in your regular text query. What do you think? Let's start by implementing a simple parser. If we will encounter any issues in the future, we will adjust accordingly :) |
Closed by: #21 |
Sometimes it's more convenient to search for "a picture similar to the one I have in mind", instead of trying to describe it with words. Especially considering the extremely short phrases CLIP allows.
I'd like to be able to run:
to return pictures of similar buildings like these.
It would also be nice to be able to search for pictures similar to a local file, like
rclip /tmp/turtle.jpg
and/orrclip file:///tmp/turtle.jpg
.This branch has a working work-in-progress for both of those features; but probably isn't ready for a pull request yet because it has a python3.9 dependency (
str.removeprefix
is a 3.9 feature). If you're interested, I'll remove that dependency and open a pull request.The text was updated successfully, but these errors were encountered: