gofynd / mildnet

Visual Similarity research at Fynd. Contains code to reproduce 2 of our research papers.
https://arxiv.org/abs/1903.00905
Apache License 2.0
84 stars 33 forks source link
ai artificial-intelligence computer-vision deep-learning ecommerce feature-extraction image-retrieval keras machine-learning machinelearning ml recommendation-system recommender-system tensorflow visual-recommendations visual-search

PWC PWC

MILDNet

This repo cantains the training code used during Visual Similarity research at Fynd. One can easily reproduce our state of the art models MILDNet and Ranknet and 2 other research works from the past. 25 configs are present which constitutes configurations of most critical experiments by us.

For more details, refer to the Colab Notebook (execute training on Free GPUs or TPUs provided by Google in just 2 clicks) or head to our research papers on Arxiv:

We have also open-sourced 8 of our top experiment results with weights here. To analyze and compare all the results (training) head to this Colab notebook. To get an idea on using any of our open-sourced models models to find n similar items (inferencing) from your entire dataset head to this Colab notebook.

Introduction

Visual Recommendation is a crucial feature for any ecommerce platform. It gives the platform power of instantly suggesting similar looking products to what a user is browsing, thus capturing his/her immediate intent which could result in higher customer engagment (CTR) and hence the conversion.

The task of identifying similar products is not trivial as the details concerned here (pattern, structure etc.) are complexely grained in the product image pixels and these product comes in various variety even within the same class. CNNs have showed great understanding and results in this task.

The base of such a system is a CNN extracting key features from product images and returning a vector respresenting those features. When these embeddings for all the products are mapped on an n-dimensional space, it places similar products closer to non-similar items. The nearest neighbours are then the top most visual similar items. Below diagram gives a brief overview:

Repo Overview

Job Configs:

We carried out various experiments to study the performace of 4 research works (including ours). 8 of those variants can be readily tested here by this notebook:

Based on this experiments, below is the list of all the configs available to try out:

Note that mildnet_contrastive.cnf and the Default Models configs are the models compared in the research paper.

Training

Installation (only when running locally)

Make sure to have gsutil installed and the user to be logged in:

curl https://sdk.cloud.google.com | bash
exec -l $SHELL
gcloud init

Install requirements:

Set below configs in settings.cfg:

Run Training on Custom Job Config

View Logs from ML Engine

Contributing

Please read CONTRIBUTING.md and CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

Please see HISTORY.md. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the Apache License - see the LICENSE.txt file for details

Acknowledgments