|
I believe the error is caused by BI blocking access to the AI.Server. After disabling BI from using the Nvidia GPU, I have not had any errors in the last 10 hours.
|
|
|
|
|
cheers
Chris Maunder
|
|
|
|
|
Please share more
|
|
|
|
|
Say What!! I thought cars only went to the Vet!!!!
Essaf
|
|
|
|
|
|
I wish.
Actually an aftermarket Android powered screen hosting Apple CarPlay. I had to pop out of CarPlay, dive into the android settings, get both my laptop and the screen connected to my Phone's hotspot, track down the IP addresses, get everything running, all while playing whack-a-mole as the head unit kept automatically trying to go back into CarPlay mode. I finally got it and then realised I didn't have any demo images on the head unit with which to play with in the AI Explorer.
cheers
Chris Maunder
|
|
|
|
|
Hello!
I'm very satisfied with the CodeProject AI and I managed to put the CodeProject AI together for off-line use (no internet).
I have two questions here:
1. Is it possible to have the AI search on the recorded video? Meaning, run the AI on the recorded video to look for specific things. I'm using the AI with Agent DVR (I put together Agent DVR and AI for video analytic solely) and now, I'm thinking to look for a specific thing on the recorded video, but instead of viewing it from the beginning to the end, I wanted to see if I can just have the AI search for me. Is it possible?
2. I tried to put ALPR together but I'm running into an error that it is trying to connect to the internet or something. (I'm trying to run it in local network only).
11:07:47:ALPR_adapter.py: Traceback (most recent call last):
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\connection.py", line 175, in _new_conn
11:07:47:ALPR_adapter.py: (self._dns_host, self.port), self.timeout, **extra_kw
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\util\connection.py", line 72, in create_connection
11:07:47:ALPR_adapter.py: for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\AnalysisLayer\bin\windows\Python37\lib\socket.py", line 752, in getaddrinfo
11:07:47:ALPR_adapter.py: for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
11:07:47:ALPR_adapter.py: socket.gaierror: [Errno 11002] getaddrinfo failed
11:07:47:ALPR_adapter.py: During handling of the above exception, another exception occurred:
11:07:47:ALPR_adapter.py: Traceback (most recent call last):
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\connectionpool.py", line 710, in urlopen
11:07:47:ALPR_adapter.py: chunked=chunked,
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
11:07:47:ALPR_adapter.py: self._validate_conn(conn)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
11:07:47:ALPR_adapter.py: conn.connect()
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\connection.py", line 358, in connect
11:07:47:ALPR_adapter.py: self.sock = conn = self._new_conn()
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\connection.py", line 187, in _new_conn
11:07:47:ALPR_adapter.py: self, "Failed to establish a new connection: %s" % e
11:07:47:ALPR_adapter.py: urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 11002] getaddrinfo failed
11:07:47:ALPR_adapter.py: During handling of the above exception, another exception occurred:
11:07:47:ALPR_adapter.py: Traceback (most recent call last):
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\requests\adapters.py", line 499, in send
11:07:47:ALPR_adapter.py: timeout=timeout,
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\connectionpool.py", line 788, in urlopen
11:07:47:ALPR_adapter.py: method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\urllib3\util\retry.py", line 592, in increment
11:07:47:ALPR_adapter.py: raise MaxRetryError(_pool, url, error or ResponseError(cause))
11:07:47:ALPR_adapter.py: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='paddleocr.bj.bcebos.com', port=443): Max retries exceeded with url: /PP-OCRv3/english/en_PP-OCRv3_det_infer.tar (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))
11:07:47:ALPR_adapter.py: During handling of the above exception, another exception occurred:
11:07:47:ALPR_adapter.py: Traceback (most recent call last):
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 19, in
11:07:47:ALPR_adapter.py: from ALPR import detect_platenumber
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 33, in
11:07:47:ALPR_adapter.py: rec_model_dir = opts.rec_model_dir)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\paddleocr\paddleocr.py", line 506, in __init__
11:07:47:ALPR_adapter.py: maybe_download(params.det_model_dir, det_url)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\paddleocr\ppocr\utils\network.py", line 53, in maybe_download
11:07:47:ALPR_adapter.py: download_with_progressbar(url, tmp_path)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\paddleocr\ppocr\utils\network.py", line 26, in download_with_progressbar
11:07:47:ALPR_adapter.py: response = requests.get(url, stream=True)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\requests\api.py", line 73, in get
11:07:47:ALPR_adapter.py: return request("get", url, params=params, **kwargs)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\requests\api.py", line 59, in request
11:07:47:ALPR_adapter.py: return session.request(method=method, url=url, **kwargs)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\requests\sessions.py", line 587, in request
11:07:47:ALPR_adapter.py: resp = self.send(prep, **send_kwargs)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\requests\sessions.py", line 701, in send
11:07:47:ALPR_adapter.py: r = adapter.send(request, **kwargs)
11:07:47:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\requests\adapters.py", line 565, in send
11:07:47:ALPR_adapter.py: raise ConnectionError(e, request=request)
11:07:47:ALPR_adapter.py: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='paddleocr.bj.bcebos.com', port=443): Max retries exceeded with url: /PP-OCRv3/english/en_PP-OCRv3_det_infer.tar (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))
Based on the last line, it seems like it is either trying to download something or connect to an internet.
Any idea if I need to download something or what can I do with this?
The version I'm using is 2.0.8, running on Win 11. I'm not using any GPU but simply runs the AI on CPU.
Thank you for your help!
ML,
Toby
modified 13-Mar-23 12:16pm.
|
|
|
|
|
Update:
I managed to get it sort of working. (At least the system is not giving an obvious error). I ran the ALPR and tried to recognize a plate but I would not get any result and got the following code:
09:17:26:ALPR_adapter.py: [2023/03/17 09:17:26] 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_box_type='quad', 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_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_min_area=16, det_pse_scale=1, det_pse_thresh=0, det_sast_nms_thresh=0.2, 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', page_num=0, precision='fp32', process_id=0, re_model_dir=None, rec=True, rec_algorithm='CRNN', rec_batch_num=6, rec_char_dict_path='C:\\Program Files\\CodeProject\\AI\\modules\\ALPR\\bin\\windows\\python37\\venv\\lib\\site-packages\\paddleocr\\ppocr\\utils\\en_dict.txt', rec_image_inverse=True, 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/', scales=[8, 16, 32], ser_dict_path='../train_data/XFUND/class_list_xfun.txt', ser_model_dir=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_npu=False, use_onnx=False, use_pdf2docx_api=False, use_pdserving=False, use_space_char=True, use_tensorrt=False, use_visual_backbone=True, use_xpu=False, vis_font_path='./doc/fonts/simfang.ttf', warmup=False)
Any idea what went wrong with it? I'm not quite understand the errors here.
ML,
Toby
|
|
|
|
|
That is normal with the ALPR first starts up. Try testing it using Explorer like below
|
|
|
|
|
Hi Mike,
Thank you for your reply. After seeing your image, I realized that the Yolo was off...
I turned it on and it recognize some test images now. But for some reason, it won't recognize the big plates image. Any idea? (See below).
(I know the process speed is slow, I'm getting a GTX 1070 Ti and hope it will handle it.)
|
|
|
|
|
The ALPR module is designed to read plates on a wider view not zoomed in images of plates.
|
|
|
|
|
Dear Mike,
I see. That means there is nothing wrong with my ALPR than, besides slow on processing.
That answered my question. Thanks a lot!
|
|
|
|
|
DetailsUnable to install "MobileService"Domain: com.apple.dt.MobileDeviceErrorDomainCode: -402620395User Info: { DVTErrorCreationDateKey = "2023-03-07 06:35:20 +0000"; IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;}--A valid provisioning profile for this executable was not found.Domain: com.apple.dt.MobileDeviceErrorDomainCode: -402620395User Info: { DVTRadarComponentKey = 487925; MobileDeviceErrorCode = "(0xE8008015)"; "com.apple.dtdevicekit.stacktrace" = (0 DTDeviceKitBase 0x000000013a9f59d1 DTDKCreateNSErrorFromAMDErrorCode + 2201 DTDeviceKitBase 0x000000013aa31ce7 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 1552 DVTFoundation 0x000000010b3a57d6 DVTInvokeWithStrongOwnership + 713 DTDeviceKitBase 0x000000013aa31a1d -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 14224 IDEiOSSupportCore 0x000000013a780668 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 34145 DVTFoundation 0x000000010b4d73d4 __DVT_CALLING_CLIENT_BLOCK__ + 76 DVTFoundation 0x000000010b4d84bc __DVTDispatchAsync_block_invoke + 3727 libdispatch.dylib 0x00007ff805f83ad8 _dispatch_call_block_and_release + 128 libdispatch.dylib 0x00007ff805f84cc9 _dispatch_client_callout + 89 libdispatch.dylib 0x00007ff805f8acee _dispatch_lane_serial_drain + 69610 libdispatch.dylib 0x00007ff805f8b7c8 _dispatch_lane_invoke + 36611 libdispatch.dylib 0x00007ff805f957e1 _dispatch_workloop_worker_thread + 75812 libsystem_pthread.dylib 0x00007ff80613b074 _pthread_wqthread + 32613 libsystem_pthread.dylib 0x00007ff806139ffb start_wqthread + 15);}-- Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "iPhone8,1"; "device_osBuild" = "15.7.3 (19H307)"; "device_platform" = "com.apple.platform.iphoneos"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 5401; "operation_errorCode" = "-402620395"; "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain"; "operation_errorWorker" = IDEInstalliPhoneLauncher; "operation_name" = IDEiPhoneRunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 5; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 0; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_runnable_swiftVersion" = "5.6.1"; "param_runnable_type" = 2; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos15.5"; "sdk_osVersion" = "15.5"; "sdk_variant" = iphoneos;}-- System Information macOS Version 12.2.1 (Build 21D62)Xcode 13.4.1 (20504) (Build 13F100)Timestamp: 2023-03-07T12:05:20+05:30
|
|
|
|
|
I'm not sure what this has to do with CodeProject.AI Server
cheers
Chris Maunder
|
|
|
|
|
How does one remove "null" userid's in face recognition?
modified 15-Mar-23 16:35pm.
|
|
|
|
|
I have not seen that before! We'll add it to the TODO list to get that sorted out.
cheers
Chris Maunder
|
|
|
|
|
Thanks for responding. The cause of the 2 null users stuck in there is me. I'm coding a test rig to create a plugin for another application. I inadvertantly sent a couple of face register commands to the server that were missing userid. I see you check for null in the browser. I have uninstalled and reinstalled the server, but the entries are still there. Are the userid's stored in the registry? I'm on win 7 Ult 64.
|
|
|
|
|
I have created an event driven plugin for HomeSeer that works as expected but the null userID is recognizing as me more often than not.
How can I clear all users from CPAI server?
|
|
|
|
|
Once or twice a day, I find that CP AI stop responding. I cannot get to the dashboard but the services is still running. Simply restarting the service gets everything back online.
I'm on the latest beta release.
Can you assist me troubleshoot the issue?
Operating System: Windows (Microsoft Windows 11 version 10.0.22000)
CPUs: 1 CPU x 4 cores. 8 logical processors (x64)
GPU: NVIDIA GeForce GTX 1650 (4 GiB) (NVidia)
Driver: 522.30 CUDA: 11.8 Compute: 7.5
System RAM: 32 GiB
Target: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
.NET framework: .NET 7.0.3
System GPU info:
GPU 3D Usage 41%
GPU RAM Usage 2.4 GiB
Video adapter info:
NVIDIA GeForce GTX 1650:
Adapter RAM 4 GiB
Driver Version 31.0.15.2230
Video Processor NVIDIA GeForce GTX 1650
Intel(R) HD Graphics 530:
Adapter RAM 1,024 MiB
Driver Version 26.20.100.7262
Video Processor Intel(R) HD Graphics Family
Global Environment variables:
CPAI_APPROOTPATH = C:\Program Files\CodeProject\AI
CPAI_PORT = 32168
|
|
|
|
|
We have seen this before and have added some more error trapping and reporting in the next version. Out of interest, what's the memory use in the OS and in your GPU when you see the service no longer responding?
cheers
Chris Maunder
|
|
|
|
|
Chris, my CPU sites steady at 38-40% and memory is 44%
I was using port 5000 in blue iris before I made this post but changed it to 32168. Note that the dashboard is accessible via either port for some reason. As it's hunged up now, i can not access it via port 32168 but port 5000 is responding. After restarting the service it can be access via both port number again.
I just changed BI to connect to port 5000, lets see if that scenario flip next time it hang up.
|
|
|
|
|
Thanks for the info.
We listen on both port 5000 and 32168. Port 5000 is for Deepstack compatibility but isn't a great port since it's (in theory) reserved for OS services (and is in use on macOS)
Are you running any automatic backup or defrag software? Anything that is scheduled to run at the time you're seeing the server hang up?
cheers
Chris Maunder
|
|
|
|
|
Out of curiosity, does this happen when a detection in BlueIris happens and the AI will go unresponsive? If so, I just dealt with this issue with BlueIris and CP AI only using the processor.
I have 8 cores for the Windows 2019 server which was being used by BlueIris and CP AI. Utilization was in the ballpark of 45%. Sometimes detection would work, but with low (50-60%) AI confidence on the object being detected, but would crash other times and auto restart. When snowing, it would crash more frequently. I imagine if I gave more cores to the server, it would be more stable, but I didn't test that.
I had a Quadro p400 that was ready to be used in the server (all prerequisites already installed prior to CP AI installed), but wasn't activated because I was testing the issue. Once I enabled the p400, I gave it to BlueIris for the encoding/decoding of videos and let CP AI continue to use the processor. Utilization of the processor is now down to ~18%. Did some detection tests and now the AI has ~90% confidence in the object detection plus it's no longer crashing. Well, that's as of today, but I'm optimistic I fixed that issue.
Not entirely sure if this is exactly your issue, but seems close enough.
Edit: Only reason why I don't have p400 enabled for both BlueIris and CP AI is because the AI will restart. It's only a 2GB card and most of the RAM is used. So my guess is the GPU runs out of RAM when the AI is working and crashes it. only a guess though.
Edit 2: Just tested it again as I've normally been doing by stepping in front of a camera and CP AI crashed and is restarting again. bla. Would be nice to see WHY it's crashing.
modified 11-Mar-23 15:18pm.
|
|
|
|
|
I can't say for sure but I've tried to do many test and tuning through BI and it works fine with very little resource used on the GPU. I've not changed my setup for months and never had this issue with CP AI.
|
|
|
|
|
I have CPAI 2.0.8 running on my Blue Iris machine now and it works well.
I would like to have the CPAI instance attache to the accessible IP (e.g. 192.168.10.10) instead of localhost so that another computer on the network can submit requests to the instance running on the BI machine for experimentation.
|
|
|
|
|