Skip to main content

Parameters

Use these parameters with POST http://localhost:8001/predict/. Send the image with image, upload_url, or upload (base64). All other parameters are optional.

note

Replace localhost with the IP address of the machine running the Docker container, if it is not the same one.

Parameter Reference​

image​

The image file to analyze. With cURL the path must start with the @ symbol. For example, image=@/tmp/vin.jpg. Instead of a file, you can send upload_url with the URL of an image, or upload with the base64-encoded image.

regions​

The countries where the vehicles are registered, as two-letter country codes. Send it comma separated (regions=us,ca) or repeated. A state suffix is ignored, so us-ca is the same as us. Codes that are not known are ignored.

The regions select the VIN rules. Every VIN has 17 characters, without the letters I, O, and Q.

RegionsFormatCheck digit (strict mode)
us, ca, mx9th character is a digit or X, valid model year, last 4 are digitsYes
EU countries except Germany (for example fr, es, it, nl, pl) and tr9th character is a digit or X, last 4 are digitsYes
de, cn17 charactersYes
au, am, by, kg, kz, ruLast 3 are digitsNo
Other or not set17 charactersNo

When a VIN has several possible readings and at least one matches the format, the readings that do not match are removed. With several regions, a reading that matches the rules of any of them is kept.

config​

Pass the config parameter as a JSON dictionary to adjust the engine configuration. Accepted values:

  • {"text_rule":"strict"}: Only return the VINs that have a reading matching the format. When a reading also passes the check digit of the regions, only that reading is returned.
  • {"text_formats":["..."]}: List of regular expressions that replace the format of the regions. For example, {"text_formats":["^WVW[A-HJ-NPR-Z0-9]{14}$"]}.

To combine options, put them in the same dictionary: {"text_rule":"strict","text_formats":["..."]}.

min_detection_score​

The engine first detects the areas that contain a VIN and gives each a confidence score between 0 and 1. Areas with a score below this value are removed from the output. The default is 0.1.

min_ocr_score​

The engine then reads the text of each area and gives each reading a confidence score between 0 and 1. When the best reading has a score below this value, the VIN is removed from the output. The default is 0.2.

camera_id​

Identifies the source of the image when several sources call the API. It is included in the output and does not change the recognition.

timestamp​

The time the image was taken. It is included in the output and does not change the recognition.