Blue Iris and CodeProject.AI ALPR

I keep getting this error message when I run Docker Desktop platerecognizer/alpr "Please add -v license:/license to the docker command". What does this mean? How do I add this and to what do I add it to?

Thank you,

Rick Johnson

This thread is for the ALPR in CodeProject.AI....
 
So I managed to just build and run CodeProjectAI on the Mac M1 natively. You need to check it out from GitHub and install the Visual Studio for Mac app.

I tried installing the ALPR on this, and the installation says successful, but I cannot read back any plates. Log below.

On the plus side, I have a test photo with may 30 faces on it. My XEON will identify the faces in about 150 ms (Linux, 220 ms Windows), the Mac M1 is about half of that in 75ms. It is an old Xeon to be fair.
-----------------------------
Operating System: macOS (Darwin 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103)
Architecture: Arm64
Target: macOS-Arm64
BuildConfig: Debug
Execution Env: Native
----------------------
15:52:34: Module 'License Plate Reader' (ID: ALPR)
15:52:34: Active: True
15:52:34: GPU: Support disabled
15:52:34: Parallelism: 0
15:52:34: Platforms: windows,linux,macos,macos-arm64
15:52:34: FilePath: ALPR_adapter.py
15:52:34: ModulePath: ALPR
15:52:34: Install: PostInstalled
15:52:34: Runtime:
15:52:34: Queue: ALPR_queue
15:52:34: Start pause: 1 sec
15:52:34: Valid: True
15:52:34: Environment Variables
15:52:34: PLATE_CONFIDENCE = 0.4
15:52:34:
15:52:34: Started License Plate Reader module
15:52:35: Module ALPR started successfully.
15:52:54: ALPR_adapter.py: [2023/03/21 15:52:54] ppocr DEBUG: Namespace(alpha=1.0, benchmark=False, beta=1.0, cls_batch_num=6, cls_image_shape='3, 48, 192', cls_model_dir='paddleocr/ch_ppocr_mobile_v2.0_cls_infer', cls_thresh=0.9, cpu_threads=10, crop_res_save_dir='./output', det=True, det_algorithm='DB', det_db_box_thresh=0.4, det_db_score_mode='fast', det_db_thresh=0.3, det_db_unclip_ratio=2.0, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_east_score_thresh=0.8, det_fce_box_type='poly', det_limit_side_len=960, det_limit_type='max', det_model_dir='paddleocr/en_PP-OCRv3_det_infer', det_pse_box_thresh=0.85, det_pse_box_type='quad', det_pse_min_area=16, det_pse_scale=1, det_pse_thresh=0, det_sast_nms_thresh=0.2, det_sast_polygon=False, det_sast_score_thresh=0.5, draw_img_save_dir='./inference_results', drop_score=0.4, e2e_algorithm='PGNet', e2e_char_dict_path='./ppocr/utils/ic15_dict.txt', e2e_limit_side_len=768, e2e_limit_type='max', e2e_model_dir=None, e2e_pgnet_mode='fast', e2e_pgnet_score_thresh=0.5, e2e_pgnet_valid_set='totaltext', enable_mkldnn=False, fourier_degree=5, gpu_mem=500, help='==SUPPRESS==', image_dir=None, image_orientation=False, ir_optim=True, kie_algorithm='LayoutXLM', label_list=['0', '180'], lang='en', layout=True, layout_dict_path=None, layout_model_dir=None, layout_nms_threshold=0.5, layout_score_threshold=0.5, max_batch_size=10, max_text_length=25, merge_no_span_structure=True, min_subgraph_size=15, mode='structure', ocr=True, ocr_order_method=None, ocr_version='PP-OCRv3', output='./output', precision='fp32', process_id=0, rec=True, rec_algorithm='CRNN', rec_batch_num=6, rec_char_dict_path='/Users/mike/codeProject/CodeProject.AI-Server/src/modules/ALPR/bin/macos/python38/venv/lib/python3.8/site-packages/paddleocr/ppocr/utils/en_dict.txt', rec_image_shape='3, 48, 320', rec_model_dir='paddleocr/en_PP-OCRv3_rec_infer', recovery=False, save_crop_res=False, save_log_path='./log_output/', save_pdf=False, scales=[8, 16, 32], ser_dict_path='../train_data/XFUND/class_list_xfun.txt', ser_model_dir=None, shape_info_filename=None, show_log=True, sr_batch_num=1, sr_image_shape='3, 32, 128', sr_model_dir=None, structure_version='PP-Structurev2', table=True, table_algorithm='TableAttn', table_char_dict_path=None, table_max_len=488, table_model_dir=None, total_process_num=1, type='ocr', use_angle_cls=False, use_dilation=False, use_gpu=False, use_mp=False, use_onnx=False, use_pdserving=False, use_space_char=True, use_tensorrt=False, use_xpu=False, vis_font_path='./doc/fonts/simfang.ttf', warmup=False)
15:52:55: License Plate Reader: Running init for License Plate Reader
15:52:55: License Plate Reader: License Plate Reader started.
15:54:03: Latest version available is 2.0.8-Beta
15:55:09: Response received (id 02610d8d-d56f-43ab-875e-cd8b2cd153ff)
15:55:09: ALPR_adapter.py: [2023/03/21 15:55:09] ppocr WARNING: Since the angle classifier is not initialized, the angle classifier will not be uesd during the forward process
15:55:12: Queued: 'alpr' request, id 1f3e85b6-b019-40c2-8fad-8d86c8e3ad4b
15:55:12: Dequeued 'alpr' request, id 1f3e85b6-b019-40c2-8fad-8d86c8e3ad4b
 
How many cameras can you run on CodeProject Ai? Seems like if I run more than 2 cameras CodeProject goes offline.
 
  • Wow
Reactions: Nunofya
So I managed to just build and run CodeProjectAI on the Mac M1 natively. You need to check it out from GitHub and install the Visual Studio for Mac app.

I tried installing the ALPR on this, and the installation says successful, but I cannot read back any plates. Log below.

On the plus side, I have a test photo with may 30 faces on it. My XEON will identify the faces in about 150 ms (Linux, 220 ms Windows), the Mac M1 is about half of that in 75ms. It is an old Xeon to be fair.
-----------------------------
Operating System: macOS (Darwin 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103)
Architecture: Arm64
Target: macOS-Arm64
BuildConfig: Debug
Execution Env: Native
----------------------
15:52:34: Module 'License Plate Reader' (ID: ALPR)
15:52:34: Active: True
15:52:34: GPU: Support disabled
15:52:34: Parallelism: 0
15:52:34: Platforms: windows,linux,macos,macos-arm64
15:52:34: FilePath: ALPR_adapter.py
15:52:34: ModulePath: ALPR
15:52:34: Install: PostInstalled
15:52:34: Runtime:
15:52:34: Queue: ALPR_queue
15:52:34: Start pause: 1 sec
15:52:34: Valid: True
15:52:34: Environment Variables
15:52:34: PLATE_CONFIDENCE = 0.4
15:52:34:
15:52:34: Started License Plate Reader module
15:52:35: Module ALPR started successfully.
15:52:54: ALPR_adapter.py: [2023/03/21 15:52:54] ppocr DEBUG: Namespace(alpha=1.0, benchmark=False, beta=1.0, cls_batch_num=6, cls_image_shape='3, 48, 192', cls_model_dir='paddleocr/ch_ppocr_mobile_v2.0_cls_infer', cls_thresh=0.9, cpu_threads=10, crop_res_save_dir='./output', det=True, det_algorithm='DB', det_db_box_thresh=0.4, det_db_score_mode='fast', det_db_thresh=0.3, det_db_unclip_ratio=2.0, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_east_score_thresh=0.8, det_fce_box_type='poly', det_limit_side_len=960, det_limit_type='max', det_model_dir='paddleocr/en_PP-OCRv3_det_infer', det_pse_box_thresh=0.85, det_pse_box_type='quad', det_pse_min_area=16, det_pse_scale=1, det_pse_thresh=0, det_sast_nms_thresh=0.2, det_sast_polygon=False, det_sast_score_thresh=0.5, draw_img_save_dir='./inference_results', drop_score=0.4, e2e_algorithm='PGNet', e2e_char_dict_path='./ppocr/utils/ic15_dict.txt', e2e_limit_side_len=768, e2e_limit_type='max', e2e_model_dir=None, e2e_pgnet_mode='fast', e2e_pgnet_score_thresh=0.5, e2e_pgnet_valid_set='totaltext', enable_mkldnn=False, fourier_degree=5, gpu_mem=500, help='==SUPPRESS==', image_dir=None, image_orientation=False, ir_optim=True, kie_algorithm='LayoutXLM', label_list=['0', '180'], lang='en', layout=True, layout_dict_path=None, layout_model_dir=None, layout_nms_threshold=0.5, layout_score_threshold=0.5, max_batch_size=10, max_text_length=25, merge_no_span_structure=True, min_subgraph_size=15, mode='structure', ocr=True, ocr_order_method=None, ocr_version='PP-OCRv3', output='./output', precision='fp32', process_id=0, rec=True, rec_algorithm='CRNN', rec_batch_num=6, rec_char_dict_path='/Users/mike/codeProject/CodeProject.AI-Server/src/modules/ALPR/bin/macos/python38/venv/lib/python3.8/site-packages/paddleocr/ppocr/utils/en_dict.txt', rec_image_shape='3, 48, 320', rec_model_dir='paddleocr/en_PP-OCRv3_rec_infer', recovery=False, save_crop_res=False, save_log_path='./log_output/', save_pdf=False, scales=[8, 16, 32], ser_dict_path='../train_data/XFUND/class_list_xfun.txt', ser_model_dir=None, shape_info_filename=None, show_log=True, sr_batch_num=1, sr_image_shape='3, 32, 128', sr_model_dir=None, structure_version='PP-Structurev2', table=True, table_algorithm='TableAttn', table_char_dict_path=None, table_max_len=488, table_model_dir=None, total_process_num=1, type='ocr', use_angle_cls=False, use_dilation=False, use_gpu=False, use_mp=False, use_onnx=False, use_pdserving=False, use_space_char=True, use_tensorrt=False, use_xpu=False, vis_font_path='./doc/fonts/simfang.ttf', warmup=False)
15:52:55: License Plate Reader: Running init for License Plate Reader
15:52:55: License Plate Reader: License Plate Reader started.
15:54:03: Latest version available is 2.0.8-Beta
15:55:09: Response received (id 02610d8d-d56f-43ab-875e-cd8b2cd153ff)
15:55:09: ALPR_adapter.py: [2023/03/21 15:55:09] ppocr WARNING: Since the angle classifier is not initialized, the angle classifier will not be uesd during the forward process
15:55:12: Queued: 'alpr' request, id 1f3e85b6-b019-40c2-8fad-8d86c8e3ad4b
15:55:12: Dequeued 'alpr' request, id 1f3e85b6-b019-40c2-8fad-8d86c8e3ad4b
The log look all normal, post a screenshot like the below also run a test like below

1679523570073.png
1679523623348.png
 
I've got an interesting one. I upgraded my GPU to try to get the License plate reader working on GPU. Getting this in the results.


ALPR1.pngALPR3.png
 
Weird results with OCR as well. ScreenshotView attachment 157826
Can you post the log showing the ALPR module running like below

24:00:03:Client request 'alpr' in the queue (...d3aa17)
24:00:03:Request 'alpr' dequeued for processing (...d3aa17)
24:00:03:License Plate Reader: Retrieved ALPR_queue command
24:00:03:Client request 'custom' in the queue (...d33543)
24:00:03:Request 'custom' dequeued for processing (...d33543)
24:00:03:Response received (...d33543)
24:00:03:Object Detection (Net): Command completed in 51 ms.
24:00:03:ALPR_adapter.py: [2023/03/24 00:00:03] ppocr DEBUG: dt_boxes num : 3, elapse : 0.03399920463562012
24:00:03:ALPR_adapter.py: [2023/03/24 00:00:03] ppocr DEBUG: rec_res num : 3, elapse : 0.0670006275177002
24:00:03:License Plate Reader: Queue and Processing License Plate Reader command 'alpr' (...d3aa17) took 183ms
24:00:03:Response received (...d3aa17)
 
  • Like
Reactions: Crest6010
Can you post the log showing the ALPR module running like below

24:00:03:Client request 'alpr' in the queue (...d3aa17)
24:00:03:Request 'alpr' dequeued for processing (...d3aa17)
24:00:03:License Plate Reader: Retrieved ALPR_queue command
24:00:03:Client request 'custom' in the queue (...d33543)
24:00:03:Request 'custom' dequeued for processing (...d33543)
24:00:03:Response received (...d33543)
24:00:03:Object Detection (Net): Command completed in 51 ms.
24:00:03:ALPR_adapter.py: [2023/03/24 00:00:03] ppocr DEBUG: dt_boxes num : 3, elapse : 0.03399920463562012
24:00:03:ALPR_adapter.py: [2023/03/24 00:00:03] ppocr DEBUG: rec_res num : 3, elapse : 0.0670006275177002
24:00:03:License Plate Reader: Queue and Processing License Plate Reader command 'alpr' (...d3aa17) took 183ms
24:00:03:Response received (...d3aa17)
24:09:35:Client request 'alpr' in the queue (...ab0b7d)
24:09:35:Request 'alpr' dequeued for processing (...ab0b7d)
24:09:35:License Plate Reader: Retrieved ALPR_queue command
24:09:35:Client request 'custom' in the queue (...f8a186)
24:09:35:Request 'custom' dequeued for processing (...f8a186)
24:09:35:Object Detection (YOLOv5 6.2): Retrieved objectdetection_queue command
24:09:35:Object Detection (YOLOv5 6.2): Detecting using license-plate
24:09:35:Response received (...f8a186)
24:09:35:Object Detection (YOLOv5 6.2): Queue and Processing Object Detection (YOLOv5 6.2) command 'custom' (...f8a186) took 61ms
24:09:35:ALPR_adapter.py: [2023/03/24 00:09:35] ppocr WARNING: Since the angle classifier is not initialized, the angle classifier will not be uesd during the forward process
24:09:35:ALPR_adapter.py: [2023/03/24 00:09:35] ppocr DEBUG: dt_boxes num : 1, elapse : 0.016915321350097656
24:09:35:ALPR_adapter.py: [2023/03/24 00:09:35] ppocr DEBUG: rec_res num : 1, elapse : 0.011013507843017578
24:09:35:License Plate Reader: Queue and Processing License Plate Reader command 'alpr' (...ab0b7d) took 108ms
24:09:35:Response received (...ab0b7d)
24:09:40:Client request 'custom' in the queue (...f20c3c)
24:09:40:Request 'custom' dequeued for processing (...f20c3c)
24:09:40:Object Detection (YOLOv5 6.2): Retrieved objectdetection_queue command
24:09:40:Object Detection (YOLOv5 6.2): Detecting using ipcam-general
24:09:40:Response received (...f20c3c)
24:09:40:Object Detection (YOLOv5 6.2): Queue and Processing Object Detection (YOLOv5 6.2) command 'custom' (...f20c3c) took 43ms
 
24:09:35:Client request 'alpr' in the queue (...ab0b7d)
24:09:35:Request 'alpr' dequeued for processing (...ab0b7d)
24:09:35:License Plate Reader: Retrieved ALPR_queue command
24:09:35:Client request 'custom' in the queue (...f8a186)
24:09:35:Request 'custom' dequeued for processing (...f8a186)
24:09:35:Object Detection (YOLOv5 6.2): Retrieved objectdetection_queue command
24:09:35:Object Detection (YOLOv5 6.2): Detecting using license-plate
24:09:35:Response received (...f8a186)
24:09:35:Object Detection (YOLOv5 6.2): Queue and Processing Object Detection (YOLOv5 6.2) command 'custom' (...f8a186) took 61ms
24:09:35:ALPR_adapter.py: [2023/03/24 00:09:35] ppocr WARNING: Since the angle classifier is not initialized, the angle classifier will not be uesd during the forward process
24:09:35:ALPR_adapter.py: [2023/03/24 00:09:35] ppocr DEBUG: dt_boxes num : 1, elapse : 0.016915321350097656
24:09:35:ALPR_adapter.py: [2023/03/24 00:09:35] ppocr DEBUG: rec_res num : 1, elapse : 0.011013507843017578
24:09:35:License Plate Reader: Queue and Processing License Plate Reader command 'alpr' (...ab0b7d) took 108ms
24:09:35:Response received (...ab0b7d)
24:09:40:Client request 'custom' in the queue (...f20c3c)
24:09:40:Request 'custom' dequeued for processing (...f20c3c)
24:09:40:Object Detection (YOLOv5 6.2): Retrieved objectdetection_queue command
24:09:40:Object Detection (YOLOv5 6.2): Detecting using ipcam-general
24:09:40:Response received (...f20c3c)
24:09:40:Object Detection (YOLOv5 6.2): Queue and Processing Object Detection (YOLOv5 6.2) command 'custom' (...f20c3c) took 43ms
Everything looks normal, I am stumped, maybe Windows 11 might be causing the issue, not sure.
 
  • Like
Reactions: Crest6010
Everything looks normal, I am stumped, maybe Windows 11 might be causing the issue, not sure.
Thanks for looking in to it though! I'm sure it'll get figured out at some point. Fortunately I have the License plate reader running on CPU which is working well for now.