The image above is an example of usage for the application. And this is how the output looks like:
{
"palette": [
"#312212",
"#876E51",
"#ADA081",
"#5C492F",
"#CECBBC"
]
}
I'm using poetry
as package manager for this application.
Run the command:
docker compose up -d --build
Running manually
-
first install the dependencies
poetry install
-
then run the project in
poetry shell
:uvicorn --reload colors_api.api:app --port 10001
Once the application is running, you can browse to
http://localhost:10001/docs
and learn more about the endpoints.
Until now, we have:
- /healthcheck - checks if the API is running
- /colors?n_colors - extract a given number of colors from a given image and return a list of hex colors.
- TDD
- FastAPI
- Color segmentation with OpenCV and the Kmeans algorithm
- Image upload
Features I want to implement:
- User authentication
- Request rate limits
- Database integration
- Metadata collection
- Limit image size
- To have a different endpoint for really large images (async)