Blue Iris and DeepStack ALPR

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
Hi again, just looking at Codeproject.ai and it looks great (I should have looked closer before jumping into Deepstack). With plate reading it should work well to replace what I use now. Quick question though, does it have to rely on BI grabbing static images or can you set it up to analyse the live stream and grab plates that way?
It rely on BI grabbing static images.
 

Dave Lonsdale

Pulling my weight
Joined
Dec 3, 2015
Messages
456
Reaction score
195
Location
Congleton Edge, UK
I haven’t started to learn about alpr and will wait until codeproject.ai alpr has been released but can’t resist asking one question now about resolution and processing time:-
We are encouraged to uncheck ‘use main stream if available’ because resizing megapixel camera images to send through the ai process uses precious time. For alpr to work, does this need to be checked, then using far more processing time to identify, crop and capture multiple full resolution images to end up with 100 pixel plate images taken from a typical scene?

I remember digger11 queried the possibility of using cropped parts of full resolution images to better identify small objects in motion, these then having effectively become resized down to say 640x480 and therefore compatible with the ai process.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,432
Reaction score
47,556
Location
USA
I haven’t started to learn about alpr and will wait until codeproject.ai alpr has been released but can’t resist asking one question now about resolution and processing time:-
We are encouraged to uncheck ‘use main stream if available’ because resizing megapixel camera images to send through the ai process uses precious time. For alpr to work, does this need to be checked, then using far more processing time to identify, crop and capture multiple full resolution images to end up with 100 pixel plate images taken from a typical scene?

I remember digger11 queried the possibility of using cropped parts of full resolution images to better identify small objects in motion, these then having effectively become resized down to say 640x480 and therefore compatible with the ai process.
@MikeLud1 said this in the CodeProject thread: "mainstream is need for the ALPR module that I am working so when it crops a plate it is at full resolution."

I am waiting for the CodeProject myself, but I did a test with a 3rd party reader and it could read D1 resolution. If the camera has been set up to optically zoom to make the plate as large as possible, it doesn't need high MP quality. I am not sure how that would impact Mike's module though or if mainstream is needed for his module.

 

Dave Lonsdale

Pulling my weight
Joined
Dec 3, 2015
Messages
456
Reaction score
195
Location
Congleton Edge, UK
Very interesting links wittaj, thank you.
I guess what was at the back of my mind in my post was, putting alpr to one side, that the software has the capability to crop and use a portion of a full res image to deliver a more accurate image comparison analysis - any object in motion (as was suggested by digger11). However, I now realise from reading your link that this would completely kibosh the “detect static objects” feature that needs the entire (resized) image to be used for analysis. No doubt lots of other problems as well.
 

sp3ctre

Getting the hang of it
Joined
Sep 29, 2018
Messages
53
Reaction score
28
Location
UK
Hi, installed v2.0.6 and have the License Plate Reader working in the web interface. Can you please tell me what I need to do in Blue Iris to enable the License Plates to be recorded? It's currently recording DayPlate/NightPlate but not the Reg.

Thanks
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
Hi, installed v2.0.6 and have the License Plate Reader working in the web interface. Can you please tell me what I need to do in Blue Iris to enable the License Plates to be recorded? It's currently recording DayPlate/NightPlate but not the Reg.

Thanks
We still need to get the integration worked out with Blue Iris, hopefully this week
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
I installed 2.0.6, but not sure if something went wrong. I don't have any license plate reader in my dashboard. I read something in the release notes about the ability to add modules from the dashboard at runtime, but not seeing how that is done. Is there something I'm missing?Untitled.jpg
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
I installed 2.0.6, but not sure if something went wrong. I don't have any license plate reader in my dashboard. I read something in the release notes about the ability to add modules from the dashboard at runtime, but not seeing how that is done. Is there something I'm missing?View attachment 151271
Do a Ctrl + F5 to refresh the page
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
Oh crud... yep saw that on the website... ctl+r and I now see the light. Thanks again Mike!
 
Last edited:

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
Yes I understand; I plan on sticking with the existing online ALPR integration for now, and look forward to the BI integration whenever it is ready. I was just curious and wanted to do some testing to see how well it performs, and give feedback on any problems that may show up. Test image 10 has round trip ~150msec through the new alpr module with my p400 gpu (fyi, 100% confidence). Same image using license-plate.pt detection gives round trips of ~80msec (~90% confidence). Ram usage with the new modules running only went from ~50% to ~58% (8gb, 6 cams, medium size). So the new modules appear to be performing excellent so far, considering the added ocr work involved. Thank you and the rest of the devs for all the hard work.
 
Last edited:

sp3ctre

Getting the hang of it
Joined
Sep 29, 2018
Messages
53
Reaction score
28
Location
UK
Yes I understand; I plan on sticking with the existing online ALPR integration for now, and look forward to the BI integration whenever it is ready. I was just curious and wanted to do some testing to see how well it performs, and give feedback on any problems that may show up. Test image 10 has round trip ~150msec through the new alpr module with my p400 gpu (fyi, 100% confidence). Same image using license-plate.pt detection gives round trips of ~80msec (~90% confidence). Ram usage with the new modules running only went from ~50% to ~58% (8gb, 6 cams, medium size). So the new modules appear to be performing excellent so far, considering the added ocr work involved. Thank you and the rest of the devs for all the hard work.
I am finding it is seemingly giving good results, although I do have to capture the plate head-on to get a good OCR read. I am looking to replace Rekor Scout that worked off the video stream. To be honest that worked better as it seemingly took lots of readings and used the best one. Having to rely on an image instead will just mean I need to experiment with tweaking it a bit more. Looking promising though, just have to wait for the BI integration now :)
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
lots of readings and used the best one.
You may be able to achieve similar with CPAI by increasing the number of "+ real-time images" in camera AI settings, and/or decreasing "analyze one each". The post trigger real-time images controls how many images BI will send to AI for recognition, and analyze one each controls the time between each of those frame that will be sent. So if you see out of frame plates, or otherwise non-readable images sent to AI, changing those values can bring more images in to the process.

That said, I have found that BI is not always honoring those settings... sometimes it will only send 3 images when I have it set to 5, and sometimes those images may be farther apart in time than desired. Since upgrading my PC and adding a GPU (CPAI avg round trips went from 250msec to 80msec), I have noticed BI does a much better job of honoring the settings. At 80msec avg, it rarely misses a plate, and when it does it's usually due to a weird lighting/trigger scenario where the plate was never in frame. My take on this is with slower server hardware, the CPU can get a bit overwhelmed at times, and when this happens BI skips images to keep motion processing etc moving along smooth. I'm clueless on the internals of BI though, and this theory could be totally wrong.

Lastly, my lpr is far from optimally placed. It's a 2mp dahua z12 turret zoomed all the way in, looking at the road roughly 45* on the side and 20* from above, about 70' distance. Using my own images from this cam, the current CPAI ocr is doing very good... only misses really dirty plates that I can barely read with my own eyes, everything else is no-typo perfect. I was surprised it even returned on a night time image where 2/3 of the plate was off the edge of the frame... returned the first 3 digits of the plate regardless.
 
Last edited:

Pelphry17

n3wb
Joined
Feb 16, 2020
Messages
2
Reaction score
1
Location
USA
I can't seem to get the ALPR module to install. I keep getting " Unable to unpack module 'ALPR' " I know I have to be doing something wrong? Any suggestions? Thank You.
 

Attachments

Last edited:

tedrpi

Getting the hang of it
Joined
Sep 2, 2015
Messages
84
Reaction score
36
I can't seem to get the ALPR module to load. I keep getting " Unable to unpack module 'ALPR' " I know I have to be doing something wrong? Any suggestions? Thank You.
Seeing the same error. Tried a restart and updated BI to 5.6.9.1. Hoping @truglo or @MikeLud1 (if he has time) can help us out. I have ALPR checked in the AI settings of BI, and clicked the install button for ALPR on the AI server dashboard.
 
Last edited:

Pelphry17

n3wb
Joined
Feb 16, 2020
Messages
2
Reaction score
1
Location
USA
Seeing the same error. Tried a restart and updated BI to 5.6.9.1. Hoping @truglo or @MikeLud1 (if he has time) can help us out. I have ALPR checked in the AI settings of BI, and clicked the install button for ALPR on the AI server dashboard.
Seeing the same error. Tried a restart and updated BI to 5.6.9.1. Hoping @truglo or @MikeLud1 (if he has time) can help us out. I have ALPR checked in the AI settings of BI, and clicked the install button for ALPR on the AI server dashboard.
I was able to get it to install. Ended up uninstalling CPAI server, deleting all program files, rebooting and re-installing. After that installing the module worked. Only thing I can think of that I did differently is not enable GPU on any modules until after installing ALPR.
 

tedrpi

Getting the hang of it
Joined
Sep 2, 2015
Messages
84
Reaction score
36
I was able to get it to install. Ended up uninstalling CPAI server, deleting all program files, rebooting and re-installing. After that installing the module worked. Only thing I can think of that I did differently is not enable GPU on any modules until after installing ALPR.
Interesting, were you upgrading from a previous version of CPAI? I was and did an install of the new version of CPAI over the old and saw the error installing ALPR. Uninstalling and re-installing CPAI forced me to start w/o GPU enabled on any modules. Installing ALPR then worked. I was able to then enable GPU on both the ALPR and YOLO v5 6.2 modules w/o issue. Probably and order of operations issue. Thanks for the tip.
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
I already had cpai 2.0.6 and the lpr module installed and working before updating BI to the latest with the lpr integration. It didn't go perfectly smoothly for me. After enabling the "ALPR for plates" (the new integration), AI wasn't working and BI got funky on my (triggered cameras froze forever, etc). The BI ai settings custom modules directory box was greyed out. I opened the CPAI control panel and it showed the lpr module got disabled. So I re-enabled it with gpu, started it, it went green, and worked in the cpai explorer. Then I tried clicking the 3-dot menu to set the custom modules directory in BI. That brought up a small window saying "Reloaded modules: Restart AI to refresh this list." So in BI I stopped and restarted AI. After that it seemed to work normally, even after a reboot.

So far the new local cpai alpr integration (that's a mouthful) seems to be working OK. It returns high confidence, but so far it is not as accurate as the online alpr integration. The inaccuracies manifest mostly as transposed letters, like H instead of M, O instead of 0, or cropping an end character, but it's good enough to use with some basic post processing for now. This is while I'm using the mainstream for AI and medium yolov5 model. Not sure if switching to high would help, but that's a lot slower and affects all cameras (not just the lpr's). Guessing not, since it uses ocr, which doesn't seem to use yolo (however license-plates does use yolo). So far I've only had 4 night plates pass by to test this... so could shake out differently as a wider variety of images come in.
 
Last edited:
Top