nvidia-ai-iot / clip-distillation Goto Github PK
View Code? Open in Web Editor NEWZero-label image classification via OpenCLIP knowledge distillation
License: Other
Zero-label image classification via OpenCLIP knowledge distillation
License: Other
It would be super cool if you could Release any trained Models you have :)
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.
probs
, How well it performs in case we want to utilize the raw embeddings for ranking the images based on cosine distance.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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.