Blue Iris and CodeProject.AI ALPR

2nd topic... Memory leaks.

I definitely had memory leaks with Python when using CPAI 2.6.5. I had to create a scheduled job to stop/start CPAI every night.

With 2.9.5 I think I am too but I created the scheduled job again and I'm also rebooting the PC often so not 100% sure.

I usually don't post until I see someone else has the issue since I just assume it's only me. However, since I'm on a roll here... I have also noticed that when stopping the CPAI service, the Processes can continue to run after the service is stopped.

1747112946891.png
 
Last edited:
  • Like
Reactions: looney2ns
First, thank you for all the work here. :)

I'm trying to get this working, but many of the blue iris macros are not populated and I cannot figure out why. With my current setup, I do see the CodeProject.AI reported plate number logged in the memo of the alert image, but &JSON and other variables are simply empty.

If I remove "ai_dump":&JSON from the http post, I see this populated...

{"Image":"&ALERT_JPEG", "camera":"Cam1", "ALERT_PATH": "temp_Cam1_1.jpg", "ALERT_CLIP": "@-1", "timestamp":"2025-05-15T03:08:18.643Z" }

BlueIris 5.9.9.52 on Win11 host
CodeProject.AI 2.9.5 (License plate reader 3.3.4, Object Detection YOLOv5 6.2) on Win11 host (same host as BI)

Anything I can try to get the &JSON macro populated for the alert? I appreciate any help.

From the .dat file saved on the event...

Cam1.20250515_080000.913239.3-3.dat

[
{
"api":"alpr",
"found":{
"success":true,
"processMs":296,
"inferenceMs":172,
"predictions":[
{
"confidence":0.7903062701225281,
"label":"Plate: H******4",
"plate":"H******4",
"x_min":2182,
"y_min":906,
"x_max":2332,
"y_max":1011}
]
,
"message":"Found Plate: H******4",
"moduleId":"ALPR",
"moduleName":"License Plate Reader",
"code":200,
"command":"alpr",
"requestId":"a3751b8a-5060-4ad1-8908-c9b864e57373",
"inferenceDevice":"GPU",
"analysisRoundTripMs":327,
"processedBy":"localhost",
"timestampUTC":"Thu,
15 May 2025 15:15:16 GMT"}
}
]
 

Attachments

  • cam_alert_cfg.png
    cam_alert_cfg.png
    131.9 KB · Views: 0
  • ai_cfg.png
    ai_cfg.png
    111.5 KB · Views: 0
  • memo_thumb.png
    memo_thumb.png
    46.2 KB · Views: 0
  • bi_setting_ai.png
    bi_setting_ai.png
    130.6 KB · Views: 0
  • web_req.png
    web_req.png
    20.7 KB · Views: 0
Last edited:
First, thank you for all the work here. :)

I'm trying to get this working, but many of the blue iris macros are not populated and I cannot figure out why. With my current setup, I do see the CodeProject.AI reported plate number logged in the memo of the alert image, but &JSON and other variables are simply empty.

If I remove "ai_dump":&JSON from the http post, I see this populated...

{"Image":"&ALERT_JPEG", "camera":"Cam1", "ALERT_PATH": "temp_Cam1_1.jpg", "ALERT_CLIP": "@-1", "timestamp":"2025-05-15T03:08:18.643Z" }

BlueIris 5.9.9.52 on Win11 host
CodeProject.AI 2.9.5 (License plate reader 3.3.4, Object Detection YOLOv5 6.2) on Win11 host (same host as BI)

Anything I can try to get the &JSON macro populated for the alert? I appreciate any help.

Looks like you have an extra comma behind JSON, it should be:

{"ai_dump":&JSON, "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH":"&ALERT_PATH", "ALERT_CLIP":"&ALERT_CLIP", "timestamp":"&ALERT_TIME"}
 
Looks like you have an extra comma behind JSON, it should be:

{"ai_dump":&JSON, "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH":"&ALERT_PATH", "ALERT_CLIP":"&ALERT_CLIP", "timestamp":"&ALERT_TIME"}
Yea, sorry, that was a copy/paste error for the screenshot. Without the double comma, I get failures. Logging to a file show me that &JSON is empty, which causes a trainwreck for the ALPR tool. Any other ideas?
 
Sorry, I don't know why &JSON macro isn't working...that's very odd. What happens if you removed all of the rest and just had &JSON?
 
Sorry, I don't know why &JSON macro isn't working...that's very odd. What happens if you removed all of the rest and just had &JSON?
Yea, no worries thanks for looking. If I put &JSON in a logfile or anything it's just an empty string. I may try to do a re-install, perhaps something is wonky.
 
How are you folks getting the orange box to show just the plate number and confidence percentage? Mine shows the plate number, and Day/Night Plate, but the confidence level is for the Day/NightPlate, not the plate number.
 
I apologize for the most basic level of my question, but I'm trying to set up the CodeProjectAI ALPR for the first time and not even seeing the AI camera settings as an option. Am I missing something? I've got everything up to this point in the 2023 tutorial apparently working correctly.
Camera Settings.jpg
Blue Iris release 5.974 (9/11/2024, my year of free updates is up)
 
I apologize for the most basic level of my question, but I'm trying to set up the CodeProjectAI ALPR for the first time and not even seeing the AI camera settings as an option. Am I missing something? I've got everything up to this point in the 2023 tutorial apparently working correctly.
View attachment 221605
Blue Iris release 5.974 (9/11/2024, my year of free updates is up)
I believe you need to look on the AI tab now.