chanwkim commited on
Commit
b80c012
1 Parent(s): bda7b33

update readme

Browse files
Files changed (1) hide show
  1. README.md +5 -40
README.md CHANGED
@@ -1,13 +1,12 @@
1
  ---
 
2
  tags:
3
  - vision
4
- widget:
5
- - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/cat-dog-music.png
6
- candidate_labels: playing music, playing sports
7
- example_title: Cat & Dog
8
  ---
9
 
10
- # Model Card: CLIP
11
 
12
  Disclaimer: The model card is taken and modified from the official CLIP repository, it can be found [here](https://github.com/openai/CLIP/blob/main/model-card.md).
13
 
@@ -15,10 +14,6 @@ Disclaimer: The model card is taken and modified from the official CLIP reposito
15
 
16
  The CLIP model was developed by researchers at OpenAI to learn about what contributes to robustness in computer vision tasks. The model was also developed to test the ability of models to generalize to arbitrary image classification tasks in a zero-shot manner. It was not developed for general model deployment - to deploy models like CLIP, researchers will first need to carefully study their capabilities in relation to the specific context they’re being deployed within.
17
 
18
- ### Model Date
19
-
20
- January 2021
21
-
22
  ### Model Type
23
 
24
  The base model uses a ViT-L/14 Transformer architecture as an image encoder and uses a masked self-attention Transformer as a text encoder. These encoders are trained to maximize the similarity of (image, text) pairs via a contrastive loss.
@@ -32,28 +27,6 @@ The original implementation had two variants: one using a ResNet image encoder a
32
  - [CLIP Paper](https://arxiv.org/abs/2103.00020)
33
 
34
 
35
- ### Use with Transformers
36
-
37
- ```python
38
- from PIL import Image
39
- import requests
40
-
41
- from transformers import CLIPProcessor, CLIPModel
42
-
43
- model = CLIPModel.from_pretrained("openai/clip-vit-large-patch14")
44
- processor = CLIPProcessor.from_pretrained("openai/clip-vit-large-patch14")
45
-
46
- url = "http://images.cocodataset.org/val2017/000000039769.jpg"
47
- image = Image.open(requests.get(url, stream=True).raw)
48
-
49
- inputs = processor(text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True)
50
-
51
- outputs = model(**inputs)
52
- logits_per_image = outputs.logits_per_image # this is the image-text similarity score
53
- probs = logits_per_image.softmax(dim=1) # we can take the softmax to get the label probabilities
54
- ```
55
-
56
-
57
  ## Model Use
58
 
59
  ### Intended Use
@@ -134,12 +107,4 @@ CLIP and our analysis of it have a number of limitations. CLIP currently struggl
134
 
135
  We find that the performance of CLIP - and the specific biases it exhibits - can depend significantly on class design and the choices one makes for categories to include and exclude. We tested the risk of certain kinds of denigration with CLIP by classifying images of people from [Fairface](https://arxiv.org/abs/1908.04913) into crime-related and non-human animal categories. We found significant disparities with respect to race and gender. Additionally, we found that these disparities could shift based on how the classes were constructed. (Details captured in the Broader Impacts Section in the paper).
136
 
137
- We also tested the performance of CLIP on gender, race and age classification using the Fairface dataset (We default to using race categories as they are constructed in the Fairface dataset.) in order to assess quality of performance across different demographics. We found accuracy >96% across all races for gender classification with ‘Middle Eastern’ having the highest accuracy (98.4%) and ‘White’ having the lowest (96.5%). Additionally, CLIP averaged ~93% for racial classification and ~63% for age classification. Our use of evaluations to test for gender, race and age classification as well as denigration harms is simply to evaluate performance of the model across people and surface potential risks and not to demonstrate an endorsement/enthusiasm for such tasks.
138
-
139
-
140
-
141
- ## Feedback
142
-
143
- ### Where to send questions or comments about the model
144
-
145
- Please use [this Google Form](https://forms.gle/Uv7afRH5dvY34ZEs9)
 
1
  ---
2
+ inference: false
3
  tags:
4
  - vision
5
+ - dermatology
6
+ - medical
 
 
7
  ---
8
 
9
+ # MONET (Medical cONcept rETrieve)
10
 
11
  Disclaimer: The model card is taken and modified from the official CLIP repository, it can be found [here](https://github.com/openai/CLIP/blob/main/model-card.md).
12
 
 
14
 
15
  The CLIP model was developed by researchers at OpenAI to learn about what contributes to robustness in computer vision tasks. The model was also developed to test the ability of models to generalize to arbitrary image classification tasks in a zero-shot manner. It was not developed for general model deployment - to deploy models like CLIP, researchers will first need to carefully study their capabilities in relation to the specific context they’re being deployed within.
16
 
 
 
 
 
17
  ### Model Type
18
 
19
  The base model uses a ViT-L/14 Transformer architecture as an image encoder and uses a masked self-attention Transformer as a text encoder. These encoders are trained to maximize the similarity of (image, text) pairs via a contrastive loss.
 
27
  - [CLIP Paper](https://arxiv.org/abs/2103.00020)
28
 
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  ## Model Use
31
 
32
  ### Intended Use
 
107
 
108
  We find that the performance of CLIP - and the specific biases it exhibits - can depend significantly on class design and the choices one makes for categories to include and exclude. We tested the risk of certain kinds of denigration with CLIP by classifying images of people from [Fairface](https://arxiv.org/abs/1908.04913) into crime-related and non-human animal categories. We found significant disparities with respect to race and gender. Additionally, we found that these disparities could shift based on how the classes were constructed. (Details captured in the Broader Impacts Section in the paper).
109
 
110
+ We also tested the performance of CLIP on gender, race and age classification using the Fairface dataset (We default to using race categories as they are constructed in the Fairface dataset.) in order to assess quality of performance across different demographics. We found accuracy >96% across all races for gender classification with ‘Middle Eastern’ having the highest accuracy (98.4%) and ‘White’ having the lowest (96.5%). Additionally, CLIP averaged ~93% for racial classification and ~63% for age classification. Our use of evaluations to test for gender, race and age classification as well as denigration harms is simply to evaluate performance of the model across people and surface potential risks and not to demonstrate an endorsement/enthusiasm for such tasks.