Update README.md
Browse files
README.md
CHANGED
@@ -75,16 +75,7 @@ score, joint_embedding = model.encode_multimodal(
|
|
75 |
)
|
76 |
```
|
77 |
|
78 |
-
There are two options to calculate semantic compatibility between an image and a text:
|
79 |
-
|
80 |
-
### Cosine Similarity
|
81 |
-
|
82 |
-
```python
|
83 |
-
import torch.nn.functional as F
|
84 |
-
similarity = F.cosine_similarity(image_embedding, text_embedding)
|
85 |
-
```
|
86 |
-
|
87 |
-
The `similarity` will belong to the `[-1, 1]` range, `1` meaning the absolute match.
|
88 |
|
89 |
__Pros__:
|
90 |
|
|
|
75 |
)
|
76 |
```
|
77 |
|
78 |
+
There are two options to calculate semantic compatibility between an image and a text: cosine similarity and [Matching Score](#matching-score).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
__Pros__:
|
81 |
|