Blue Iris and DeepStack ALPR

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,286
Reaction score
2,898
Location
Brooklyn, NY
The inaccuracies manifest mostly as transposed letters, like H instead of M, O instead of 0,
There will be a version 2.0 of the ALPR module that should improve inaccuracies. The online ALPR get ton of image to help train their OCR to recognize the plate. I am using PaddleOCR for the OCR, I tested several OCRs and PaddleOCR was found to work the best.
 
Last edited:

truglo

Getting the hang of it
Joined
Jun 28, 2017
Messages
191
Reaction score
65
That is great to hear Mike! I appreciate your hard work on these things. The current performance is promising and adequate, with room for improvement. I'm more than happy to have some typos for now, with the huge benefit of zero net access requirement for my cam system (online alpr was the sole reason I couldn't keep it on an isolated subnet). I'd like to help, but understand very little about AI and python. Let me know if sending you some images would help; I have save hi-rez selected and lots of samples I can send. My lpr is a 2mp looking down about 10* and right about 45*, roughly 70-100' from the target area.

Also, can you confirm yolo model size has no effect on lpr (beyond it's effects on license-plate, which I presume is required for the lpr integration to work)?
 

truglo

Getting the hang of it
Joined
Jun 28, 2017
Messages
191
Reaction score
65
One more quick question... is installing the OCR module itself required for lpr to work?

I have run lpr with ocr installed the whole time, and it works fine even with the ocr stopped. I am hesitant to test uninstalling ocr without asking first. I know... I'm trying to fix what ain't broke.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,286
Reaction score
2,898
Location
Brooklyn, NY
Also, can you confirm yolo model size has no effect on lpr (beyond it's effects on license-plate, which I presume is required for the lpr integration to work)?
I does some, how the ALPR module works is BI send an image (preferably Main Stream) then the ALPR module runs the license-plate model to identify the plates in the image. After identifying the plates it crops the plates that were identified and runs each plate for OCR.
 

truglo

Getting the hang of it
Joined
Jun 28, 2017
Messages
191
Reaction score
65
Thanks for the super quick response. [edit... your second reply is very insightful, thanks again!]

Also just wanted to pass along a minor bug I found... BI alerts appear to be multiplying confidence by 100. For example it shows 9100.0% on an AI alert, where ai details show 91.0%. Guessing the integration may have added a second uneeded *100 somewhere?
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,286
Reaction score
2,898
Location
Brooklyn, NY
Thanks for the super quick response.

Also just wanted to pass along a minor bug I found... BI alerts appear to be multiplying confidence by 100. For example it shows 9100.0% on an AI alert, where ai details show 91.0%. Guessing the integration may have added a second uneeded *100 somewhere?
I sent BI this issue
 

truglo

Getting the hang of it
Joined
Jun 28, 2017
Messages
191
Reaction score
65
After running this for a bit, it doesn't seem like my make times are going down appreciably. Before enabling the new lpr integration, ipcam-combined and license-plate took ~80msec, with little variation. With the new lpr integration running, I still see an occasional 80msec make, but the average has jumped up significantly to like 120-150msec, with lots of variation and peaks up to 0.5sec. I noticed BI ram usage went just from ~50% to ~60%, but the python/cpai stuff was using a ton more RAM... like 7 of 8gb used after ai has been running and is warmed up (ie modules loaded to ram).

I was fully expecting an increase in ram usage with the plate reader and ocr, but was hoping 8bg would be adequate. I suspect that may not be the case, and the added make times may be from swap activity. I have a decent ssd for windows, but with an hhd it could have been really bad. So I ordered a 2x16gb dram kit, and I will see if that helps over the weekend.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,286
Reaction score
2,898
Location
Brooklyn, NY
After running this for a bit, it doesn't seem like my make times are going down appreciably. Before enabling the new lpr integration, ipcam-combined and license-plate took ~80msec, with little variation. With the new lpr integration running, I still see an occasional 80msec make, but the average has jumped up significantly to like 120-150msec, with lots of variation and peaks up to 0.5sec. I noticed BI ram usage went just from ~50% to ~60%, but the python/cpai stuff was using a ton more RAM... like 7 of 8gb used after ai has been running and is warmed up (ie modules loaded to ram).

I was fully expecting an increase in ram usage with the plate reader and ocr, but was hoping 8bg would be adequate. I suspect that may not be the case, and the added make times may be from swap activity. I have a decent ssd for windows, but with an hhd it could have been really bad. So I ordered a 2x16gb dram kit, and I will see if that helps over the weekend.
How many modules do you have installedand running? You only need the below, the OCR module is not needed
1674753371274.png
 

truglo

Getting the hang of it
Joined
Jun 28, 2017
Messages
191
Reaction score
65
I have the same... included more on my image to show ram:

Untitled2.jpg

For completeness, I'm running the medium as well:
Untitled3.jpg
 

truglo

Getting the hang of it
Joined
Jun 28, 2017
Messages
191
Reaction score
65
One more observation/issue... despite having Auto start/stop with BI checked, BI does not appear to be starting the license plate reader module after a reboot. In fact, 3 reboots in a row and AI would not work at all until I went in and manually started the license plate reader from the control panel. Is it just me, or is anyone else seeing the same thing? I figure if ALPR for plates and Auto start/stop are both checked, then BI should also start the license plate module right? I wonder if reinstalling cpai might fix it, but wanted to ask before taking shots in the dark. The yolov5 module is always started after a reboot as expected.

edit: More info... when I hit Stop now in BI, it only stops yolov5, not the lpr module. So it seems to be a problem for both start and stop.
 
Last edited:

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,286
Reaction score
2,898
Location
Brooklyn, NY
One more observation/issue... despite having Auto start/stop with BI checked, BI does not appear to be starting the license plate reader module after a reboot. In fact, 3 reboots in a row and AI would not work at all until I went in and manually started the license plate reader from the control panel. Is it just me, or is anyone else seeing the same thing? I figure if ALPR for plates and Auto start/stop are both checked, then BI should also start the license plate module right? I wonder if reinstalling cpai might fix it, but wanted to ask before taking shots in the dark. The yolov5 module is always started after a reboot as expected.
BI only starts CP.AI service, you need to go to CP.AI Dashboard and start the modules that you needed. Once the modules are started from the Dashboard it remembers the modules last used and the next time the service is restarted those modules will restart.
 

truglo

Getting the hang of it
Joined
Jun 28, 2017
Messages
191
Reaction score
65
OK, just rebooted and took more careful notes. Here's precisely what's happening now.

After rebooting the cp shows 2 green bars. So both modules are running (explorer test shows they work as well). However when cameras are triggered, AI acts funky. I get 2msec makes and always nothing found... ai details for these clips show no modules are being used (just red X's, without the expansion menus to show the models did):

Untitled.jpg

Then I stop and restart ai manually using BI settings. It starts working, but with faces?!

Untitled3.jpg
I do not have faces enabled as you can see; unchecked in BI and grey in the cp. This explains now why make times are high. Not sure how to fix this.

[edit: I just tried to see if enabling faces in BI, then disabling faces would change things. When I did this, the control panel did show faces starting and stopping as expected. However, after turning faces off in BI, faces went grey as expected in the cp, but triggers are still showing faces ~80msec. WTF? Seems like BI is frozen with faces enabled... and not sure why 80msec nothing found when the module is greyed out?]
 
Last edited:

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,286
Reaction score
2,898
Location
Brooklyn, NY
OK, just rebooted and took more careful notes. Here's precisely what's happening now.

After rebooting the cp shows 2 green bars. So both modules are running (explorer test shows they work as well). However when cameras are triggered, AI acts funky. I get 2msec makes and always nothing found... ai details for these clips show no modules are being used (just red X's, without the expansion menus to show the models did):

View attachment 152019

Then I stop and restart ai manually using BI settings. It starts working, but with faces?!

View attachment 152022
I do not have faces enabled as you can see; unchecked in BI and grey in the cp. This explains now why make times are high. Not sure how to fix this.

[edit: I just tried to see if enabling faces in BI, then disabling faces would change things. When I did this, the control panel did show faces starting and stopping as expected. However, after turning faces off in BI, faces went grey as expected in the cp, but triggers are still showing faces ~80msec. WTF? Seems like BI is frozen with faces enabled... and not sure why 80msec nothing found when the module is greyed out?]
The face is a bug with BI and should be fixed in the next release of BI. It is the ALPR running not face
 

tmushy

Young grasshopper
Joined
Oct 17, 2017
Messages
40
Reaction score
15
Do we have to add a license plate tag in the To confirm field?, "person,car,truck,bus,bicycle,boat" or just enable the PLATE RECOGNIZER at the bottom
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,286
Reaction score
2,898
Location
Brooklyn, NY
See the below link for the settings needed

 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
16,159
Reaction score
30,116
Location
USA
Do we have to add a license plate tag in the To confirm field?, "person,car,truck,bus,bicycle,boat" or just enable the PLATE RECOGNIZER at the bottom
Plate Recognizer is a different product that charges after 2500 lookups/month.
 

tmushy

Young grasshopper
Joined
Oct 17, 2017
Messages
40
Reaction score
15
See the below link for the settings needed

Thank you!
 

truglo

Getting the hang of it
Joined
Jun 28, 2017
Messages
191
Reaction score
65
It is the ALPR running not face
OK that makes more sense. Is there or will there be a way to make it so non-lpr cameras do not run through the lpr module? I'm OK with it slowing makes for the lpr, but seems less than ideal that it is applied to all cameras. I figure the lpr module should only be used on cameras that are using the license-plate model, if that is even possible.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,286
Reaction score
2,898
Location
Brooklyn, NY
OK that makes more sense. Is there or will there be a way to make it so non-lpr cameras do not run through the lpr module? I'm OK with it slowing makes for the lpr, but seems less than ideal that it is applied to all cameras. I figure the lpr module should only be used on cameras that are using the license-plate model, if that is even possible.
I agree and I am going to work with BI to not have all cameras run the ALPR
 
Top