Parameters
Use these REST parameters with both the On-premises and Cloud versions of USDOT OCR. All parameters except image are optional.
For the On-premises version, replace localhost with the IP address of the machine running the Docker container, if not the same one.
Parameter Reference
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.
config
Pass the config parameter as a JSON dictionary to adjust the engine configuration. Accepted values:
{"text_rule":"strict"}: Only accept the results that exactly match the default USDOT templates and templates, specified in"text_formats". For example, if USDOT ID is 3 letters and 3 numbers, the value ABC1234 will be discarded.{"text_formats":["..."]}: List of regular expressions. They are used to guide the engine's predictions. For example, if you know the output is generally 3 digits and 2 letters, you would use -{"text_formats":["[0-9][0-9][0-9][A-Z][A-Z]"]}. More information about the format. The engine may not follow the format when the predictions are too different. If you want to exactly match the regexp, you should also use"text_rule":"strict"(see above).
New in version 0.1.6.