Blue Iris and CodeProject.AI ALPR

Try the below settings
Ken did reply to my earlier message and it appears there was a change in BlueIris that changed the behavior for me to what it should have been all along. His explanation (below) also helped me. Obviously using the sample from @MikeLud1 worked, but I didn't fully understand how or why. I naively thought that objects:0 was preventing ANY model from running, but that only blocks the standard ones. Hopefully the explanation here will help everyone else as well.
"objects:0" just means to not use the STANDARD objects model. All custom models will be used unless you specify them individually.

Adding ,alpr will work ... this is not the name of a custom model, but its presence on the list prevents them all from being used. You could just put NO in that box (or anything else that's not the name of a custom model). This new behavior is the result of a bug fix, it's now operating as it should.
 
Anyone else having an issue with the License Plate Reader (3.0.2) module crashing? I have tried uninstalling and re-installing the module with no luck.

I just moved Code Project AI to a new PC with an NVIDIA 2060 GPU. This was a fresh install of CPAI (2.5.6) on this PC.

My setup:

Server version: 2.5.6
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (Intel)
1 CPU x 4 cores. 8 logical processors (x64)
GPU (Primary): NVIDIA GeForce RTX 2060 (6 GiB) (NVIDIA)
Driver: 551.86, CUDA: 12.4 (up to: 12.4), Compute: 7.5, cuDNN: 9.0
System RAM: 12 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.10
.NET SDK: Not found
Default Python: Not found
Go: Not found
NodeJS: Not found
Video adapter info:
NVIDIA GeForce RTX 2060:
Driver Version 31.0.15.5186
Video Processor NVIDIA GeForce RTX 2060
System GPU info:
GPU 3D Usage 1%
GPU RAM Usage 2.5 GiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168


Installing ALPR Module with Error:
Installing module License Plate Reader 3.0.2

Installing Python 3.9
Python 3.9 is already installed
Creating Virtual Environment (Local)...Virtual Environment already present
Confirming we have Python 3.9 in our virtual environment...present
Downloading ALPR models...already exists...Expanding...Done.
Copying contents of ocr-en-pp_ocrv4-paddle.zip to paddleocr...done
Installing Python packages for License Plate Reader
Installing GPU-enabled libraries: If available
Ensuring Python package manager (pip) is installed...Done
Ensuring Python package manager (pip) is up to date...Done
Python packages specified by requirements.windows.cuda12.txt
- Installing PaddlePaddle, Parallel Distributed Deep Learning...Already installed
- Installing PaddleOCR, the OCR toolkit based on PaddlePaddle...Already installed
- Installing imutils, the image utilities library...Already installed
- Installing Pillow, a Python Image Library...Already installed
- Installing OpenCV, the Computer Vision library for Python...Already installed
- Installing NumPy, a package for scientific computing...Already installed
Installing Python packages for the CodeProject.AI Server SDK
Ensuring Python package manager (pip) is installed...Done
Ensuring Python package manager (pip) is up to date...Done
Python packages specified by requirements.txt
- Installing Pillow, a Python Image Library...Already installed
- Installing Charset normalizer...Already installed
- Installing aiohttp, the Async IO HTTP library...Already installed
- Installing aiofiles, the Async IO Files library...Already installed
- Installing py-cpuinfo to allow us to query CPU info...Already installed
- Installing Requests, the HTTP library...Already installed
Executing post-install script for License Plate Reader
Applying PaddleOCR patch
1 file(s) copied.
Self test: Error: Can not import paddle core while this file exists: C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\libpaddle.pyd
Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\core.py", line 268, in <module>
from . import libpaddle
ImportError: DLL load failed while importing libpaddle: A dynamic link library (DLL) initialization routine failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 16, in <module>
from ALPR import init_detect_platenumber, detect_platenumber
File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 19, in <module>
from paddleocr import PaddleOCR
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddleocr\init.py", line 14, in <module>
from .paddleocr import *
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddleocr\paddleocr.py", line 21, in <module>
import paddle
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\init.py", line 28, in <module>
from .base import core # noqa: F401
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\init.py", line 36, in <module>
from . import core
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\core.py", line 375, in <module>
if not avx_supported() and libpaddle.is_compiled_with_avx():
NameError: name 'libpaddle' is not defined

Self-test passed
Module setup time 00:01:09.09

Oddly, it will start and run on CPU for about 10 minutes and then crashes with a "Failed to Start" message.

1711491511172.png
 
Anyone else having an issue with the License Plate Reader (3.0.2) module crashing? I have tried uninstalling and re-installing the module with no luck.

I just moved Code Project AI to a new PC with an NVIDIA 2060 GPU. This was a fresh install of CPAI (2.5.6) on this PC.

My setup:
Server version: 2.5.6
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (Intel)
1 CPU x 4 cores. 8 logical processors (x64)
GPU (Primary): NVIDIA GeForce RTX 2060 (6 GiB) (NVIDIA)
Driver: 551.86, CUDA: 12.4 (up to: 12.4), Compute: 7.5, cuDNN: 9.0
System RAM: 12 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.10
.NET SDK: Not found
Default Python: Not found
Go: Not found
NodeJS: Not found
Video adapter info:
NVIDIA GeForce RTX 2060:
Driver Version 31.0.15.5186
Video Processor NVIDIA GeForce RTX 2060
System GPU info:
GPU 3D Usage 1%
GPU RAM Usage 2.5 GiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168


Installing ALPR Module with Error:
Installing module License Plate Reader 3.0.2

Installing Python 3.9
Python 3.9 is already installed
Creating Virtual Environment (Local)...Virtual Environment already present
Confirming we have Python 3.9 in our virtual environment...present
Downloading ALPR models...already exists...Expanding...Done.
Copying contents of ocr-en-pp_ocrv4-paddle.zip to paddleocr...done
Installing Python packages for License Plate Reader
Installing GPU-enabled libraries: If available
Ensuring Python package manager (pip) is installed...Done
Ensuring Python package manager (pip) is up to date...Done
Python packages specified by requirements.windows.cuda12.txt
- Installing PaddlePaddle, Parallel Distributed Deep Learning...Already installed
- Installing PaddleOCR, the OCR toolkit based on PaddlePaddle...Already installed
- Installing imutils, the image utilities library...Already installed
- Installing Pillow, a Python Image Library...Already installed
- Installing OpenCV, the Computer Vision library for Python...Already installed
- Installing NumPy, a package for scientific computing...Already installed
Installing Python packages for the CodeProject.AI Server SDK
Ensuring Python package manager (pip) is installed...Done
Ensuring Python package manager (pip) is up to date...Done
Python packages specified by requirements.txt
- Installing Pillow, a Python Image Library...Already installed
- Installing Charset normalizer...Already installed
- Installing aiohttp, the Async IO HTTP library...Already installed
- Installing aiofiles, the Async IO Files library...Already installed
- Installing py-cpuinfo to allow us to query CPU info...Already installed
- Installing Requests, the HTTP library...Already installed
Executing post-install script for License Plate Reader
Applying PaddleOCR patch
1 file(s) copied.
Self test: Error: Can not import paddle core while this file exists: C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\libpaddle.pyd
Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\core.py", line 268, in <module>
from . import libpaddle
ImportError: DLL load failed while importing libpaddle: A dynamic link library (DLL) initialization routine failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 16, in <module>
from ALPR import init_detect_platenumber, detect_platenumber
File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 19, in <module>
from paddleocr import PaddleOCR
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddleocr\init.py", line 14, in <module>
from .paddleocr import *
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddleocr\paddleocr.py", line 21, in <module>
import paddle
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\init.py", line 28, in <module>
from .base import core # noqa: F401
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\init.py", line 36, in <module>
from . import core
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\core.py", line 375, in <module>
if not avx_supported() and libpaddle.is_compiled_with_avx():
NameError: name 'libpaddle' is not defined

Self-test passed
Module setup time 00:01:09.09

Oddly, it will start and run on CPU for about 10 minutes and then crashes with a "Failed to Start" message.

View attachment 190704
It looks like you have CUDA 12 installed, with your GPU you should be using CUDA 11.8. To confirm which CUDA version you have install open a Command Prompt are run nvcc --version then post a screenshot of the results, like the below.

1711493682129.png
 
  • Like
Reactions: looney2ns
It looks like you have CUDA 12 installed, with your GPU you should be using CUDA 11.8. To confirm which CUDA version you have install open a Command Prompt are run nvcc --version then post a screenshot of the results, like the below.

View attachment 190707
Thanks again, Mike, for all your help.

It looks like it is either not installed in the path or CUDA is not fully present on this machine.


1711508326728.png
 
Some progress.

I downloaded CUDA 11.8 and installed it. I went to uninstall the LPR module and found that there was an update so I performed the update (3.0.3).

When it completed, the LPR module started as CPU only and crashed with a "failed to start" message about 5 minutes later.

I am going to try to uninstall / reinstall the LPR module and then reboot the system and try again.

1711595142999.png

1711595321743.png
 
Some progress.

I downloaded CUDA 11.8 and installed it. I went to uninstall the LPR module and found that there was an update so I performed the update (3.0.3).

When it completed, the LPR module started as CPU only and crashed with a "failed to start" message about 5 minutes later.

I am going to try to uninstall / reinstall the LPR module and then reboot the system and try again.

View attachment 190820

View attachment 190821
After installing CUDA 11.8 did you run install_cuDNN.bat

1711595977609.png
 
Script ran with no errors. LPR module started, but as CPU and then crashed a few minutes later. Going to reboot the box and see if that changes anything.
1711596568875.png
 
Hey Mike,

I went to install LPR 3.0.3 and I am getting the following errors? It won't let me install the old version (3.0.2) now. Any idea's?

22:36:43:Unable to delete install folder for ALPR (Access to the path 'python.exe' is denied.)
22:36:43:Unable to uninstall older version of ALPR: Unable to delete install folder for ALPR

22:36:58:ALPR: Python packages specified by requirements.txt
22:36:58:ALPR: - Installing Pillow, a Python Image Library...(failed check) Done
22:36:59:ALPR: - Installing Charset normalizer...(failed check) Done
22:36:59:ALPR: - Installing aiohttp, the Async IO HTTP library...(failed check) Done
22:36:59:ALPR: - Installing aiofiles, the Async IO Files library...(failed check) Done
22:36:59:ALPR: - Installing py-cpuinfo to allow us to query CPU info...(failed check) Done
22:36:59:ALPR: - Installing Requests, the HTTP library...(failed check) Done
22:36:59:ALPR: Module setup time 00:00:54.30
22:36:59:ALPR: Setup complete
22:36:59:ALPR: Total setup time 00:01:05.52
22:36:59:Module ALPR installed successfully.
22:36:59:Config for ALPR is invalid. Unable to start.

22:41:21:Response timeout. Try increasing the timeout value

Rick
 
Hey Mike,

I went to install LPR 3.0.3 and I am getting the following errors? It won't let me install the old version (3.0.2) now. Any idea's?

22:36:43:Unable to delete install folder for ALPR (Access to the path 'python.exe' is denied.)
22:36:43:Unable to uninstall older version of ALPR: Unable to delete install folder for ALPR

22:36:58:ALPR: Python packages specified by requirements.txt
22:36:58:ALPR: - Installing Pillow, a Python Image Library...(failed check) Done
22:36:59:ALPR: - Installing Charset normalizer...(failed check) Done
22:36:59:ALPR: - Installing aiohttp, the Async IO HTTP library...(failed check) Done
22:36:59:ALPR: - Installing aiofiles, the Async IO Files library...(failed check) Done
22:36:59:ALPR: - Installing py-cpuinfo to allow us to query CPU info...(failed check) Done
22:36:59:ALPR: - Installing Requests, the HTTP library...(failed check) Done
22:36:59:ALPR: Module setup time 00:00:54.30
22:36:59:ALPR: Setup complete
22:36:59:ALPR: Total setup time 00:01:05.52
22:36:59:Module ALPR installed successfully.
22:36:59:Config for ALPR is invalid. Unable to start.

22:41:21:Response timeout. Try increasing the timeout value

Rick
Try uninstalling the module then reinstall using Do not use download cache

1711597828548.png
 
Script ran with no errors. LPR module started, but as CPU and then crashed a few minutes later. Going to reboot the box and see if that changes anything.
View attachment 190823
No Change, unfortunately.

This is the install log:

373.3Gb of 457Gb available on

General CodeProject.AI setup

Creating Directories...Done

GPU support

CUDA Present...Yes (CUDA 11.8, cuDNN 9.0)
ROCm Present...No

Reading ALPR settings.......Done
Installing module License Plate Reader 3.0.3

Installing Python 3.9
Python 3.9 is already installed
Creating Virtual Environment (Local)...Virtual Environment already present
Confirming we have Python 3.9 in our virtual environment...present
Downloading ALPR models...already exists...Expanding...Done.
Copying contents of ocr-en-pp_ocrv4-paddle.zip to paddleocr...done
Installing Python packages for License Plate Reader
Installing GPU-enabled libraries: If available
Ensuring Python package manager (pip) is installed...Done
Ensuring Python package manager (pip) is up to date...Done
Python packages specified by requirements.windows.cuda11_8.txt
- Installing PaddlePaddle, Parallel Distributed Deep Learning...Already installed
- Installing PaddleOCR, the OCR toolkit based on PaddlePaddle...Already installed
- Installing imutils, the image utilities library...Already installed
- Installing Pillow, a Python Image Library...Already installed
- Installing OpenCV, the Computer Vision library for Python...Already installed
- Installing NumPy, a package for scientific computing...Already installed
Installing Python packages for the CodeProject.AI Server SDK
Ensuring Python package manager (pip) is installed...Done
Ensuring Python package manager (pip) is up to date...Done
Python packages specified by requirements.txt
- Installing Pillow, a Python Image Library...Already installed
- Installing Charset normalizer...Already installed
- Installing aiohttp, the Async IO HTTP library...Already installed
- Installing aiofiles, the Async IO Files library...Already installed
- Installing py-cpuinfo to allow us to query CPU info...Already installed
- Installing Requests, the HTTP library...Already installed
Executing post-install script for License Plate Reader
Applying PaddleOCR patch
1 file(s) copied.
Self test: Error: Can not import paddle core while this file exists: C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\libpaddle.pyd
Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\core.py", line 268, in <module>
from . import libpaddle
ImportError: DLL load failed while importing libpaddle: A dynamic link library (DLL) initialization routine failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 16, in <module>
from ALPR import init_detect_platenumber, detect_platenumber
File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 19, in <module>
from paddleocr import PaddleOCR
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddleocr\init.py", line 14, in <module>
from .paddleocr import *
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddleocr\paddleocr.py", line 21, in <module>
import paddle
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\init.py", line 28, in <module>
from .base import core # noqa: F401
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\init.py", line 36, in <module>
from . import core
File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\base\core.py", line 375, in <module>
if not avx_supported() and libpaddle.is_compiled_with_avx():
NameError: name 'libpaddle' is not defined
Self-test passed
Module setup time 00:01:09.53

Setup complete

Total setup time 00:01:10.60
 
Hey Mike,

I went to install LPR 3.0.3 and I am getting the following errors? It won't let me install the old version (3.0.2) now. Any idea's?

22:36:43:Unable to delete install folder for ALPR (Access to the path 'python.exe' is denied.)
22:36:43:Unable to uninstall older version of ALPR: Unable to delete install folder for ALPR

22:36:58:ALPR: Python packages specified by requirements.txt
22:36:58:ALPR: - Installing Pillow, a Python Image Library...(failed check) Done
22:36:59:ALPR: - Installing Charset normalizer...(failed check) Done
22:36:59:ALPR: - Installing aiohttp, the Async IO HTTP library...(failed check) Done
22:36:59:ALPR: - Installing aiofiles, the Async IO Files library...(failed check) Done
22:36:59:ALPR: - Installing py-cpuinfo to allow us to query CPU info...(failed check) Done
22:36:59:ALPR: - Installing Requests, the HTTP library...(failed check) Done
22:36:59:ALPR: Module setup time 00:00:54.30
22:36:59:ALPR: Setup complete
22:36:59:ALPR: Total setup time 00:01:05.52
22:36:59:Module ALPR installed successfully.
22:36:59:Config for ALPR is invalid. Unable to start.

22:41:21:Response timeout. Try increasing the timeout value

Rick

Oh 3.0.3 is available now?
 
  • Like
Reactions: Skinny1
To use the new Save Cropped Plate feature you need to create a new camera with the below settings

View attachment 188176
View attachment 188177
View attachment 188178

I just updated to the new LPR version and set this up.

Every time a car goes by, this ALPR "camera" restarts in BI and I get the plate image on the right, but nothing shows up in the alerts tab to the left - is there another box we need to check - like do we have to save jpg or video in BI?
 
Last edited:
I just updated to the new LPR version and set this up.

Every time a car goes by, this ALPR "camera" restarts in BI and I get the plate image on the right, but nothing shows up in the alerts tab to the left - is there another box we need to check - like do we have to save jpg or video in BI?

Do you have the box checked in Blue Iris Settings that says "ALPR for plates?
 
I just updated to the new LPR version and set this up.

Every time a car goes by, this ALPR "camera" restarts in BI and I get the plate image on the right, but nothing shows up in the alerts tab to the left - is there another box we need to check - like do we have to save jpg or video in BI?
Yes save jpg also have you ALPR camera trigger the new camera you created.
1711743991527.png

1711744119047.png
 
I just updated to the new LPR version and set this up.

Every time a car goes by, this ALPR "camera" restarts in BI and I get the plate image on the right, but nothing shows up in the alerts tab to the left - is there another box we need to check - like do we have to save jpg or video in BI?
Also make sure you Enable Save Cropped Plate.

1711744316725.png