It contains a few useful notebooks from "Shopee - Price Match Guarantee" competition hosted on kaggle. It covers topics ranging from EDA, Efficientnet for image embeddings, ArcFace loss for metric learning, LR scheduler, etc. All the codes are written in PyTorch. Following are the descriptions for the corresponsding notebooks:
- arcface-explained.ipynb: It explains how ArcFace is used for metric learning. The notebook can be found at https://www.kaggle.com/slawekbiel/arcface-explained.
- shopee-eda-understanding-the-competition.ipynb: It contains the code for some basic EDA. The notebook can be found at https://www.kaggle.com/heyytanay/shopee-eda-understanding-the-competition.
- pytorch-metric-learning-pipeline-only-images.ipynb: It contains the code for training efficientb3 model with arcface and CrossEntropy Loss for Metric Learning with the images provided in the dataset. Once the model is trained we can get the image embeddings for retrieving the similar images for test images. It does not include the inference part but just the training part. The notebook can be found at https://www.kaggle.com/tanulsingh077/pytorch-metric-learning-pipeline-only-images.
- metric-learning-pipeline-only-text-sbert.ipynb: It contains the code for training a Bert based model for Metric Learning on the title column of the dataset. Once the model is trained we can get the text embeddings for retrieving the similar titles for any given title from test data. It does not include the inference part but just the training part. The notebook can be found at https://www.kaggle.com/tanulsingh077/metric-learning-pipeline-only-text-sbert.
- metric-learning-image-tfidf-inference.ipynb: It contains the code for model inference using the already trained models. Effnet-B3 Trained with arc-face and Cross Entropy loss for Images and TFiDF for texts is being used as trained model for obtaining the inference. KNN is used to retrieve the similar images and titles. The code can be found at https://www.kaggle.com/tanulsingh077/metric-learning-image-tfidf-inference?scriptVersionId=58359119.
- metric_learning.py: It contains the code for different metric learning techniques.