Create and Deploy a REST API Extracting Predominant Colors from Images
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 apps from input images.
These are just few examples of how extracting the main colors from a picture may either improve operational efficiency or boost customer experience.
In this blog post, we use Python to implement the extraction of predominant colors from a given picture. Then, we use FastAPI and Docker to package and deploy the solution as a service.
0 Comments