With the accelerated online eCommerce scene driven by the contactless shopping style in recent years, having a great recommendation system is essential to the business' success. However, it has always been challenging to provide any meaningful recommendations with the absence of user interaction history, known as the cold start problem. In this project, we attempted to create a comprehensive recommendation system that recommends both similar and complementary products using the power of deep learning and visual embeddings, which would effectively recommend products without need any knowledge of user preferences, user history, item propensity, or any other data.
The dataset used is the shop the look dataset and the complete the look dataset from Pinterest. Thank you for kindly sharing these great data sources to make this project possible.
- Download data - Run
cd src/dataset/data
and runpython download_data.py
- Get similar product embedding - Run
cd src
, make sure the in thefeatures/Embedding.py
, the class methodsimilar_product_embedding
is being selected, then runPYTHONPATH=../:. python features/Embedding.py
(be careful this could take up to 2 hours without the presence of a GPU) - Recommend Similar Product - Run
cd src
, make sure the in therecommend.py
, the functionrecommend_similar_products
is being selected, then runPYTHONPATH=../:. python recommend.py
- Download data - Run
cd src/dataset/data
and runpython download_data.py
- Train compatible model - Run
cd src
and runPYTHONPATH=../:. python models/training.py
- Get compatible product embedding - Run
cd src
, make sure the in thefeatures/Embedding.py
, the class methodcompatible_product_embedding
is being selected, then runPYTHONPATH=../:. python features/Embedding.py
(be careful this could take up to 15 hours without the presence of a GPU, 7 hours with GPU)<img - Evaluate the compatible model - Run
cd src
and runPYTHONPATH=../:. python models/evaluate.py
- Recommend Compatible Product - Run
cd src
, make sure the in therecommend.py
, the functionrecommend_compatible_products
is being selected, then runPYTHONPATH=../:. python recommend.py
Samples of similar product recommendation (on the left is the query product, on the right is the top 5 recommended similar products)
Samples of compatible product recommendation (on the left is the query product, on the right is the top 5 recommended compatible products)