This project explores innovative ways to explore relations between colour palettes in collections of images, using unsupervised machine learning algorithms from the Sci-kit library(K-Means clustering, Kernel PCA and t-SNE).
The source code is split into two parts:
- Python code to extract a 5-Colour Hexadecimal Palette from an image.
- Python code to visualise the relation between a list of the above extracted palettes.
The 5 colour palettes were extracted by converting the image to a 2D matrix of RGB Values(Nx3), which was used as input for the Mini Batch K-Means Clustering algorithm to return the colours(hex) from the five cluster centers.
- Here are some examples:
- (Top: Schiaparelli Fall 21 Couture (Look 23))
- (Bottom: Van Gogh-Sunflowers (fourth version))
A list of the 5 colour palettes obtained above, were visualised using 2 dimensionality reduction techniques. For the following visualisation, a dataset of 541 images, from multiple Fall 2021 Couture Fashion shows was used.
The RBF Kernel PCA algorithm was able to separate the palettes with darker colours from those with lighter colours, but grouped together palettes with saturated colours.
The t-SNE algorithm was more successful in grouping the palettes with similar colours and separating visually distinct palettes(such as the greens and pinks).
- Colour palettes of video thumbnails could be used to recommend similar videos to users.
- For the following visualisation, palettes from a random sample of 149 Netflix thumbnails were used.
- (Top Left: RuPaul's Drag Race All Stars)
- (Bottom Right: Bo Bunrham: Inside)
- Designers could use colour palettes used in top fashion shows to gain insights about fashion trends.
- For the following visualisation, a dataset of 541 images, from multiple Fall 2021 Couture Fashion shows was used.
- (Top Left: Valentino Fall Couture 21 Look 12)
- (Bottom Right: Schiaparelli Fall Couture 21 Look 20)
The concept explored in this project could have interesting applications in many fields like social media analytics, human computer interaction, art trends and so on. For example:
- Social media photo trend visualisation.
- Innovative visualisation of art pieces from different time periods.
- Classifying different kinds of flora by their colour.