Image Similarity with SQL Server

By for April 17, 2018

Report Abuse
This solution uses SQL Server 2017 + ML Services with Python to execute a transfer learning algorithm to detect image similarity.
> **Note:** You can read more about this solution and deployment guides in the [Image Similarity solution]( published on GitHub. > **STOP before you proceed** If you have not yet deployed a Data Science Virtual Machine on your Azure Subscription, you must first **[accept the Terms of Use](**. ## Overview This template describes how to build and deploy an image similarity solution with [SQL Server Machine Learning Services with Python]( In this solution, we demonstrate how to apply transfer learning, e.g., using pretrained deep neural network (DNN) model (trained on ImageNet) in solving the image similarity problem for an image based similar product recommendation scenario. The solution uses a small sample of upper body clothing images (around 300 images) as an example: there are 3 different types of textures in the clothing images: dotted, striped, and leopard. Those with similar texture are considered more similar than those with different textures. These data are scraped from the internet using Bing Image Search API and manually annotated. The URLs of these images are provided as a reference. The users of this solution are welcome to use their own dataset. The end to end machine learning workflow for building such as solution is provided: data preprocessing, featurization, training, testing, evaluation, and ranking. All these major steps are provided in SQL Server Stored procedures with python script embedded inside, which makes it convenient to deploy such as solution with SQL Server ML Services. Read more about this solution at the [Image Similarity Website]( ## SQL Server Machine Learning Services SQL Server Machine Learning Services brings the compute to the data by running Python on the computer that hosts the database. It includes a database service that runs outside the SQL Server process and communicates securely with the Python runtime. This solution walks through the steps to create and refine data, train R models, and perform scoring on the SQL Server machine. Data scientists who are testing and developing solutions can work from the convenience of their Python IDE on their client machine, while [pushing the compute to the SQL Server machine]( The completed solutions are deployed to SQL Server 2017 by embedding calls to R in stored procedures. These solutions can then be further automated with SQL Server Integration Services and SQL Server agent. ## Pricing Your Azure subscription used for the deployment will incur consumption charges on the services used in this solution, approximately $2.06(USD)/hour for the default VM in the East US. ### Disclaimer * All prices shown are in US Dollar ($). This is a summary estimate, not a quote. For up to date pricing information please visit []( >Please ensure that you stop your VM instance when not actively using the solution. Running the VM will incur higher costs. > >**Please delete the solution if you are not using it.** ## Disclaimer ©2017 Microsoft Corporation. All rights reserved. This information is provided "as-is" and may change without notice. Microsoft makes no warranties, express or implied, with respect to the information provided here. Third party data was used to generate the Solution. You are responsible for respecting the rights of others, including procuring and complying with relevant licenses in order to create similar datasets.