Blue Iris and DeepStack ALPR

Futaba

Pulling my weight
Joined
Nov 13, 2015
Messages
227
Reaction score
167
Both the LPR real camera and the cropped ALPR camera.
Thanks much! That is the reason why I wasn't getting the logfile.txt and the json files.

Would be great to make this clearer for others who will install the tool in the future. Something like:

For all cameras that you will create during this installation process, go to each of the cameras' "Camera Settings...", under the "Record" tab, uncheck "Use default" next to "Folder:" under "Video", and enter "&CAM\%Y%m%d\&CAM.%Y%m%d_%H%M%S" in the text edit field. This will save jpg files into the "Alerts" folder and in separate folders for each day's recording.

1654647661571.png
And insert this instruction during the camera creation steps. Thanks.

Additional suggestion for installation instruction:
  • Might want to mention that SD_ALPR_config.ini is in "C:\Program Files (x86)\DeepStackALPR" if default folder was used during DeepStackALPR setup
  • For the per camera AI dialog box, would be good to say:
    - Right click your LPR camera window, select "Camera Settings...", then click the "Trigger" tab, click the "Artificial Intelligence..." button. In the AI dialog box, change to the following settings.
  • Note that Blue Iris's web server needs to be enabled. And the web server port number in DS_ALPR_config.ini need to match the BI's web server port set in the "Web server" tab in the "Blue Iris Settings" dialog box.
  • Same for Deepstack's port number
 
Last edited:

Psylent126

n3wb
Joined
Aug 5, 2014
Messages
20
Reaction score
10
Location
California
Question...Does anyone know what the following indicates?

1654650149127.png

I know it was suggested that it was due to running two cameras with the API, but I am no longer doing so and I am still getting this error. from looking at the log, it appears that this is where things are breaking for me and I am not quite sure what the error signifies and can't find any references to it through searching.

Thanks.
 

Psylent126

n3wb
Joined
Aug 5, 2014
Messages
20
Reaction score
10
Location
California
Question...Does anyone know what the following indicates?

View attachment 130125

I know it was suggested that it was due to running two cameras with the API, but I am no longer doing so and I am still getting this error. from looking at the log, it appears that this is where things are breaking for me and I am not quite sure what the error signifies and can't find any references to it through searching.

Thanks.
So I am still at a loss with this. I do believe I have narrowed down when the process fails, but I am not sure what is different about my setup versus ones that work. This is what I have determined so far:

  • A vehicle activates the motion trigger and a series of images are saved to D:\ALPR-Image\<CAM>\<Date/Time>\ (where <Cam>\<Date/Time> is &CAM\%Y%m%d\&CAM.%Y%m%d_%H%M%S as specified in the instructions).
  • DeepStack activates and analyzes the images using the custom DayPlate/NightPlate model included with the DeepStackALPR download.
  • If DeepStack finds a valid image, then it saves the alert image(s) and accompanying DAT files to my alerts folder at C:\Alerts\ALPRS\.
  • The images saved by DeepStack are annotated with DayPlate or NightPlate as expected.
  • This all shows in the Blue Iris log as expected.
  • It is at this point that I seem to get the Plate: error 80002efd generated by the ALPRS camera as shown in my previous post (The ALPRS camera is my physical LPR camera).
  • I never see the ALPR user account that I created for DeepStackALPR log in or do anything in the system log.
  • I never see the ALPR camera (The ALPR camera is the virtual camera that is supposed to do the crop and such) mentioned in the Blue Iris Log file.
  • No files are saved to the C:\Program Files\Blue Iris 5\www\ALPR\ folder as specified in the DS_ALPR_config.ini.
  • The 'file path.txt' file is not created or updated.
  • No files are saved to the C:\Alerts\ALPR\* folder as specified in the DS_ALPR_config.ini file.
I have checked the permissions on the install folder for DeepStackALPR to ensure that it is writeable and that all the accounts on the PC have full access to read/write/modify/execute files and folder in that folder and subfolders. I have also verified that the firewall setting for DeepStackALPR allow all incoming UDP and TCP connections for the program. I have also checked and verified that the DeepStackALPR user specified in the DS_ALPR_Config.ini file has admin rights in Blue Iris. From what I can tell the DeepStackALPR service is running and has spawned to processes that appear to run simultaneously but don't appear to actually do anything when called. I have tried shutting down the service and manually running DeepStackALPR.exe on port 5000 from the command line as referenced in another post in this thread, but after it starts, nothing further happens (even when vehicles trigger the DeepStack AI in Blue Iris and alerts are generated.

As far as I can tell everything has been set up according to the instructions written by MikeLud1, but I just can't get this thing to work. Does anyone have any further suggestions or notice something that I may have missed?

Any help would be very appreciated as I have been trying to get this to work for the better part of a week now without much luck.

Thank you.
 

Psylent126

n3wb
Joined
Aug 5, 2014
Messages
20
Reaction score
10
Location
California
Question...Does anyone know what the following indicates?

View attachment 130125

I know it was suggested that it was due to running two cameras with the API, but I am no longer doing so and I am still getting this error. from looking at the log, it appears that this is where things are breaking for me and I am not quite sure what the error signifies and can't find any references to it through searching.

Thanks.
So I am still at a loss with this. I do believe I have narrowed down when the process fails, but I am not sure what is different about my setup versus ones that work. This is what I have determined so far:

  • A vehicle activates the motion trigger and a series of images are saved to D:\ALPR-Image\<CAM>\<Date/Time>\ (where <Cam>\<Date/Time> is &CAM\%Y%m%d\&CAM.%Y%m%d_%H%M%S as specified in the instructions).
  • DeepStack activates and analyzes the images using the custom DayPlate/NightPlate model included with the DeepStackALPR download.
  • If DeepStack finds a valid image, then it saves the alert image(s) and accompanying DAT files to my alerts folder at C:\Alerts\ALPRS\.
  • The images saved by DeepStack are annotated with DayPlate or NightPlate as expected.
  • This all shows in the Blue Iris log as expected.
  • It is at this point that I seem to get the Plate: error 80002efd generated by the ALPRS camera as shown in my previous post (The ALPRS camera is my physical LPR camera).
  • I never see the ALPR user account that I created for DeepStackALPR log in or do anything in the system log.
  • I never see the ALPR camera (The ALPR camera is the virtual camera that is supposed to do the crop and such) mentioned in the Blue Iris Log file.
  • No files are saved to the C:\Program Files\Blue Iris 5\www\ALPR\ folder as specified in the DS_ALPR_config.ini.
  • The 'file path.txt' file is not created or updated.
  • No files are saved to the C:\Alerts\ALPR\* folder as specified in the DS_ALPR_config.ini file.
I have checked the permissions on the install folder for DeepStackALPR to ensure that it is writeable and that all the accounts on the PC have full access to read/write/modify/execute files and folder in that folder and subfolders. I have also verified that the firewall setting for DeepStackALPR allow all incoming UDP and TCP connections for the program. I have also checked and verified that the DeepStackALPR user specified in the DS_ALPR_Config.ini file has admin rights in Blue Iris. From what I can tell the DeepStackALPR service is running and has spawned to processes that appear to run simultaneously but don't appear to actually do anything when called. I have tried shutting down the service and manually running DeepStackALPR.exe on port 5000 from the command line as referenced in another post in this thread, but after it starts, nothing further happens (even when vehicles trigger the DeepStack AI in Blue Iris and alerts are generated.

As far as I can tell everything has been set up according to the instructions written by MikeLud1, but I just can't get this thing to work. Does anyone have any further suggestions or notice something that I may have missed?

Any help would be very appreciated as I have been trying to get this to work for the better part of a week now without much luck.

Thank you.
Just wanted to post a follow-up on the issues that I was having. So after much troubleshooting and experimentation, I determined that Windows appeared to be blocking the DeepStackALPR.exe from executing. I was able to go in an create an exclusion for the DeepStackALPR process and folder within Windows Defender. After creating the exclusions, the application performed as expected. Now I am working on fine tuning the triggers for the plate capture and trying to improve the OCR accuracy.

If any one has any suggestions on how to better improve the OCR accuracy or improved OCR models they can point me to, I would appreciate the assistance.

Thank you.
 

Futaba

Pulling my weight
Joined
Nov 13, 2015
Messages
227
Reaction score
167
ALPR has been working very well. There are a couple things I wonder if they can be improved on:

  • When one car is followed closely by another car, the second car's plate is not detected. Might this be improved with BI settings?
  • Sometimes OCR misreads license plate characters
  • automatically rotate license plate capture. Cars that I capture around my neighborhood circle are always turning left. Depends on which picture was used to get the plate, sometimes it is not rotated enough, sometimes it is rotated too much. Not really a big deal, just a nit pick :D
 

Psylent126

n3wb
Joined
Aug 5, 2014
Messages
20
Reaction score
10
Location
California
ALPR has been working very well. There are a couple things I wonder if they can be improved on:

  • When one car is followed closely by another car, the second car's plate is not detected. Might this be improved with BI settings?
  • Sometimes OCR misreads license plate characters
  • automatically rotate license plate capture. Cars that I capture around my neighborhood circle are always turning left. Depends on which picture was used to get the plate, sometimes it is not rotated enough, sometimes it is rotated too much. Not really a big deal, just a nit pick :D
I would also add that it would be nice to have the ability to use more than one LPR camera with the application.
 

Psylent126

n3wb
Joined
Aug 5, 2014
Messages
20
Reaction score
10
Location
California
MikeLud1,

Two questions...

1. Does your program currently work with the new BI integrated SenseAI or strictly DeepStack?
2. Does your program work with more than one camera at a time? I believe from previous posts you indicated that it might not, but I wanted to verify.

Thank you.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,211
Reaction score
4,252
Location
Brooklyn, NY
MikeLud1,

Two questions...

1. Does your program currently work with the new BI integrated SenseAI or strictly DeepStack?
2. Does your program work with more than one camera at a time? I believe from previous posts you indicated that it might not, but I wanted to verify.

Thank you.
1. Does your program currently work with the new BI integrated SenseAI or strictly DeepStack?
At this time only DeepStack, I am going to try to make a SenseAI ALPR module once SenseAI has GPU support..
2. Does your program work with more than one camera at a time? I believe from previous posts you indicated that it might not, but I wanted to verify.
Only works with one camera.
 

Psylent126

n3wb
Joined
Aug 5, 2014
Messages
20
Reaction score
10
Location
California
At this time only DeepStack, I am going to try to make a SenseAI ALPR module once SenseAI has GPU support..

Only works with one camera.
Hello MikeLud1,

Just checking to see if now that there is GPU support available for SenseAI, if you have made any progress in converting your ALPR module so that it works for it?

It was a wonderful tool to have with Deepstack and I really hope that you are able to convert it to work with SenseAI as well.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,211
Reaction score
4,252
Location
Brooklyn, NY
Hello MikeLud1,

Just checking to see if now that there is GPU support available for SenseAI, if you have made any progress in converting your ALPR module so that it works for it?

It was a wonderful tool to have with Deepstack and I really hope that you are able to convert it to work with SenseAI as well.
I am using the current version with CodeProject.AI. All you need to do is to add the two highlight models to the folder shown below. Then change the ports as show below.
I am going to try and make a CodeProject.AI ALPR module, I should hopefully have done sometime next month.

1661468324520.jpeg
1661468468413.jpeg
1661468492607.jpeg
 

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
Okay, decided to give this great project a go, but seem to be having some issues in terms of setup. I've installed the executable, and I think did everything within the pdf instructions. But the new "camera" doesn't seem to be connecting properly and/or saving images. Some shots below:


What I'm seeing with the newly added LPRPlate Camera:
1663349690999.png
1663349744748.png1663349791494.png




LPR Camera Setup:
1663349847109.png1663349867449.png
1663350082213.png


LPRPlate "Camera" Setup:
1663349907043.png1663349924393.png

Config file:
1663350484025.png


Note: I didn't do anything with the NSSM in the ALPR directory, not sure if I am supposed to run ALPR or adjust the NSSM to run it automatically (didn't see anything in the instructions)?

Maybe I have one of my IP Addresses or ports off?
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,211
Reaction score
4,252
Location
Brooklyn, NY
Okay, decided to give this great project a go, but seem to be having some issues in terms of setup. I've installed the executable, and I think did everything within the pdf instructions. But the new "camera" doesn't seem to be connecting properly and/or saving images. Some shots below:


What I'm seeing with the newly added LPRPlate Camera:
View attachment 140090
View attachment 140092View attachment 140093




LPR Camera Setup:
View attachment 140094View attachment 140095
View attachment 140099


LPRPlate "Camera" Setup:
View attachment 140096View attachment 140097

Config file:
View attachment 140102


Note: I didn't do anything with the NSSM in the ALPR directory, not sure if I am supposed to run ALPR or adjust the NSSM to run it automatically (didn't see anything in the instructions)?

Maybe I have one of my IP Addresses or ports off?
Post a screenshot of the LPRPlate configuration settings
 

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
Just going back through the instructions pdf. For this step....

1663364747907.png

Is this done in the "Alerts" tab, or in the Trigger tab where it says "immediate actions", and the "Configure Run action"? Mine looks like this, but had it in the Alert tab vs the Immediate Actions section under Trigger.

Also, under Trigger, for the dummy camera that is set to do the cropped images, should I be activating AI? I had assumed no as it didn't show in the instructions, but now not sure.

1663364929686.png
 

pbc

Getting comfortable
Joined
Jul 11, 2014
Messages
1,024
Reaction score
156
Coule other things: Should this be empty? I.e., is it only populated when I drag a .dat file into it?

1663365238101.png

In the setup pdf for ALPR, the "default object detection" is not checked, shoudl I uncheck mine? I am also using AI for person, etc detections on other cameras.

1663365317369.png
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,211
Reaction score
4,252
Location
Brooklyn, NY
Just going back through the instructions pdf. For this step....

View attachment 140136

Is this done in the "Alerts" tab, or in the Trigger tab where it says "immediate actions", and the "Configure Run action"? Mine looks like this, but had it in the Alert tab vs the Immediate Actions section under Trigger.

Also, under Trigger, for the dummy camera that is set to do the cropped images, should I be activating AI? I had assumed no as it didn't show in the instructions, but now not sure.

View attachment 140137
Did you create the below folder and placed the attached APLR.JPG in it? I also attached my config file if that helps

1663365395656.jpeg

1663365522112.jpeg
 

Attachments

Top