Skip to content
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

[CLIP][Server/Engine] Send images to engine / accept PIL images #258

Closed
michaelfeil opened this issue Jun 10, 2024 · 1 comment
Closed
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@michaelfeil
Copy link
Owner

Feature request

Instead of sending the URL

Breakdown:

  • Allow engine to accept images. Aka: Engine.embed_image(images: list[url | Image]) -> list[Embeddings]. Currently only supports url strings
  • Allow API to download images

Motivation

Currently you can send only URLS. Goal would be to have a efficent and maintainable (add a test) solution

Your contribution

Looking for contributors!

@michaelfeil michaelfeil added help wanted Extra attention is needed good first issue Good for newcomers labels Jun 10, 2024
michaelfeil pushed a commit that referenced this issue Sep 18, 2024
… PIL images (#353)

* ADD: Send images to engine / accept PIL images

* deduce import

* deduce import

* annotions modify

* lint /transformer/vision/utils.py

* change list/List to Sequence for mixed input of str and Image objs

* lint for sync_engine.py

* add: unit test of PIL Image input of clip_embed models;delete: multithreading

* fix: local img not found

* modify:avoid import error while TYPE_CHECKING and define type hint for PIL.Image.Image

* modify:avoid import error while TYPE_CHECKING and define type hint for PIL.Image.Image

* modify:avoid import error while TYPE_CHECKING and define type hint for PIL.Image.Image

* modify:avoid import error in TYPE_CHECKING phase for no PIL.Image installed users, and define type hint for PIL.Image.Image

* modify:avoid import error in TYPE_CHECKING phase for no PIL.Image installed users, and define type hint for PIL.Image.Image

* modify:avoid import error in TYPE_CHECKING phase for no PIL.Image installed users, and define type hint for PIL.Image.Image

* fix:tying error of ImageClassType;use existing img instead;Sequence to List

* fix:tying error of ImageClassType;use existing img instead;Sequence to List

* add: requests dependency for img fetching in test

* add: requests dependency for img fetching in test& poetry lock file

* add: requests dependency(include types-requests) for img fetching in test& poetry lock file

* add: add back run_tests_with_hook.sh

---------

Co-authored-by: wgao <857403106@qq.com>
Co-authored-by: 王高 <wanggao@wanggaodeMacBook-Pro.local>
@lckr
Copy link
Collaborator

lckr commented Oct 1, 2024

This feature request was implemented in #353, closing this issue.

@lckr lckr closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants