If you mount the drive and it times out during training you can resume using the belowYes, I did that. and then %cd /content/drive/MyDrive before cloning the deepstack-trainer. I think that should allow it to keep the results even if the Google Colab session is clobbered for time. Thanks again... I'm so close now!
!python3 train.py --resume --dataset-path "\content\drive\MyDrive"
Post a copy of your DS_ALPR_config.ini less your password.Thanks for this @MikeLud1.
I have got it set up to the point where the cropped camera adds an alert to BI's alerts list and it is able to tag it with OCR result.
View attachment 129837
However, I am also not getting the log files and the json files saved. They are not saved where the jpg files are saved. The jpg files are saved to D:\BlueIris\Alerts instead of D:\BlueIris\Alerts\ALPR. in the ini file lpr_directory is set to D:\BlueIris\Alerts\ALPR\*
I also can't find logfile.txt anywhere on the drives. Any suggestions? Thanks.
Post a copy of your DS_ALPR_config.ini less your password.
[shared]
; If Blue Iris and DeepStack is installed with default settings no changes needed, otherwise adjusted as needed
bi_server = http://127.0.0.1:8888
ds_server = http://127.0.0.1:81
alpr_server_ip = 127.0.0.1
alpr_server_port = 5000
; Blue Iris userid and password is needed so script can communicate back to Blue Iris (must have admin rights)
userid =
password =
[ds_lpr]
; Blue Iris short name for cropped licence plate camera and resolution settings
camera = ALPR
image_x = 160
image_y = 120
; Use to rotate cropped licence plate, positive number for CCW or negative number for CW
rotate_deg = 0
; If cropped licence plate is rotated increase number by "1" until black corners are removed
image_offset = 0
; If Blue Iris is installed with default settings no changes needed, where script will save the cropped licence plate
cropped_directory = C:\Program Files\Blue Iris 5\www\ALPR
[ds_ocr]
; Where cropped camera's alert directory is
lpr_directory = D:\BlueIris\Alerts\ALPR\*
; Leave default setting of 4, how close the characters can be before the inferior one is ignored
overlapping_threshold = 4
; Leave default setting 0.40, if worst confidence is less than this, the result wont be written to output_logfile
min_conf_thres = 0.40
; Leave default setting of 2, if there is not more than this number of characters detected on the plate, the result wont be written to output_logfile
min_len_thres = 2
; Leave default setting of 8, if there is more character detected than this number, program will cut out the weakest confidence characters until value met.
plate_len_threshold = 8
; Leave default setting of 0.150 ms
path_delay = 0.150
Is the file path.txt file being updated, try deleting it and it will rewrite the file. This might be rights issue with the folder where the file path.txt is being save. Several people had similar issues. I need to figure out how to address this issue.@MikeLud1 yes, account has admin privilege. I am getting car,jpg and file path.txt files saved to C:\Program Files (x86)\DeepStackALPR, and license plate captured and OCR'ed to the Alerts list. So most of it is working. However I am also not getting the log files and the json files saved. They are not saved where the jpg files are saved
View attachment 129953 View attachment 129954
The cropped camera looks to have the right settings.
View attachment 129951
The Action is created under the "Alerts" tab, not the "Immediate actions..." button under the "Trigger" tab, correct?
View attachment 129952
Is the file path.txt file being updated, try deleting it and it will rewrite the file. This might be rights issue with the folder where the file path.txt is being save. Several people had similar issues. I need to figure out how to address this issue.
View attachment 129956
Do you have two LPR cameras? If so the api is not setup to do two cameras. I have been working on updating my custom models, after I am finished with the custom models I will do some more work on DeepStackALPRI am having a really hard time getting this to work. I can get deepstack to see the plates, but I can't get deepstackalpr to do anything beyond that. I have followed the instructions exactly and read through the entire thread and I am stumped. In looking at the log I keep seeing errors similar to the following:
View attachment 130032
Does anyone know what might be causing this or what this error might signify? I am running the CPU version of deepstack on an I5-4790 with 24 GB RAM with the latest version of Blue Iris.
Also, running DeepStackALPR from the command line doesn't seem to show any sort of files being sent to it which makes me think there is a problem somewhere in the config file or script. Below is my config file:
View attachment 130033
Thanks.
I am having a really hard time getting this to work. I can get deepstack to see the plates, but I can't get deepstackalpr to do anything beyond that. I have followed the instructions exactly and read through the entire thread and I am stumped. In looking at the log I keep seeing errors similar to the following:
View attachment 130032
Does anyone know what might be causing this or what this error might signify? I am running the CPU version of deepstack on an I5-4790 with 24 GB RAM with the latest version of Blue Iris.
Also, running DeepStackALPR from the command line doesn't seem to show any sort of files being sent to it which makes me think there is a problem somewhere in the config file or script. Below is my config file:
View attachment 130033
Thanks.
Do you have two LPR cameras? If so the api is not setup to do two cameras. I have been working on updating my custom models, after I am finished with the custom models I will do some more work on DeepStackALPR
That is what I am seeing the issues people are having. I was going to look into during the install to run a bat file that will give full access to all user typesFor me, it was a permissions problem with the DeepstackALPR folder. I ended up giving full access to all user types and then it worked.
C:\Program Files (x86)\DeepStackALPR>DeepStackALPR.exe /?
Serving on port 5000
[2022-06-07 14:45:41,459] ERROR in app: Exception on /DeepStackALPR [POST]
Traceback (most recent call last):
File "flask\app.py", line 2073, in wsgi_app
File "flask\app.py", line 1518, in full_dispatch_request
File "flask\app.py", line 1516, in full_dispatch_request
File "flask\app.py", line 1502, in dispatch_request
File "DeepStackALPR.py", line 518, in ALPR
File "DeepStackALPR.py", line 427, in alpr
ValueError: max() arg is an empty sequence
127.0.0.1 - - [2022-06-07 14:45:41] "POST /DeepStackALPR HTTP/1.1" 500 426 0.330898
127.0.0.1 - - [2022-06-07 14:46:03] yes, it is a positive match. A plate was found in car.jpg with 0.93652344 confidence.
[2022-06-07 14:46:03,728] ERROR in app: Exception on /DeepStackALPR [POST]
Traceback (most recent call last):
File "flask\app.py", line 2073, in wsgi_app
File "flask\app.py", line 1518, in full_dispatch_request
File "flask\app.py", line 1516, in full_dispatch_request
File "flask\app.py", line 1502, in dispatch_request
File "DeepStackALPR.py", line 518, in ALPR
File "DeepStackALPR.py", line 140, in alpr
File "PIL\Image.py", line 2209, in save
PermissionError: [Errno 13] Permission denied: 'C:\\Program Files\\Blue Iris 5\\www\\ALPR\\ALPR.jpg'
127.0.0.1 - - [2022-06-07 14:46:03] "POST /DeepStackALPR HTTP/1.1" 500 426 0.131455
[2022-06-07 14:49:17,709] ERROR in app: Exception on /DeepStackALPR [POST]
Traceback (most recent call last):
File "flask\app.py", line 2073, in wsgi_app
File "flask\app.py", line 1518, in full_dispatch_request
File "flask\app.py", line 1516, in full_dispatch_request
File "flask\app.py", line 1502, in dispatch_request
File "DeepStackALPR.py", line 518, in ALPR
File "DeepStackALPR.py", line 427, in alpr
ValueError: max() arg is an empty sequence
127.0.0.1 - - [2022-06-07 14:49:17] "POST /DeepStackALPR HTTP/1.1" 500 426 0.357504
For all cameras [I think there is a comma here] have the camera alert folder broken out for each day using the override setting in the Record tab for the cameras (&CAM\%Y%m%d\&CAM.%Y%m%d_%H%M%S)