mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #224] Zero shot - evaluate labels independently #197
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#197
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 @subhamkhemka on GitHub (Mar 25, 2022).
Original GitHub issue: https://github.com/openai/CLIP/issues/224
Hi
How can I consider the labels to be independent of each other ? Do not want the probs summing up to 1 instead want to evaluate each label on its own, sort of a multi label classification.
Thanks
@jongwook commented on GitHub (Apr 11, 2022):
You can use the cosine similarity of
image_featuresandtext_featureswhich gives semantic similarity for each text label independently. This idea was called CLIPScore in a paper.Note that the cosine similarity is meaningful only in a relative sense, and you'd probably want to select good threshold values specific for your use cases and datasets by cross validation. Also, see prompt engineering which will make the metric more robust.
@justlike-prog commented on GitHub (Dec 27, 2022):
@jongwook @subhamkhemka So there is no way to get a per word probability rather than just the similarity? It seems to be quite hard to find a good threshold just by similarity.