Skip to Content
Technical Articles

Retrain your own Customisable Similarity Search in SAP Leonardo MLF-Part 3: Inferencing

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.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.