Blue Iris and CodeProject.AI ALPR

I've also tried running it with custom models unticked:

1682821032266.png

And I end up getting the error below....

1682820964716.png
 
So it appears the issue is that your custom-models folder does not exist. I would suggest you uninstall the application and then reinstall following the steps Mike has listed in this post: Blue Iris and CodeProject.AI ALPR.

If for some reason that doesn't work you can create a "custom-models" sub-directory in in your C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo directory and then manually add whatever custom models you want to use to your custom-models directory. The custom models can be found at this link.
 
Last edited:
  • Like
Reactions: MikeLud1 and actran
I get this error on ALPR install -

ALPR: sahi 0.11.13 requires click==8.0.4, but you have click 8.1.3 which is incompatible.

this is a docker install.
Did you solve this?
I have the same issue, at some point it managed to be installed… but I think that was when i removed the mapping of /app/modules according to Running CodeProject.AI Server in Docker - CodeProject.AI Server v2.1.0. But right now I'm failing to recreate, it fails whatever I do, so it so probably just was some coincident.
 
To All,

The ALPR module does no work with CUDA 12.x.x, it only works with CUDA 11.x.x.
So if you are using the ALPR module with GPU CUDA the only latest version of CUDA that the module will work with is CUDA 11.8.0


Just got ALPR deployed yesterday, I did have a fight with CUDNN proper install but finally got APLR - License Plate Reader 2.2 (Codeproject 2.1.6) working on CUDA 12.1 + CUDNN v8.9.0.131. RTX 3050 on external PC from Blue Iris.
(Edit: I did have to copy cublas64_12.dll and rename cublas64_11.dll)

What I'm struggling with now is understanding the timing...Our bullet cams do work with picture generated with digital zoom. But not regular shot.
Also have PTZs with smart tracking that zoom right in and follow vehicle and get perfect shot of plates but the codeproject analysis happens too quickly. The begin analysis with leading motion setting doesn't make a difference.

Unrelated but Smart tracking also creating other issues with car detect with the static parked cars in driveway. When on PTZ preset # the static object is ignored (occupied) correctly but the moment the smart tracking happens codeproject believes its a new car. What would be awesome is if similar to face recognition I could provide a handful of pics to BI / Codeproject of different angles and then name object and put it in the ignore. Just like Face recognition.

Speaking of face recognition. I cannot get it working with codeproject 2.1.6 + Object Detection (YOLOv5 6.2). Once face recognition is turned on in BI all AI analysis returns AI error 500. Turn off and AI works again.
Mentioned here. AI: error 500 and AI: error 200
 
Last edited:
So how does BI determine what frame to send CPAI for analysis? I have a pretrigger time of 2 seconds in BI for my LPR camera. That way I have a little bit of padding for the clip/alert before the car moves into the frame. What I’m finding is that BI is sending a blank picture where the car hasn’t even entered the FOV yet to CPAI and it’s being kicked back as “Nothing found”. How do I get BI to send in the entire clip (or at least more of the clip) so the car is in the FOV?
 
So how does BI determine what frame to send CPAI for analysis? I have a pretrigger time of 2 seconds in BI for my LPR camera. That way I have a little bit of padding for the clip/alert before the car moves into the frame. What I’m finding is that BI is sending a blank picture where the car hasn’t even entered the FOV yet to CPAI and it’s being kicked back as “Nothing found”. How do I get BI to send in the entire clip (or at least more of the clip) so the car is in the FOV?

Hi. I finally got ours working decently. However its on our PTZs with smart tracking and zooming that really get the plate large and in focus. Hikvision intrusion detect sets off smart tracking + external trigger to BI + AI.

These are the settings I found most relevant to get ALPR reading plate #s.
BI Triggers tab , AI
Uncheck Begin analysis with motion-leading image
Play with both settings real time images + analyze each one X seconds.

For my scenario the smart tracking w/ zooming has a max of 30 seconds it can track for. So I've got it set for 20 real time images every 1 second. Our Cams do not work well with night plates so this larger AI analysis set is just for a day AI profile and then return at night to 10 image every 500ms.

I will say however that our static x4 bullet cams are not working well with ALPR or even dayplate detection. If I digital zoom and take a picture it will read plate manually. But not so much with regular view. Though I haven't increased the amount of pics analyzed on them as I primarily wanted it for our PTZs.

I believe it really comes down to putting more of a load on Codeproject system by feeding it a larger set of pics so at least one hits with moving vehicle / license plate in focus.
Hope helps.
 
  • Like
Reactions: chriscrazyacres
How do I get BI to send in the entire clip (or at least more of the clip) so the car is in the FOV?
With my LPR camera (IPC-HFW5241E-Z12E) I have found that enabling the "Begin analysis with motion-leading image" option helps. I'm also using a 3 second pretrigger and a 0.1 second make time. I'm analyzing +4 images at 500ms.
 
Last edited:
  • Like
Reactions: biggen
Alright guys. Thanks for that. I think it’s definitely a timing issue. My LPR cam is in its own group and it’s triggered by my overview cam. Then I have pre buffer added to the LPR cam’s trigger setting so that I make sure I don’t miss any part of the car. I guess I just need to send more frames to CPAI. I’ll play around with it and see what I can come up with.

Its too bad one can’t just send the entire clip into for analysis much like OpenALPR works. I’ve found that if I have two cars coming through it may read the first cars plate but miss the second one because it’s the same trigger.
 
Last edited:
  • Like
Reactions: djmadfx
I am running 2.1.9 - I am working on figuring out the APLR and have read through quite a bit of the threads. When I set the License Plate reader to GPU is crashes all of the time. So far using CPU it is not crashing. The service will stop/start continuingly when I turn on 'ALPR for plates' in BlueIris. I now have it stable with the module set to CPU. I uninstalled 2.0.8 (had the same problem with that version), deleted the directories and did a clean install of 2.1.9

Server version: 2.1.9-Beta
Operating System: Windows (Microsoft Windows 11 version 10.0.22621)
CPUs: Intel(R) Xeon(R) W-2123 CPU @ 3.60GHz
1 CPU x 4 cores. 8 logical processors (x64)
GPU: NVIDIA GeForce GTX 1070 (8 GiB) (NVidia)
Driver: 531.18 CUDA: 12.1 Compute: 6.1
System RAM: 32 GiB
Target: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
.NET framework: .NET 7.0.5
System GPU info:
GPU 3D Usage 5%
GPU RAM Usage 2.2 GiB
Video adapter info:
NVIDIA GeForce GTX 1070:
Driver Version 31.0.15.3118
Video Processor NVIDIA GeForce GTX 1070
Global Environment variables:
CPAI_APPROOTPATH = C:\Program Files\CodeProject\AI
CPAI_PORT = 32168

I believe I saw someone else with the same issue. Looking for some input - please let me know if you need any more information.
 
I am running 2.1.9 - I am working on figuring out the APLR and have read through quite a bit of the threads. When I set the License Plate reader to GPU is crashes all of the time. So far using CPU it is not crashing. The service will stop/start continuingly when I turn on 'ALPR for plates' in BlueIris. I now have it stable with the module set to CPU. I uninstalled 2.0.8 (had the same problem with that version), deleted the directories and did a clean install of 2.1.9

Server version: 2.1.9-Beta
Operating System: Windows (Microsoft Windows 11 version 10.0.22621)
CPUs: Intel(R) Xeon(R) W-2123 CPU @ 3.60GHz
1 CPU x 4 cores. 8 logical processors (x64)
GPU: NVIDIA GeForce GTX 1070 (8 GiB) (NVidia)
Driver: 531.18 CUDA: 12.1 Compute: 6.1
System RAM: 32 GiB
Target: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
.NET framework: .NET 7.0.5
System GPU info:
GPU 3D Usage 5%
GPU RAM Usage 2.2 GiB
Video adapter info:
NVIDIA GeForce GTX 1070:
Driver Version 31.0.15.3118
Video Processor NVIDIA GeForce GTX 1070
Global Environment variables:
CPAI_APPROOTPATH = C:\Program Files\CodeProject\AI
CPAI_PORT = 32168

I believe I saw someone else with the same issue. Looking for some input - please let me know if you need any more information.
It looks like you have CUDA 12.1 installed. The ALPR module does not work with CUDA 12.1, it only works with CUDA 11.x so downgrade to CUDA 11.8
 
  • Like
Reactions: actran and Tinman
I had my license plate reader working great.

It was reporting plates and their accuracy to MQTT. Today around lunch, I went into the AI and I tried to add a package to actually see packages (package.pt) to my local codeproject.ai directory. I didn't even add it to the codeproject machine I use (I used a different machine. I didn't change anything on the camera settings...

Codeproject is getting the plates just fine... (another machine)

I am not using any CUDA or acceleration. Since things were messed up- I moved from codeproject 2.0.8 to 2.1.9 and see the same issue. i had something like this happen before and it seemingly resolved itself...



Screenshot 2023-05-26 at 7.08.33 PM.png

Blue Iris is just reporting plate/dayplate now. Not the individual plate number..

Screenshot 2023-05-26 at 6.54.33 PM.png

Here are my settings...Screenshot 2023-05-26 at 6.55.04 PM.png

Screenshot 2023-05-26 at 6.55.50 PM.png
 

Attachments

  • Screenshot 2023-05-26 at 6.09.34 PM.png
    Screenshot 2023-05-26 at 6.09.34 PM.png
    2.2 MB · Views: 9
I had my license plate reader working great.

It was reporting plates and their accuracy to MQTT. Today around lunch, I went into the AI and I tried to add a package to actually see packages (package.pt) to my local codeproject.ai directory. I didn't even add it to the codeproject machine I use (I used a different machine. I didn't change anything on the camera settings...

Codeproject is getting the plates just fine... (another machine)

I am not using any CUDA or acceleration. Since things were messed up- I moved from codeproject 2.0.8 to 2.1.9 and see the same issue. i had something like this happen before and it seemingly resolved itself...



View attachment 164181

Blue Iris is just reporting plate/dayplate now. Not the individual plate number..

View attachment 164184

Here are my settings...View attachment 164183

View attachment 164182
You need to enable ALPR for plates also checkoff Only for confirmed vehicle alert.
1685143838220.png
1685143962834.png
 
  • Like
Reactions: actran and wpiman
Thanks. I am going to try without the confirmed vehicles. I am pretty zoomed in and I think at night it really just gets the plate and misses the car.

But thing seems to be back. Not quite sure why it was working before. Maybe an update introduced that button?!?! Or perhaps I somehow disabled it.

I noticed in the AI report/log- it captures and X and Y of the plate. Is there anywhere to use this information to ascertain if the plate is moving left to right, right to left, or up and down? I'd love to get that into my MQTT message. I could open my garage door if I am arriving (although I use bluetooth beacons to know if the cars are away-- I probably could do it now)
 
I've just started to use this, and am generally happy to continue to do so - need more experimenting though.
The CPU usage now hovers around 10-15% instead of 0-3% which I can live with.
One annoying issue is the full screen live view has become remarkably "stuttery" - even on main stream at 25 or 30 fps.

This is a big thread to read through - I'll see what has been written......
 
I've just started to use this, and am generally happy to continue to do so - need more experimenting though.
The CPU usage now hovers around 10-15% instead of 0-3% which I can live with.
One annoying issue is the full screen live view has become remarkably "stuttery" - even on main stream at 25 or 30 fps.

This is a big thread to read through - I'll see what has been written......

Check to see how often CodeProject.AI is being called in your Web window for the service. You really only want to call it when you have motion. Maybe you are hitting it too often.