- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can someone explain to me the significance of multiplying by .5 in the cosine_distance() method here? : https://github.com/openvinotoolkit/open_model_zoo/blob/64fe6ef5c8ee769a97ed4d884ec3fbb8b6ca6477/demos/face_recognition_demo/python/faces_database.py#L38
I don't think it's accurate.
Thanks!
Anurag
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anuargrawal,
Thanks for reaching out.
We are checking this with our development team and will get back to you soon.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Aznie_Intel Do you have an update for me? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anuargrawal,
We are checking this with our developer team, which may take some time. We will update you with the information once available.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anuragrawal,
Thanks for your patience. Here is the information from our developer team regarding the cosine value:
Multiplying by 0.5 is a part of the normalization process to scale the cosine distance value to a specific range. Typically, the cosine similarity ranges from -1 to 1, where 1 means identical vectors and -1 means completely opposite. By adding 1 and then multiplying by 0.5, the range is transformed to 0 to 1.
Without the multiplication by 0.5, the cosine similarity values will range from -1 to 1 (after adding 1 to the original cosine similarity). This means that a value of -1 indicates completely dissimilar vectors, a value of 0 indicates orthogonality (i.e., the vectors are unrelated), and a value of 1 indicates identical vectors. By multiplying by 0.5, the range is transformed to 0 to 1, which can be easier to interpret: a value closer to 0 indicates greater similarity, and a value closer to 1 indicates greater dissimilarity.
So, while you can certainly compute cosine similarity without the multiplication step, the interpretation of the results will be different. The choice to include this step often depends on the specific requirements of ones application and how you want to interpret the results.
I hope this is helpful to you.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anuragrawal,
This thread will no longer be monitored since we have provided information. If you need any additional information from Intel, please submit a new question.
Regards,
Aznie
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page