Member-only story
Create and Deploy a REST API Extracting Predominant Colors from Images
Using unsupervised machine learning, FastAPI and Docker
Table of contents
- Problem statement
- Extract colors from images
- Project structure
- Code
- Deploy the Docker container
- Let’s try it!
- API documentation
- Conclusions
- License disclaimer
1. Problem statement
Let us imagine a control room of a manufacturing facility, where the fabricated products need to be sorted automatically. For instance, based on their color, goods may be redirected to different branches of a roller conveyor for further processing or packaging.
Otherwise, we can also imagine an online retailer trying to enhance the user experience by adding a search-by-color functionality. Customers may more easily find a clothing item from a particular color, thus simplifying their access to products of interest.
Or, just like the author, you can picture yourself as an IT consultant implementing a simple, fast and reusable tool to generate color palettes for presentations, charts and…