Skip to content

image-draw-bounding-boxes

Description

Note

More information about the service specification can be found in the Core concepts > Service documentation.

This microservice draws boxes on an image. It is intended to work with the text recognition OCR service. The bounding boxes are passed in a JSON file that corresponds to the output of the text recognition service. Namely, it must have the following structure: ` {"boxes":[ "position":{ "left": ..., "top": ..., "width": ..., "height": ..., }, {"position": ...}, ... ]} ` Where the values in "left", "top", "width" and "height" are given in pixels. The bounding boxes are drawn as red unfilled rectangles at the coordinates specified by the 4 fields above.

The JSON file may contain additional fields; they will be ignored.

Tools

The service uses Pillow to draw the boxes.

Environment variables

Check the Core concepts > Service > Environment variables documentation for more details.

Run the tests with Python

Check the Core concepts > Service > Run the tests with Python documentation for more details.

Start the service locally

Check the Core concepts > Service > Start the service locally documentation for more details.