Giter VIP home page Giter VIP logo

clip-distillation's People

Contributors

jaybdub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clip-distillation's Issues

Distilled model benchmarks?

Thanks for the great work!
It's a very clever way to compute embeddings beforehand and use them directly as target values during backpropagation step.

Questions

  • Have you done any testing to find out, how well the distilled model performs as compared to the original teacher model?
  • If we use Vision Transformer (ViT) models as base, should there be any improvement to embedding quality?
  • Instead of using the distilled model for classification task by computing the probs, How well it performs in case we want to utilize the raw embeddings for ranking the images based on cosine distance.

Unable to run search_clip_images.py

Hi, I attempt to run search_clip_images.py either in your docker container or out and I get the same error like nothing is going into image_url.txt file:
python3 search_clip_images.py
"data/text_prompts.txt"
"data/image_urls.txt"
-n 5000
-m 10000
--max_workers 2
--append
Found the following 2 text prompts in data/text_prompts.txt
['Drone', 'Helicopter']
Querying images with the following prompts...
Drone
Helicopter
Traceback (most recent call last):
File "/home/user1/ariel/fed_learn/clip-distillation/search_clip_images.py", line 256, in
urls = asyncio.run(
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/user1/ariel/fed_learn/clip-distillation/search_clip_images.py", line 118, in clip_search_images_by_multi_text
results = await asyncio.gather(*coros)
File "/home/user1/ariel/fed_learn/clip-distillation/search_clip_images.py", line 96, in safe_coro
return await coro
File "/home/user1/ariel/fed_learn/clip-distillation/search_clip_images.py", line 71, in clip_search_images_by_text
item['url'] for item in response.json() if 'url' in item
File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

FYI, debug raised the following:

The "502 Bad Gateway" error indicates a communication issue between two servers acting as gateways or proxies to fulfill a request. It doesn't specify a problem with your device or internet connection, but rather a fault within the servers involved.

Here's a breakdown of the key points:

Your request reached the first server (nginx) successfully.
Nginx forwarded the request to another upstream server to complete it.
The upstream server failed to respond correctly, causing nginx to return the 502 error.

Possible causes for this error:

Upstream Server Down: The upstream server might be unavailable or experiencing issues.
Overloaded Upstream Server: The upstream server might be overloaded with requests and unable to handle more.
Network Problems: There might be network connectivity issues between nginx and the upstream server.
Misconfiguration: Nginx or the upstream server might be misconfigured.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.