Images can be processed via a POST request with a JSON body that has a “image_b64” field, containing a base 64 encoded image file and optional fields “blur_shape” and “text_mode”. “blur_shape” specifies how the blurred region should appear, whilst “text_mode” specifies what type of text-in-image mode should be used.
Valid options for blur_shape:
‘box’, standard blur shape
Valid options for text_mode:
‘document’, which is optimized for legible images such as photocopier scanss
‘image’, slower than document but optimized to detect hard to read text present in real images
‘none’, don’t perform text-in-image anonymization
The API will return a de-identified image. For an example on image de-identification, please see the python example ‘image_deid_test.py’. You can run it as follows:
$ python3 image_deid_test.py --image PATH_TO_IMAGE --blur_shape oval --text_mode none --key API_KEY
When a text in image mode is selected, the “output_checks_passed” self-check from the text mode is also returned.