Artificial Intelligence and Machine Learning Blogs
Explore AI and ML blogs. Discover use cases, advancements, and the transformative potential of AI for businesses. Stay informed of trends and applications.
cancel
Showing results for 
Search instead for 
Did you mean: 
YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos
This is the third part of my series blogs about retraining your own Customisable Similarity Search in SAP Leonard Machine Learning Foundation

In this part, we will learn how to inference your own Customisable Similarity Search, which has been trained and deployed in part 2.

The Inference Service for Customisable Similarity Search can be found in your service-key with key “NN_SEARCH_URL”.



In my case, "NN_SEARCH_URL": "https://mlftrial-nn-search.cfapps.eu10.hana.ondemand.com/api/v2/tabular/ann"

Open this url on browser, it displays as below:



Text:
for example, the input face feature vectors to lookup the closest neighbours in the retrained index.
[{"id": "v0", "vector": [-0.09959717094898224, 0.08119359612464905…]}]

Options:

{"top_n":5, "search_k": 100}

Lookup the top 5 closest neighbours, search 100 in the index trees.

As a result, a successful inference response will return top 5 closest neighbour with the distance and index in the model. As mentioned before, the distance here is not human understandable, therefore, to have a human understandable result, you should call the pretrained Similarity Scoring with the input the face feature vector and the closest neighbour’s.



In summary, now you have learned how to train and inference a Customisable Similarity Search with you own dataset. In next blog(part 4), let us put the pieces together to create a FaceID solution, which could be used retail store to recognise the customer in store with their face, or enable FaceID login to your mobile app for the customer and employee. Please stay tuned.