This repository provides a sample Python application demonstrating how to use Tolling Vision — a Dockerized AI-powered service for tolling companies. Tolling Vision extracts key vehicle data from images or image sequences, including:
- ANPR/ALPR – Automatic Number Plate Recognition
- MMR – Make and Model Recognition
- ADR – Dangerous Goods Sign Recognition
Tolling Vision is highly scalable and integrates seamlessly via gRPC. For integration guidance, see the How to use Tolling Vision tutorial.
This sample leverages the analyze
function in the TollingVisionService
to process multiple images of a vehicle — such as front, rear, and overview shots — and extract license plates and vehicle model information.
Ensure the following tools are installed:
- Python 3.6+
- Tolling Vision Python Client — available on PyPI
- Tolling Vision service — running locally or remotely (see Get Started)
Use pip to install the required packages:
pip install grpcio-tools tollingvision-scsinfo
git clone https://github.com/smartcloudsol/tollingvision-python-sample.git
cd tollingvision-python-sample
Run the application with:
python3 tollingvision-sample.py <ADDRESS> <SECURED> <THREAD_COUNT> <IMAGE_FOLDER> <RESULT_FILE> <GROUP_PATTERN> <FRONT_PATTERN> <REAR_PATTERN> <OVERVIEW_PATTERN>
Parameter | Description |
---|---|
<ADDRESS> |
Address of the Tolling Vision service in ip:port format. |
<SECURED> |
True or False — whether the communication uses SSL/TLS encryption. |
<THREAD_COUNT> |
Number of parallel requests (up to the limit of your license). |
<IMAGE_FOLDER> |
Path to the folder containing images to process. |
<RESULT_FILE> |
File path for saving results (CSV format). |
<GROUP_PATTERN> |
Regular expression for grouping images (e.g., "^.{7}" — by the first 7 characters). The first match group is used as the key. |
<FRONT_PATTERN> |
Regex for identifying front images (e.g., ".*front.*" ). |
<REAR_PATTERN> |
Regex for identifying rear images (e.g., ".*rear.*" ). |
<OVERVIEW_PATTERN> |
Regex for identifying overview images (e.g., ".*scene.*" ). |
python3 tollingvision-sample.py 192.168.1.100:443 True 4 ./images ./results.csv "^.{7}" ".*front.*" ".*rear.*" ".*scene.*"
This project is provided for demonstration purposes. See the LICENSE file for more details.