Skip to content

Dominant color extraction using automated clustering models (K-means, K-medoids clustering).

Notifications You must be signed in to change notification settings

konsteva/Dominant-Color-Extraction-UnsupervisedML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Dominant-Color-Extraction-UnsupervisedML

In this project an automated dominant color extraction method using clustering models (K-means, K-medoids clustering) is proposed and implemented. The functions in the jupyter file can be used as a mini toolbox to help anyone who might be interested in color extraction and/or quantification of colors in an image. Possible uses of the functions in the notebook include assistance in: marketing analysis, semiotics, sociology of colors, automatic creation of movie scene timestamps and artistic projects.

Some general examples:

Input Image:

Function Call:

get_dominant_colors(image, k=k, model='kmedoids', plot_elbow=True, max_clusters=20, plot_dominant_colors=True, metric='distance', color_ratios=True, pearson_sensitivity=pearson_sensitivity)

Dominant Colors:

Input Image:

Function Call:

get_dominant_colors(image, k=k, model='kmedoids', plot_elbow=True, max_clusters=20, plot_dominant_colors=True, metric='distance', color_ratios=True, pearson_sensitivity=pearson_sensitivity)

Dominant Colors:

Input Image:

Function Call:

get_dominant_colors(image, k=k, model='kmeans', plot_elbow=True, max_clusters=20, plot_dominant_colors=True, metric='distance', color_ratios=True, pearson_sensitivity=pearson_sensitivity)

Dominant Colors:

Input Image:

Function Call:

get_dominant_colors(image, k=k, model='kmeans', plot_elbow=True, max_clusters=20, plot_dominant_colors=True, metric='pearson', color_ratios=True, pearson_sensitivity=pearson_sensitivity)

Dominant Colors:

Input Image:

Function Call:

get_dominant_colors(image, k=k, model='kmedoids', plot_elbow=True, max_clusters=20, plot_dominant_colors=True, metric='distance', color_ratios=True, pearson_sensitivity=pearson_sensitivity)

Dominant Colors:

Movie Scene Detection

Input Images:

1/100 of the frames from Stanley kubrick's movie "The Shining"

2 Dominant Colors per frame:

For example the red part of the photo above is the bathroom scene:

Time Magazine Covers 1923-2022: 2 Dominant Colors

About

Dominant color extraction using automated clustering models (K-means, K-medoids clustering).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published