color-extractor  by algolia

CLI tool for extracting dominant colors from images, especially e-commerce fashion articles

Created 10 years ago
284 stars

Top 91.8% on SourcePulse

GitHubView on GitHub
Project Summary

This library and CLI tool extracts dominant colors from images, primarily targeting e-commerce fashion items with centered objects and simple backgrounds. It offers a configurable pipeline for color tagging, benefiting users who need to enhance product search relevancy with visual attributes.

How It Works

The tool processes images through a pipeline: resizing/cropping for speed and focus, background detection using corner colors and flood fill, optional skin detection to ignore human skin tones, K-Means clustering to group similar colors, cluster selection based on size or ratio, and finally, color naming using a KNN algorithm trained on XKCD color data. This modular approach allows fine-tuning of each step for optimal results.

Quick Start & Requirements

Highlighted Details

  • Extracts dominant colors from the main object in e-commerce images.
  • Pipeline includes background and skin detection, K-Means clustering, and KNN color naming.
  • Supports JSON enrichment for adding color tags to product records.
  • Offers extensive configuration options for each processing step.

Maintenance & Community

This project is released as-is and is no longer maintained by Algolia.

Licensing & Compatibility

The README does not specify a license.

Limitations & Caveats

The project is no longer maintained, and its precision may be hindered if images do not feature centered objects with simple backgrounds. Compatibility with newer Python versions or OpenCV releases is not guaranteed.

Health Check
Last Commit

3 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.