Example of an ANPR model trained on UK number plates.
Note: This is only the detection part, it does not do the OCR part.
- Python 3.8
- Check the latest version of the Intel Geti SDK for the full Python compatibility chart
-
Install prerequisites. You may also need to install pip. For example, on Ubuntu execute the following command to install Python and pip:
sudo apt install python3-dev python3-pip
If you already have installed pip before, make sure it is up to date by doing:
pip install --upgrade pip
-
Create a clean virtual environment:
One of the possible ways for creating a virtual environment is to use
virtualenv
:python -m pip install virtualenv python -m virtualenv <directory_for_environment>
Before starting to work inside the virtual environment, it should be activated:
On Linux and macOS:
source <directory_for_environment>/bin/activate
On Windows:
.\<directory_for_environment>\Scripts\activate
Please make sure that the environment contains wheel by calling the following command:
python -m pip install wheel
NOTE: On Linux and macOS, you may need to type
python3
instead ofpython
. -
Install requirements in the environment:
python -m pip install -r requirements.txt
Make sure to activate your virtual environment
- Edit
inferece_demo.py
to specify your media source. Use an index for cameras or supply a path to a video file. Then run!python inference_demo.py
-
If you use Anaconda as environment manager, please consider that OpenVINO has limited Conda support. It is still possible to use
conda
to create and activate your python environment, but in that case please use onlypip
(rather thanconda
) as a package manager for installing packages in your environment. -
If you have problems when you try to use the
pip install
command, please update pip version as per the following command:python -m pip install --upgrade pip