Skip to content
Simple REST API for image color analysis
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
server add concurrency for prediction results Feb 16, 2019
.gitignore start parsing image pixels and getting colors Dec 4, 2018
Dockerfile docker prod crgo build release Jan 25, 2019
Dockerfile.dev add clustering algorithm for image analysis Feb 8, 2019
README.md
app.yaml

README.md

Rust Color Analyzer

Simple REST API for image color analysis.

This is a first attempt at using Rust, and largely a learning experience. Please feel free to contribute and teach me a few things.

Production

Feel free to test out the project here

Features

  • Submit a hosted URL or file upload at upload page
  • Allows for image url submission at predict endpoint
  • Allows for form data submission at submit endpoint
  • Parses base hex colors from server/src/colors.json
  • Output ordered list of colors based on individual pixel analysis
  • Runs on GAE Flexible custom runtime
  • UI Option to predict based on middle of image (middle 50% of pixels)

Up and Running

docker build -t color_analyzer .
docker build -t color_analyzer_dev -f Dockerfile.dev .
docker run -id -p 8080:8080 -v $(pwd)/server:/usr/src/app --name color color_analyzer_dev

Running test suite

docker exec -it color cargo test

Deploying

docker tag color_analyzer:latest us.gcr.io/rust-color-analyzer/color_analyzer
gcloud auth configure-docker
docker push us.gcr.io/rust-color-analyzer/color_analyzer
gcloud app deploy --image-url=us.gcr.io/rust-color-analyzer/color_analyzer app.yaml

TODO

  • Add K-NN approach for determining dominant color
  • Run all prediction operations asynchronously
  • Explore Luma color pixels as an options
You can’t perform that action at this time.