Manual Installation Steps
If for some reason, you prefer not to use Plate Recognizer Installer, you can go through the steps below to manually install Stream with Docker.
For the commands below, make sure to change XXXXX with your License Key and YYYYY with your Plate Recognizer Token. Get your token and license key.
List of Docker Images
If you want to use a specific version of the software, set a tag. The tag structure is
platerecognizer/alpr-stream:<country>-<architecture>-<version>
<country>
: leave blank for global engine,thailand
,germany
,korea
,japan
,egypt
<architecture>
: leave blank for x86,raspberry
,jetson
,jetson-r35
,no-avx
,gpu
- for Nvidia GPU on x86 use
gpu
- for Apple Silicon M1/M1 Pro use
raspberry
- for the Jetson image, we support 2 Jetpack versions:
jetson-r35.3.1
andjetson-r32.7.1
.
- for Nvidia GPU on x86 use
<version>
: leave blank for latest.- To see all the tags, open on our Docker Hub and then click "Tags".
Here are a couple of examples:
- Intel x86 (with AVX instructions)
- Global
platerecognizer/alpr-stream
- Thailand
platerecognizer/alpr-stream:thailand
- Global
- Raspberry Pi (LattePanda, Orange Pi)
- Global
platerecognizer/alpr-stream:raspberry
- Global
- Nvidia Jetson (with GPU)
- Global
platerecognizer/alpr-stream:jetson
- Specific version
platerecognizer/alpr-stream:jetson-1.28.1-r32.6.1
- Global
Install Docker
Install Docker and confirm that it's running.
If you have a Raspberry Pi, please follow this instructions to install docker
If using Docker Desktop on Windows with the legacy Hyper-V backend and not WSL2, make sure to check this box (next to C) for Resource File Sharing and the click “Apply & Restart”.
Prerequisites
- Stream uses a single working directory at runtime that should not be ephemeral, it will contains extra configuration files and the processing outputs. It's mostly referred to as the Stream folder
- The directory is specified as a volume mapped to
/user-data
and should be writeable. On your local system, specify a bind mount to make it easy to edit the configuration files. - The directory structure of the Stream folder will be generated the first time you run Stream. The main configuration file(
config.ini
) is also created at this time.
Create a Stream folder. For example:
mkdir c:\users\kyt\documents\stream
Start Stream
For the following commands:
- Update directory bound to
/user-data
to your local directory.-v /path/to/my/folder:/user-data
--restart="unless-stopped"
is included so Stream automatically restarts(upon system reboot or Docker restart) unless explicitly stopped. This works great when combined with the-d
option so Stream runs in the background.
Starting Stream on Linux
In a terminal, run the following command:
docker pull platerecognizer/alpr-stream
To start the program, use docker run
. If you are using Linux (Intel x86):
docker run --restart="unless-stopped" -t --name stream \
-v /home/kyt/documents/stream:/user-data \
--user `id -u`:`id -g` \
-e LICENSE_KEY=XXXXX -e TOKEN=YYYYY \
platerecognizer/alpr-stream
Having problems? Make sure to read the docker run
checklist.
Starting Stream on Windows
Open up CMD Command Prompt
In Command Prompt, run the following command:
docker pull platerecognizer/alpr-stream
- CMD
- Linux Console over Windows
Having problems? Make sure to read the docker run
checklist.
Starting Stream on Nvidia Jetson
Need some help? See our Jetson FAQ for technical questions and advanced configuration options.
In Command Prompt, run the following command.
docker pull platerecognizer/alpr-stream:jetson
If you are using a Jetson device, make sure to include --runtime nvidia --group-add video
. The latest image is built for Jetpack 4.6 using it with another version may trigger errors. Otherwise, you can use older images.
docker run --restart="unless-stopped" --runtime nvidia -t --name stream \
-v /home/kyt/documents/stream:/user-data --privileged \
--group-add video --user `id -u`:`id -g` \
-e LICENSE_KEY=XXXXX -e TOKEN=YYYYY \
platerecognizer/alpr-stream:jetson
Having problems? Make sure to read the docker run
checklist.
Starting Stream on Raspberry Pi
In Command Prompt, run the following command.
docker pull platerecognizer/alpr-stream:raspberry
docker run --restart="unless-stopped" -t --name stream \
-v /home/kyt/documents/stream:/user-data --privileged \
--group-add video --user `id -u`:`id -g` \
-e LICENSE_KEY=XXXXX -e TOKEN=YYYYY \
platerecognizer/alpr-stream:raspberry
Having problems? Make sure to read the docker run
checklist.
Starting Stream with Desktop GPU (Nvidia Only)
Make sure you have installed the right Nvidia drivers and have Nvidia-docker installed. Tested with drivers version 525.
Pull the gpu
docker image:
docker pull platerecognizer/alpr-stream:gpu
Run the container with one of the following commands:
Option 1 (new version of nvidia-docker), notice the --gpus all
:
docker run --restart="unless-stopped" -t --name stream \
--gpus all \
-v /home/kyt/documents/stream:/user-data \
--user `id -u`:`id -g` \
-e LICENSE_KEY=XXXXX -e TOKEN=YYYYY \
platerecognizer/alpr-stream:gpu
Option 2 (Deprecated nvidia-docker2 version):
docker run --restart="unless-stopped" -t --name stream \
--runtime nvidia \
-v /home/kyt/documents/stream:/user-data \
--user `id -u`:`id -g` \
-e LICENSE_KEY=XXXXX -e TOKEN=YYYYY \
platerecognizer/alpr-stream:gpu
Having problems? Make sure to read the docker run
checklist.
First Run
- The first time you start Stream, a
config.ini
file is created in your Stream folder. - Now edit
config.ini
and change theurl
field. This can either be a video or an RTSP camera.
Check how to update the configurations.
Expected Output
When you run the command, you should get an output similar to this:
INFO:root:Plate Recognizer Stream v1.27.0
INFO:root:Loading detection zones.
INFO:root:Expires on 2022-01-07T06:55:00Z.
INFO:root:This license supports up to 20 camera(s).
INFO:camera-1:2021-09-02T18:10:07+00:00: Starting Camera One
INFO:camera-1:2021-09-02T18:10:13+00:00: Model Optimization (can take up to 3 minutes)...
INFO:camera-1:2021-09-02T18:10:13+00:00: Health Score: 100%
When Stream runs, You will see:
- Images in camera-1_screenshots
- By default, the prediction results are saved in a CSV file in your Stream folder. You may use other formats.
- The FPS refers to the frames per second that your machine is processing the video or camera feed. Example: INFO:camera-1:2021-08-23: Health Score: 100%
- There’s no need to worry if Stream is showing 4-6 FPS for situations where vehicles are driving fairly slow, such as 20-35 mph.