image-processing-api
Unified interface for image processing services.
Main functionality:
- connect to served tensorflow networks and process images through them
- postprocess the results using flexible config files
- provide image manipulation tools (ex` trimming)
Endpoints:
Health
- /health/check_status - Check the status of API
- /health/health_check - Check the status of API and its dependencies
Image tagging
- /predict/tagger- Tag the image with 61 classes via Tagger multilabel network
- /predict/exterior_styles - Predict the architectural style of a house by the image of its facade via Exterior Styles network
- /predict/process_house_images - Tag all images of the house via Tagger network, pass facade images to Exterior Styles network and process those predictions to get full information on the house
- /predict/encoder Encode images into vectors via Encoder network
-
/api/get_info - Provide information about networks, such as
Image processing tools
- /tools/trim_image Trim the padding from image & return trimmed version
Schemas and documentation are available in {api_address}/docs or {api_address}/redoc in any browser
Deployment
Store the .env file in the project folder. It should contain the urls to served models
and configuration to connecting to the Vector Database:
Now you can deploy the api:
with unicorn
API is build with FastAPI & is run with uvicorn. Also you'll need pydantic for data validation and some other packages.
To install the requirements, run:
and to run it:
Alongside the Swagger docs generated by FastAPI, we generate a detailed code documentation using mkdocs. To deploy the docs:
Then run
with docker and docker-compose:
This will host the api on port 8000 & mkdocs documentation on 8001.
Configuration
API needs to connect to 3 networks: Tagger, ExteriorStyles classifier and Encoder.