Skip to main content

Parameters

note

In all examples below replace localhost with the IP address of the machine running the docker container, if not the same one.

USDOT OCR on Premise supports the same REST parameters as USDOT OCR API. The app also exposes Swagger UI at http://localhost:8001/docs where you can try out and see the parameters in action.

Parameters could be combined in a curl request like this:

curl -F '[email protected]' -F 'min_detection_score=0.2' -F 'min_ocr_score=0.6' -F 'camera_id=1' -F 'timestamp=2023-01-01T12:00:00' http://localhost:8001/predict/

All parameters, except image, are optional. Below is a short description.

image​

Path to image file to upload to the app for analysis. Must start with @ symbol. For example, image=@/tmp/usdot.jpg.

min_detection_score​

On the first stage of reading usdot information from an image, the algorithm detects regions of text and assigns them a confidence score between 0 and 1. The higher the score, the more confident the algorithm is that the region contains useful information. This parameter cuts off regions with a score below the specified value from the output. The default is min_detection_score = 0.2.

min_ocr_score​

On the second stage of analyzing an image, the algorithm tries to read the text in the regions detected on the first stage, using our OCR technology. It produces different possible interpretations of the characters it can see and assigns each such interpretation a confidence score between 0 and 1. The higher the score, the more confident the algorithm is that this reading is correct. This parameter cuts off interpretations with a score below the specified value from the output. The default is min_ocr_score = 0.6.

camera_id​

This parameter is used to identify the source that produced the image in case you have multiple sources querying the app. It will be simply included in the output and does not influence the recognition process.

timestamp​

This parameter is used to identify time the image was taken to differentiate between different images. It will be simply included in the output and does not influence the recognition process.

Floating button icon
CTRL + .