Blue Iris and CodeProject.AI ALPR

One thing I see you are using a new Nvidia Drive then @truglo, When CUDA 11.7 was released it was using Nvidia GPU Drive 516.94 maybe try downgrading to this version, link is below

Just downgraded. Should I re-enable GPU for the License Plate Reader?
1675712975368.png
 
Give it a try, if it works that's great, if it does not work go back to CPU
Hey Mike, I seem to be having the same issue. No results retuned when trying the license plate recognition in CPAI. I’m using a Quardo K2200 that has 4GB of RAM, so I’m not sure that not enough memory is the issue. Here’s my system info. Any thoughts?
 

Attachments

  • 3C9C7064-1379-4798-8B8E-7746BBA057A0.jpeg
    3C9C7064-1379-4798-8B8E-7746BBA057A0.jpeg
    239.2 KB · Views: 11
Hey Mike, I seem to be having the same issue. No results retuned when trying the license plate recognition in CPAI. I’m using a Quardo K2200 that has 4GB of RAM, so I’m not sure that not enough memory is the issue. Here’s my system info. Any thoughts?
Does it work if you disable GPU for the ALPR module?
 
@MikeLud1... I really appreciate all of your help and hard work with ALPR. With my P400 GPU and several year old Dell OptiPlex 3010, I just don't think I have the horsepower to run ALPR. I'll come back and try it again once I am able to upgrade my BI computer and have a more powerful GPU. Until then, if I need a license plate, I'll take the Alert clip and screenshot the flight from video.
 
@MikeLud1... I really appreciate all of your help and hard work with ALPR. With my P400 GPU and several year old Dell OptiPlex 3010, I just don't think I have the horsepower to run ALPR. I'll come back and try it again once I am able to upgrade my BI computer and have a more powerful GPU. Until then, if I need a license plate, I'll take the Alert clip and screenshot the flight from video.
If it is working in CPU mode just use CPU mode.
 
@Crest6010 and @105437 if you want to see if you can get the ALPR module working with your GPU you can try replace the OCR models with the attached. They go in the below highlighted folders, make a copy of the original folders first. I tested them and they do use less GPU memory.

View attachment 153412
Still no for me. Thanks though. Here's what showed up in the log

19:18:57:Request 'alpr' dequeued for processing (...4ee244)
19:18:57:License Plate Reader: Retrieved ALPR_queue command
19:18:57:Client request 'custom' in the queue (...ad81ef)
19:18:57:Request 'custom' dequeued for processing (...ad81ef)
19:18:57:Object Detection (YOLOv5 6.2): Retrieved objectdetection_queue command
19:18:57:Object Detection (YOLOv5 6.2): Detecting using license-plate
19:18:57:Response received (...ad81ef)
19:18:57:Object Detection (YOLOv5 6.2): Queue and Processing Object Detection (YOLOv5 6.2) command 'custom' (...ad81ef) took 62ms
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr WARNING: Since the angle classifier is not initialized, the angle classifier will not be uesd during the forward process
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr DEBUG: dt_boxes num : 2, elapse : 0.03918027877807617
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr DEBUG: rec_res num : 2, elapse : 0.03213977813720703
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr WARNING: Since the angle classifier is not initialized, the angle classifier will not be uesd during the forward process
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr DEBUG: dt_boxes num : 2, elapse : 0.02330183982849121
19:18:58:ALPR_adapter.py: [2023/02/06 19:18:58] ppocr DEBUG: rec_res num : 2, elapse : 0.03301191329956055
19:18:58:License Plate Reader: Queue and Processing License Plate Reader command 'alpr' (...4ee244) took 233ms
19:18:58:Response received (...4ee244)
 
Can both you and @Alan_F send BI support what you have done and ask if Ken can add something like this in BI.

So I asked Blue Iris support:
I think something similar could be achieved directly in Blue Iris if you were able to set up a text filter on the alerts list that allowed a user to display only alerts where the memo field (or plate field if it is separate from the memo in the database) matches certain text. It would be important for the search to be capable of wildcards/partial matching. So a user could enter "ABC1%" and see all the alerts where the tag that was read was "ABC123" or "98ABC12", etc.

and the response was:

This is a great idea. I will put this onto my development list.
 
Still no for me. Thanks though. Here's what showed up in the log

19:18:57:Request 'alpr' dequeued for processing (...4ee244)
19:18:57:License Plate Reader: Retrieved ALPR_queue command
19:18:57:Client request 'custom' in the queue (...ad81ef)
19:18:57:Request 'custom' dequeued for processing (...ad81ef)
19:18:57:Object Detection (YOLOv5 6.2): Retrieved objectdetection_queue command
19:18:57:Object Detection (YOLOv5 6.2): Detecting using license-plate
19:18:57:Response received (...ad81ef)
19:18:57:Object Detection (YOLOv5 6.2): Queue and Processing Object Detection (YOLOv5 6.2) command 'custom' (...ad81ef) took 62ms
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr WARNING: Since the angle classifier is not initialized, the angle classifier will not be uesd during the forward process
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr DEBUG: dt_boxes num : 2, elapse : 0.03918027877807617
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr DEBUG: rec_res num : 2, elapse : 0.03213977813720703
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr WARNING: Since the angle classifier is not initialized, the angle classifier will not be uesd during the forward process
19:18:57:ALPR_adapter.py: [2023/02/06 19:18:57] ppocr DEBUG: dt_boxes num : 2, elapse : 0.02330183982849121
19:18:58:ALPR_adapter.py: [2023/02/06 19:18:58] ppocr DEBUG: rec_res num : 2, elapse : 0.03301191329956055
19:18:58:License Plate Reader: Queue and Processing License Plate Reader command 'alpr' (...4ee244) took 233ms
19:18:58:Response received (...4ee244)
That log looks normal, you can ignore the two warnings. Try running the test image.

1675731748891.png
 
I just noticed a minor bug in BI lpr when using "Detect/ignore static objects". BI processes every plate in the frame, including plates on vehicles that are marked as static. This is probably a minor waste of processing power for most use cases, but I figure it's worth mentioning in hopes it gets fixed to skip static plates.

Untitled.jpg

Edit... Think I just noticed a second bug... I have disabled "Begin analysis on motion leading edge", but it still sent T-272 msec. It should be skipping T-272, which is motion leading edge (T+0 is the actual motion trigger frame).
 
Last edited:
I just noticed a minor bug in BI lpr when using "Detect/ignore static objects". BI processes every plate in the frame, including plates on vehicles that are marked as static. This is probably a minor waste of processing power for most use cases, but I figure it's worth mentioning in hopes it gets fixed to skip static plates.

View attachment 153428
Try adding alpr,Plates to the Custom model in the camera's AI settings, this will make the red X's change to green checks and also add the plate confidents to the detection logic.

1675732874870.png
 
  • Like
Reactions: truglo
I'll do that, but TBH the red X in analysis doesn't bother me much. I was just worried about plate make times going from 250 to 500msec because OCR is reading the static plates... and about sending BI the motion leading image when I told it not to. I'm thinking since static vehicles are marked as such, BI can use that info to skip sending associated "static plates". That way when I have a parked plate in frame, my make times won't get doubled.
 
Oh boy... guess we are lucky that parked car didn't drive off just yet. Check this one out... looks like BI didn't mark the moving plate because the static car was higher percent.

Untitled2.jpg
Untitled3.jpg

This behavior makes parked cars a much bigger problem. BI definitely needs to be filtering out static vehicles here.