Plate Recognizer SDK

We provide a Docker image with our ALPR technology. It can be used on-premises without an internet connection. It lets you read license plates from a vehicle picture. To use it, you will need to get a SDK license. An internet connection is needed during installation.

SDK Installation and Management

  1. Install Docker on your machine. See the system requirements.
  2. Download and run the SDK Manager.
  1. Install Docker on your machine. See the system requirements.
  2. In a terminal run wget https://raw.githubusercontent.com/marcbelmont/deep-license-plate-recognition/master/docker/PlateRec_SDK_Manager.py && python PlateRec_SDK_Manager.py
Are you stuck? Check our FAQ for help.

Manual Installation Guide

Use this guide if you need to manage the SDK manually. For example, if you want to script the installation / uninstallation process.

Installing the SDK

The SDK can be installed on a variety of hardware. See the system requirements.

Installation on an Intel CPU

Abbreviated installation steps below. For a detailed, step-by-step guide, see the Install Docker and SDK on Windows and the associated FAQ for help.
  1. Sign up and log in.
  2. Subscribe to a SDK plan.
  3. Install Docker on your local machine. See requirements.
  4. Get our SDK image. In a terminal run docker pull platerecognizer/alpr
  5. Install and run the container:

    docker run --rm -t -p 8080:8080 -v license:/license -e TOKEN=MY_TOKEN -e LICENSE_KEY=MY_KEY platerecognizer/alpr

The container exposes a REST interface. To verify that the installation was successful, run those commands in a new terminal.

# Get a picture
curl -o /tmp/car.jpg https://app.platerecognizer.com/static/demo.jpg
# And read the license plate
curl -F 'file=@/tmp/car.jpg' http://localhost:8080/v1/plate-reader/
                
:: Get a picture
curl -o car.jpg https://app.platerecognizer.com/static/demo.jpg
:: And read the license plate
curl -F "upload=@car.jpg" http://localhost:8080/v1/plate-reader/
                
Continue to the SDK documentation

Installation on a Raspberry Pi (Armv7)

Follow the steps 1) to 3) of the standard installation instructions.
  1. Get our SDK image. In a terminal run docker pull platerecognizer/alpr-raspberry-pi
  2. Run the container. Initialization can take up to 10-20 seconds.

    Use the command 5) but with image platerecognizer/alpr-raspberry-pi

Installation for GPU (Nvidia Only)

Make sure you have installed the right Nvidia drivers and have Nvidia-docker installed.

Follow the steps 1) to 3) of the standard installation instructions.

  1. Get our SDK image. In a terminal run docker pull platerecognizer/alpr-gpu
  2. Run the container.

    Option 1 (new version of nvidia-docker) docker run --gpus all --rm -t -p 8080:8080 -v license:/license -e TOKEN=MY_TOKEN -e LICENSE_KEY=MY_KEY platerecognizer/alpr-gpu

    Option 2 (Deprecated nvidia-docker2 version) docker run --runtime nvidia --rm -t -p 8080:8080 -v license:/license -e TOKEN=MY_TOKEN -e LICENSE_KEY=MY_KEY platerecognizer/alpr-gpu

Installation for Jetson Nano

Configure the Jetson Nano according to the official Jetson Nano Developer Kit Guide.

Follow the steps 1) to 3) of the standard installation instructions.

  1. Get our SDK image. In a terminal run docker pull platerecognizer/alpr-jetson
  2. Run the container. Initialization can take up to 20-60 seconds. After the first prediction, inference speed is around 200ms.

    nvidia-docker run --runtime nvidia --rm -t -p 8080:8080 -v license:/license -e TOKEN=MY_TOKEN -e LICENSE_KEY=MY_KEY platerecognizer/alpr-jetson

Updating the SDK

  1. Stop the running containers using the image. Run docker ps -q --filter ancestor=platerecognizer/alpr to get the container id. And then docker stop CONTAINER_ID to stop it.
  2. Update the image: docker pull platerecognizer/alpr.
  3. Run the container (see last step of Installation).

Uninstalling the SDK

Each license can only be used on a single machine. If you need to move your installation to a new machine, you first have to uninstall it from the initial machine. Step-by-step guide to uninstall the SDK on windows.

  1. Stop the running containers using the image. Run docker ps -q --filter ancestor=platerecognizer/alpr to get the container id. And then docker stop CONTAINER_ID to stop it.
  2. Run the container using this command: docker run --rm -t -v license:/license -e TOKEN=MY_TOKEN -e UNINSTALL=1 platerecognizer/alpr
  3. You can now remove the container using docker rm

Container Options

Start on Boot
To run the container automatically on system startup, run the container using the --restart always option. For a complete list of options see start on boot.
docker run --restart always -t -p 8080:8080 -v license:/license -e TOKEN=MY_TOKEN -e LICENSE_KEY=MY_KEY platerecognizer/alpr
Networking
  • Add --network=host to use the host's networking directly.
  • You may use a different port if 8080 is already used. For example, to use port 8888 do -p 8888:8080.
Speed Optimization
  • By default the SDK starts a single worker process. To fully use the machine's compute, you can enable multiple workers. For example, adding -e WORKERS=2 to docker run will start 2 worker processes. When this is enabled, it is preferred to call the API in a multi-threaded fashion.
  • Faster inference can also be achieved using the config parameter. See details in our documentation.

System Requirements

For best performance, we recommend running the container from a Linux machine. With a recent processor (7-8 gen Intel CPU with 4 cores), inference should take 50-100ms. Minimum requirements are:

  • Use an OS that supports Docker. See the installation guide for how to install on Windows, Mac or Linux.
    • If your system does not meet the requirements to run Docker Desktop, you can install Docker Toolbox.
  • Intel CPU 3rd gen or higher (must support AVX instructions). We also support the Raspberry Pi3 (inference speed of 1 second).
  • At least 500MB of free RAM

You can also use a recent Nvidia GPU with a minimum compute capability of 6.1 and can support minumum Cuda version of 9.0. Follow the above instruction on Docker installation and Nvidia-docker