mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #119] training clip #107
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#107
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LilyTheBear on GitHub (Jun 21, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/119
Hi,
would you mind to explain the size, dimension and the format of input sensors for training ? or provide an example ?
best
Niloo
@vinson2233 commented on GitHub (Jun 22, 2021):
Have you seen this thread? https://github.com/openai/CLIP/issues/83
Image is PIL format, it can be in any size, the
preprocessobject from CLIP will handle the resize. If your image composed in 4 change (RGBA), put.convert('RGB')after PIL image reading.The text is just list of string. The ideal size is <= 77 characters.
@jongwook commented on GitHub (Jun 30, 2021):
@vinson2233 's example in #83 basically does it (thank you!).
Some details: grayscale (1 channel) or RGBA (4 channels) images are converted to 3-channel RGB images by the CLIP preprocessor (this line). The tokenizer will produce about 1-3 tokens from each word, so 77 tokens is often lot longer than 77 characters.
@vinson2233 commented on GitHub (Jul 1, 2021):
@jongwook i see, thanks for the explanation.
@MonolithFoundation commented on GitHub (Feb 13, 2025):
@jongwook hi, how to do this in hf's CLIPImageProcessor?
github.com/openai/CLIP@dcba3cb2e2/clip/clip.py (L76)