Full ALPR Database System for Blue Iris!

Upgrade (together with ai_dump) payload broke injection on my unraid deployment...

Getting errors like:
[AI TRAINING] No valid training data found. Please update your AI and Blue Iris action to capture annotation data. -------> not sure about this... All seems to be the latest...
[ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
[ERROR] Error initializing auth: SyntaxError: Unexpected end of JSON input
[ERROR] Error in session verification: SyntaxError: Unexpected end of JSON input

@algertc do you have a hint where should I look at to troubleshoot? Unfortunately -turning into night here - not a lot of traffic though.

Obviously I am not able to use any of the update scripts on unRAID, so maybe missing a step?
 
3/17/2025, 8:34:02 PM [ERROR] Error: Unable to optimize image and unable to fallback to upstream image
3/17/2025, 8:34:02 PM [ERROR] Error: Unable to optimize image and unable to fallback to upstream image
3/17/2025, 8:34:02 PM [ERROR] Error: Unable to optimize image and unable to fallback to upstream image
3/17/2025, 8:34:02 PM [ERROR] Error: Unable to optimize image and unable to fallback to upstream image
3/17/2025, 8:34:02 PM [INFO] GET /api/check-update

and

3/17/2025, 8:36:04 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
3/17/2025, 8:36:05 PM [INFO] POST /api/plate-reads
3/17/2025, 8:36:05 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
3/17/2025, 8:36:06 PM [INFO] POST /api/plate-reads
3/17/2025, 8:36:06 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
3/17/2025, 8:36:07 PM [INFO] POST /api/plate-reads
3/17/2025, 8:36:07 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
3/17/2025, 8:36:08 PM [INFO] POST /api/plate-reads
3/17/2025, 8:36:08 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16


The update script run without errors, but plate updates no longer make it to the database with the above error in the logs.

One of my LPR is a PTZ, so I can trigger a read anytime if you need some data.

This is what I updated the http request to on BI:

{ "ai_dump":"&JSON", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME"}
 
Upgrade (together with ai_dump) payload broke injection on my unraid deployment...

Getting errors like:
[AI TRAINING] No valid training data found. Please update your AI and Blue Iris action to capture annotation data. -------> not sure about this... All seems to be the latest...
[ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
[ERROR] Error initializing auth: SyntaxError: Unexpected end of JSON input
[ERROR] Error in session verification: SyntaxError: Unexpected end of JSON input

@algertc do you have a hint where should I look at to troubleshoot? Unfortunately -turning into night here - not a lot of traffic though.

Obviously I am not able to use any of the update scripts on unRAID, so maybe missing a step?

The AI training log is normal. You won't have anything training capable until the new ALPR module comes out.

DId you edit your blue iris action? Double check that's formatted correctly. Seems like that might be what it is.
 
3/17/2025, 8:34:02 PM [ERROR] Error: Unable to optimize image and unable to fallback to upstream image
3/17/2025, 8:34:02 PM [ERROR] Error: Unable to optimize image and unable to fallback to upstream image
3/17/2025, 8:34:02 PM [ERROR] Error: Unable to optimize image and unable to fallback to upstream image
3/17/2025, 8:34:02 PM [ERROR] Error: Unable to optimize image and unable to fallback to upstream image
3/17/2025, 8:34:02 PM [INFO] GET /api/check-update

and

3/17/2025, 8:36:04 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
3/17/2025, 8:36:05 PM [INFO] POST /api/plate-reads
3/17/2025, 8:36:05 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
3/17/2025, 8:36:06 PM [INFO] POST /api/plate-reads
3/17/2025, 8:36:06 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
3/17/2025, 8:36:07 PM [INFO] POST /api/plate-reads
3/17/2025, 8:36:07 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16
3/17/2025, 8:36:08 PM [INFO] POST /api/plate-reads
3/17/2025, 8:36:08 PM [ERROR] Error processing request: SyntaxError: Expected ',' or '}' after property value in JSON at position 16


The update script run without errors, but plate updates no longer make it to the database with the above error in the logs.

One of my LPR is a PTZ, so I can trigger a read anytime if you need some data.

This is what I updated the http request to on BI:

{ "ai_dump":"&JSON", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME"}


OHHHHHH, sorry, guys. It should be "ai_dump": &JSON with no quotes around the macro! @olympia
 
  • Like
Reactions: PeteJ
Thanks, @algertc. I changed it as well, but still no traffic. Based on @PeteJ's experience, it should probably be fine for me too.

Regarding the AI training model, I’m not sure how this will work.
Are we only submitting confirmed detections? As in, manually flagging positives and false positives like the Frigate training model?
If not (and as far as I understand, there’s no workflow for this) then how will the model learn if we’re just uploading all detections without marking, flagging, or annotating which ones are correct or incorrect?

(ps.: read your PMs :) )
 
Thanks, @algertc. I changed it as well, but still no traffic. Based on @PeteJ's experience, it should probably be fine for me too.

Regarding the AI training model, I’m not sure how this will work.
Are we only submitting confirmed detections? As in, manually flagging positives and false positives like the Frigate training model?
If not (and as far as I understand, there’s no workflow for this) then how will the model learn if we’re just uploading all detections without marking, flagging, or annotating which ones are correct or incorrect?

(ps.: read your PMs :) )

It's all completely automated. Even if they weren't corrected at all, it would still be valuable to have images from so many different places, angles, environments, etc. Correcting misreads makes it even better. That is the only manual thing that you optionally can do. If you turn it on, it just processes them all in a specific format and prepares sets for both the plate recognition model and the OCR, then sends them to my cloudflare.
 
It's all completely automated. Even if they weren't corrected at all, it would still be valuable to have images from so many different places, angles, environments, etc. Correcting misreads makes it even better. That is the only manual thing that you optionally can do. If you turn it on, it just processes them all in a specific format and prepares sets for both the plate recognition model and the OCR, then sends them to my cloudflare.

...but wouldn't it be better to send only confirmed or corrected sets? I mean, how will the model learn if it receives sets with incorrect OCR readings? Or are we solely training the AI model to recognize plates rather than improving the OCR model's reading accuracy? I have to admit, I'm pretty ignorant on this topic... :)
 
...but wouldn't it be better to send only confirmed or corrected sets? I mean, how will the model learn if it receives sets with incorrect OCR readings? Or are we solely training the AI model to recognize plates rather than improving the OCR model's reading accuracy? I have to admit, I'm pretty ignorant on this topic... :)

I can modify it slightly to separate confirmed from non, but Mike seemed to think it was helpful either way. I am definitely no expert either. It's doing both models.
 
  • Like
Reactions: olympia
What would you like to do?
1) Update
2) Revert to a previous version

Enter your choice (1-2): 1

Select release type:
1) Stable (recommended)
2) Nightly (pre-release / latest updates)

Enter your choice (1-2): 1
[INFO] Checking for script updates...
./update.sh: line 118: [: 1
$(curl -sSL "$REMOTE_SCRIPT_URL" 2>/dev/null | grep "SCRIPT_VERSION: integer expression expected
[INFO] Checking required directories...
chmod: changing permissions of 'auth': Operation not permitted
chmod: changing permissions of 'config': Operation not permitted
chmod: changing permissions of 'storage': Operation not permitted


Was able to run the update script after chmod +x to update.sh. Now getting these errors

EDIT: NEVERMIND forgot the sudo (again)
 
Last edited:
I can modify it slightly to separate confirmed from non, but Mike seemed to think it was helpful either way. I am definitely no expert either. It's doing both models.

Well, he's certainly the expert, so I’m not trying to be smarter, I just wanted to understand how it works. :)
 
.but wouldn't it be better to send only confirmed or corrected sets?
Yes, we are hoping that the users validate and correct any false reads
I mean, how will the model learn if it receives sets with incorrect OCR readings?
If the OCR read is not validate we will have to manual validate the data before using it for training
Or are we solely training the AI model to recognize plates rather than improving the OCR model's reading accuracy?
I want to improve both by retrain the models with the data we receive
 
OK, thank you! That makes complete sense and is exactly why I initially raised this question.
However, in this case, users should have the ability to validate and correct the sets before they are uploaded for model improvement and retraining. This means we should also have the option to flag them for upload, and then only flagged will be uploaded.
(I can’t imagine you manually reviewing thousands of images, and this is definitely something we could contribute to.)
But as far as I understand, all recognitions (both correct and incorrect) are currently uploaded automatically immediately after injection.
 
Added manual confirmation also. Correcting a plate will also set confirmed to true.

The resulting training data will be organized into two categories: validated, unvalidated. That should be more accurate.


Screenshot 2025-03-17 at 4.38.28 PM.png
Screenshot 2025-03-17 at 4.38.37 PM.png
 
  • Like
  • Love
Reactions: olympia and PeteJ