Author - Gourang Patel [www.linkedin.com/in/gourang-patel]
Current implementations of image recommendations are used by giant e-commerce portals like Amazon, Alibaba, etc but still stand inefficient in the sense they require user text input. We, on the other hand, intend to optimize the whole system by taking images as input from the user. This would enhance the customer experience and fill up the gaps faced in text searches
Develop an image-based product recommendation system used primarily in the e-commerce domain. This engine will take as input an image of a certain product and recommend 5 similar products that resemble closely to the input image. We aim to achieve this goal by implementing a combination of dimensionality reduction, clustering, modelling and recommendation system techniques.
The fashion industry is one of the most prominent parts of the e-commerce industry and has tons of data publicly available. We decided to use the [Fashion Product Image dataset](https://www.kaggle.com/paramaggarwal/fashion-product-images-dataset) for our project. It’s a rich dataset of product features and images spread across 7 master categories, 49 subcategories, and 143 article types. Each product has a unique id to distinguish them. The dataset can broadly be divided into image data and style data. The data is described as follows: 1. Image data: Each image has a unique id and is of size 2400*1800*3. All the images have a clear white background with the object in the foreground.
- Style data: The styles.csv contains metadata about the image. Analysis of various fields like ‘gender’, ‘masterCategory’, ‘subCategory’, ‘articleType’ tells us about the distribution of the data.
The dataset is highly imbalanced across the different article types. To overcome this shortcoming, we started our implementation by taking into account the top 5 article type and verifying it through a thorough analysis of the product features. The article types which we finalized are: T-shirts, Shirts, Casual Shoes, Watches and Sports Shoes. We used 1000 images of each article type. Considering the problem statement and the practical nature of the project, we implemented an Image Data Generator to perform image augmentation by rotating and capturing images through 4 different angles. The new augmented dataset consisted of 5000 images for each of the 5 article types.
- Data Loading
- Selecting optimum dimensions to be used using Scree and Elbow Plot.
- Dimensionality Reduction
- PCA on original Image
- PCA on image with Reduced dimesnions
- TSNE on original image
- TSNE on image with Reduced dimensions
- Selecting optimum Cluster uing SSE Plot
- Clustering -
- KMeans
- Gaussian Mixture Model
- Agglomerative Clustering
- Select Best Clusterting technique to be used
- Use Distance metrices to Recommend Images
- Cosine Similarity
- Spatial Distances
- Dimensionality Reduction
- Clustering -
- KMeans 1.1 PCA Results
1.2 TSNE Results
- Gaussian Mixture Model
2.1 PCA Results
2.2 TSNE Results
3. Agglomerative Clustering
3.1 PCA Results
3.2 TSNE Results
- Select Best Clusterting technique to be used
- Use Distance metrices to Recommend Images
-Cosine Similarity and Spatial Distances
We finally recommend 5 similar images for every product entered as input @e-commerce by the user using best output from spatial or cosine similarity metrics.
- Integration with an e-commerce website with frontend and test recommendation engine on real time.
- Approach the problem-set with suprevised way as classification would lead to better results and accuaracy. Products like Casual shoes and sports shoes will be better segregated or differentiated using Neural Networks.
- Explore more distance metrices.