|
I've gotten these RuntimeErrors on restart since I first installed CodeProjectAI, and I'm having object detection issues. I upgraded the CUDA environment to the latest version thinking it might help but to know avail. What are they and how can I remedy this issue. Thanks in advance for your help.
2023-11-01 01:13:36: Object Detection (YOLOv5 6.2): [RuntimeError] : Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo\detect.py", line 141, in do_detection
det = detector(img, size=640)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\yolov5\models\common.py", line 705, in forward
y = self.model(x, augment=augment) # forward
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\yolov5\models\common.py", line 515, in forward
y = self.model(im, augment=augment, visualize=visualize) if augment or visualize else self.model(im)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Lib\site-packages\yolov5\models\yolo.py", line 209, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Lib\site-packages\yolov5\models\yolo.py", line 121, in _forward_once
x = m(x) # run
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Lib\site-packages\yolov5\models\yolo.py", line 75, in forward
wh = (wh * 2) ** 2 * self.anchor_grid[i] # wh
RuntimeError: The size of tensor a (30) must match the size of tensor b (24) at non-singleton dimension 2
in Object Detection (YOLOv5 6.2)
|
|
|
|
|
Thanks very much for your report. Could you please share your System Info tab from the CodeProject.AI Server dashboard, and your installation logs? Also, is this happening in the Explorer or are you using something else like Blue Iris?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Thank you for your reply. Here is my system info. Where would I find the installation logs and how would I attach them to this thread? I haven't seen an attach file capability?? I'm trying to use CPAI with Blue Iris and having poor results. I'm trying to fix these file errors as a first step in my troubleshooting.
Server version: 2.3.2-Beta
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (Intel)
1 CPU x 4 cores. 8 logical processors (x64)
GPU: NVIDIA GeForce GT 1030 (2 GiB) (NVIDIA)
Driver: 545.84 CUDA: 12.3.52 (max supported: 12.3) Compute: 6.1
System RAM: 16 GiB
Target: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
.NET framework: .NET 7.0.10
Video adapter info:
Intel(R) HD Graphics 630:
Driver Version 27.20.100.9664
Video Processor Intel(R) HD Graphics Family
NVIDIA GeForce GT 1030:
Driver Version 31.0.15.4584
Video Processor NVIDIA GeForce GT 1030
System GPU info:
GPU 3D Usage 21%
GPU RAM Usage 1.6 GiB
Global Environment variables:
CPAI_APPROOTPATH =
CPAI_PORT = 32168
|
|
|
|
|
Thanks very much for that. You should be able to find the main logs in C:/Program Files/CodeProject/AI/logs. You won't need to paste the whole thing, but if you open up the TXT file you can copy and paste into here.
If you want to see logs while you're testing so you can show us what's wrong, if you look at the CodeProject.AI Server dashboard you can see those logs under the tab Server logs.
If you want to see the logs for the install of specific modules, like Object Detection YOLOv5 6.2, you can go into C:/Program Files/CodeProject/AI/modules/ObjectDetectionYolo and it will be in the install.log text file. If you can paste that one here, that would be most helpful.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Yes, I'm familiar with the logs available through the dashboard and the daily log files, but I wasn't aware of the install.log file associated with the YOLO module. It's pasted below:
2023-10-31 14:37:25: Installing CodeProject.AI Analysis Module
2023-10-31 14:37:25: ========================================================================
2023-10-31 14:37:25: CodeProject.AI Installer
2023-10-31 14:37:25: ========================================================================
2023-10-31 14:37:25: General CodeProject.AI setup
2023-10-31 14:37:25: Creating Directories...Done
2023-10-31 14:37:25: GPU support
2023-10-31 14:37:25: CUDA Present...Yes (version 12.3)
2023-10-31 14:37:25: ROCm Present...False
2023-10-31 14:37:25: Installing module ObjectDetectionYolo 1.7.1
2023-10-31 14:37:25: Installing Python 3.7
2023-10-31 14:37:25: Python 3.7 is already installed
2023-10-31 14:37:25: Creating Virtual Environment (Shared)...Virtual Environment already present
2023-10-31 14:37:25: Confirming we have Python 3.7 in our virtual environment...present
2023-10-31 14:37:49: Downloading Standard YOLO models...Expanding...Done.
2023-10-31 14:37:49: Copying contents of models-yolo5-pt.zip to assets...done
2023-10-31 14:37:49: Cleaning up...done
2023-10-31 14:38:17: Downloading Custom YOLO models...Expanding...Done.
2023-10-31 14:38:17: Copying contents of custom-models-yolo5-pt.zip to custom-models...done
2023-10-31 14:38:18: Cleaning up...done
2023-10-31 14:38:18: Installing Python packages for ObjectDetectionYolo
2023-10-31 14:38:18: [0;Installing GPU-enabled libraries: If available
2023-10-31 14:38:19: Ensuring Python package manager (pip) is installed...Done
2023-10-31 14:38:22: Ensuring Python package manager (pip) is up to date...Done
2023-10-31 14:38:22: Python packages specified by requirements.windows.cuda.txt
2023-10-31 14:38:24: - Installing Pandas, a data analysis / data manipulation tool...Already installed
2023-10-31 14:38:25: - Installing CoreMLTools, for working with .mlmodel format models...Already installed
2023-10-31 14:38:26: - Installing OpenCV, the Open source Computer Vision library...Already installed
2023-10-31 14:38:27: - Installing Pillow, a Python Image Library...Already installed
2023-10-31 14:38:28: - Installing SciPy, a library for mathematics, science, and engineering...Already installed
2023-10-31 14:38:29: - Installing PyYAML, a library for reading configuration files...Already installed
2023-10-31 14:38:30: - Installing PyTorch, an open source machine learning framework...Already installed
2023-10-31 14:38:31: - Installing TorchVision, for working with computer vision models...Already installed
2023-10-31 14:41:29: - Installing Ultralytics YoloV5 package for object detection in images...(âœ”ï¸ checked) Done
2023-10-31 14:41:30: - Installing Seaborn, a data visualization library based on matplotlib...Already installed
2023-10-31 14:41:30: Installing Python packages for the CodeProject.AI Server SDK
2023-10-31 14:41:32: Ensuring Python package manager (pip) is installed...Done
2023-10-31 14:41:35: Ensuring Python package manager (pip) is up to date...Done
2023-10-31 14:41:35: Python packages specified by requirements.txt
2023-10-31 14:41:36: - Installing Pillow, a Python Image Library...Already installed
2023-10-31 14:41:38: - Installing Charset normalizer...Already installed
2023-10-31 14:41:39: - Installing aiohttp, the Async IO HTTP library...Already installed
2023-10-31 14:41:40: - Installing aiofiles, the Async IO Files library...Already installed
2023-10-31 14:41:42: - Installing py-cpuinfo to allow us to query CPU info...Already installed
2023-10-31 14:41:43: - Installing Requests, the HTTP library...Already installed
2023-10-31 14:41:43: Setup complete
Installer exited with code 0
|
|
|
|
|
Thanks so much for that. Just making sure there wasn't an install error.
Unfortunately, the issue could be the 2GB RAM for your card. AI is a memory intensive operation. Some cards with 2GB RAM or less may struggle in some situations. Using the dashboard, you can either disable modules you don't need, or disable GPU support entirely for one or more modules. This will free up memory and help get you back on track.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
I want performance I can rely on from Blue Iris and CodeProject.AI. Can you recommend a GPU, or a few maybe, that perform well and yield fast identification and object detection results? Thanks for your help.
|
|
|
|
|
A Nvidia RTX 3060 12GB is a good GPU for AI. I used this GPU with my Blue Iris System
|
|
|
|
|
Thank you. I'll do some shopping for that card. Maybe I'll be able to find a Black Friday deal somewhere. I'm sure it's expensive. Also, can you explain a bit about how the graphics card can be the source of the runtimeErrors I'm receiving? Thanks again.
|
|
|
|
|
No installed modules are working...2.3.2
|
|
|
|
|
Thanks very much for your report. Could you please share your System Info tab from the CodeProject.AI Server dashboard, and the installation logs, and logs while you attempt to use the Explorer?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
I'm going to delete everything and start fresh, then report back...
|
|
|
|
|
Still nothing in model drop down box.
21:30:10:System: Windows
21:30:10:Operating System: Windows (Microsoft Windows 11 version 10.0.22621)
21:30:10:CPUs: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (Intel)
21:30:10: 1 CPU x 6 cores. 12 logical processors (x64)
21:30:10:GPU: NVIDIA GeForce GTX 1060 (6 GiB) (NVIDIA)
21:30:10: Driver: 516.01 CUDA: 11.7.64 (max supported: 11.7) Compute: 6.1
21:30:10:System RAM: 32 GiB
21:30:10:Target: Windows
21:30:10:BuildConfig: Release
21:30:10:Execution Env: Native
21:30:10:Runtime Env: Production
21:30:10:.NET framework: .NET 7.0.5
21:30:10:App DataDir: C:\ProgramData\CodeProject\AI
21:30:10:Video adapter info:
21:30:10: Intel(R) UHD Graphics 630:
21:30:10: Driver Version 31.0.101.2125
21:30:10: Video Processor Intel(R) UHD Graphics Family
21:30:10: NVIDIA GeForce GTX 1060:
21:30:10: Driver Version 31.0.15.1601
21:30:10: Video Processor NVIDIA GeForce GTX 1060
21:30:10:STARTING CODEPROJECT.AI SERVER
21:30:10:RUNTIMES_PATH = C:\Program Files\CodeProject\AI\runtimes
21:30:10:PREINSTALLED_MODULES_PATH = C:\Program Files\CodeProject\AI\preinstalled-modules
21:30:10:MODULES_PATH = C:\Program Files\CodeProject\AI\modules
21:30:10:PYTHON_PATH = \bin\windows\%PYTHON_DIRECTORY%\venv\Scripts\python
21:30:10:Data Dir = C:\ProgramData\CodeProject\AI
21:30:10:Server version: 2.3.4-Beta
21:30:14:Setting up initial modules. Please be patient...
21:30:14:Installing initial module FaceProcessing.
21:30:14:Preparing to install module 'FaceProcessing'
21:30:14:Downloading module 'FaceProcessing'
21:30:16:Installing module 'FaceProcessing'
21:30:16:FaceProcessing: Installing CodeProject.AI Analysis Module
21:30:16:FaceProcessing: ========================================================================
21:30:16:FaceProcessing: CodeProject.AI Installer
21:30:16:FaceProcessing: ========================================================================
21:30:16:FaceProcessing: General CodeProject.AI setup
21:30:16:Server: This is the latest version
21:30:16:FaceProcessing: Creating Directories...Done
21:30:16:FaceProcessing: GPU support
21:30:16:FaceProcessing: CUDA Present...Yes (version 11.7)
21:30:16:FaceProcessing: ROCm Present...False
21:30:17:FaceProcessing: Installing module FaceProcessing 1.8.1
21:30:17:FaceProcessing: Installing Python 3.7
21:36:33:FaceProcessing: Downloading Python 3.7 interpreter...Expanding...Done.
21:36:41:FaceProcessing: Creating Virtual Environment (Shared)...Done
21:36:41:FaceProcessing: Confirming we have Python 3.7 in our virtual environment...present
21:50:16:Module FaceProcessing installed successfully.
21:50:16:FaceProcessing: Downloading YOLO models...
21:50:16:Unable to install FaceProcessing: Timed out attempting to install Module 'FaceProcessing' (A task was canceled.)
21:50:16:Installing initial module ObjectDetectionNet.
21:50:16:Preparing to install module 'ObjectDetectionNet'
21:50:16:Downloading module 'ObjectDetectionNet'
21:50:16:
21:50:16:Module 'Face Processing' 1.8.1 (ID: FaceProcessing)
21:50:16:Module Path: C:\Program Files\CodeProject\AI\modules\FaceProcessing
21:50:16:AutoStart: True
21:50:16:Queue: faceprocessing_queue
21:50:16:Platforms: windows,linux,linux-arm64,macos,macos-arm64
21:50:16:GPU Libraries: installed if available
21:50:16:GPU Enabled: enabled
21:50:16:Parallelism: 0
21:50:16:Accelerator:
21:50:16:Half Precis.: enable
21:50:16:Runtime: python3.7
21:50:16:Runtime Loc: Shared
21:50:16:FilePath: intelligencelayer\face.py
21:50:16:Pre installed: False
21:50:16:Start pause: 3 sec
21:50:16:LogVerbosity:
21:50:16:Valid: True
21:50:16:Environment Variables
21:50:16:APPDIR = %CURRENT_MODULE_PATH%\intelligencelayer
21:50:16:DATA_DIR = %DATA_DIR%
21:50:16:MODE = MEDIUM
21:50:16:MODELS_DIR = %CURRENT_MODULE_PATH%\assets
21:50:16:PROFILE = desktop_gpu
21:50:16:USE_CUDA = True
21:50:16:YOLOv5_AUTOINSTALL = false
21:50:16:YOLOv5_VERBOSE = false
21:50:16:
21:50:16:Started Face Processing module
21:50:16:face.py: Traceback (most recent call last):
21:50:16:face.py: File "C:\Program Files\CodeProject\AI\modules\FaceProcessing\intelligencelayer\face.py", line 21, in
21:50:16:face.py: from request_data import RequestData
21:50:16:face.py: File "../../SDK/Python\request_data.py", line 7, in
21:50:16:face.py: from PIL import Image
21:50:16:face.py: ModuleNotFoundError: No module named 'PIL'
21:50:16:Module FaceProcessing has shutdown
21:50:16:face.py: has exited
21:50:16:Installing module 'ObjectDetectionNet'
21:50:17:ObjectDetectionNet: Installing CodeProject.AI Analysis Module
21:50:17:ObjectDetectionNet: ========================================================================
21:50:17:ObjectDetectionNet: CodeProject.AI Installer
21:50:17:ObjectDetectionNet: ========================================================================
21:50:17:ObjectDetectionNet: General CodeProject.AI setup
21:50:17:ObjectDetectionNet: Creating Directories...Done
21:50:17:ObjectDetectionNet: GPU support
21:50:17:ObjectDetectionNet: CUDA Present...Yes (version 11.7)
21:50:17:ObjectDetectionNet: ROCm Present...False
21:50:17:ObjectDetectionNet: Installing module ObjectDetectionNet 1.7.1
21:50:19:Module FaceProcessing started successfully.
22:08:46:ObjectDetectionNet: Downloading ObjectDetectionNet-DirectML-1.7.1.zip...Expanding...Done.
22:08:46:ObjectDetectionNet: Copying contents of ObjectDetectionNet-DirectML-1.7.1.zip to ...done
22:08:46:ObjectDetectionNet: Cleaning up...done
22:10:16:Module ObjectDetectionNet installed successfully.
22:10:16:Module ObjectDetectionNet not configured to AutoStart.
22:10:16:Unable to install ObjectDetectionNet: Timed out attempting to install Module 'ObjectDetectionNet' (A task was canceled.)
22:10:16:Installing initial module ObjectDetectionYolo.
22:10:16:Preparing to install module 'ObjectDetectionYolo'
22:10:16:Downloading module 'ObjectDetectionYolo'
22:10:20:Installing module 'ObjectDetectionYolo'
22:10:20:ObjectDetectionYolo: Installing CodeProject.AI Analysis Module
22:10:21:ObjectDetectionYolo: ========================================================================
22:10:21:ObjectDetectionYolo: CodeProject.AI Installer
22:10:21:ObjectDetectionYolo: ========================================================================
22:10:21:ObjectDetectionYolo: General CodeProject.AI setup
22:10:21:ObjectDetectionYolo: Creating Directories...Done
22:10:21:ObjectDetectionYolo: GPU support
22:10:21:ObjectDetectionYolo: CUDA Present...Yes (version 11.7)
22:10:21:ObjectDetectionYolo: ROCm Present...False
22:10:21:ObjectDetectionYolo: Installing module ObjectDetectionYolo 1.7.1
22:10:21:ObjectDetectionYolo: Installing Python 3.7
22:10:22:ObjectDetectionYolo: Python 3.7 is already installed
22:10:22:ObjectDetectionYolo: Creating Virtual Environment (Shared)...Virtual Environment already present
22:10:22:ObjectDetectionYolo: Confirming we have Python 3.7 in our virtual environment...present
22:21:05:
22:21:05:Module 'Object Detection (YOLOv5 .NET)' 1.7.1 (ID: ObjectDetectionNet)
22:21:05:Module Path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet
22:21:05:AutoStart: True
22:21:05:Queue: objectdetection_queue
22:21:05:Platforms: windows,linux,linux-arm64,macos,macos-arm64
22:21:05:GPU Libraries: installed if available
22:21:05:GPU Enabled: enabled
22:21:05:Parallelism: 0
22:21:05:Accelerator:
22:21:05:Half Precis.: enable
22:21:05:Runtime: execute
22:21:05:Runtime Loc: Shared
22:21:05:FilePath: ObjectDetectionNet.exe
22:21:05:Pre installed: False
22:21:05:Start pause: 1 sec
22:21:05:LogVerbosity:
22:21:05:Valid: True
22:21:05:Environment Variables
22:21:05:CUSTOM_MODELS_DIR = %CURRENT_MODULE_PATH%\custom-models
22:21:05:MODELS_DIR = %CURRENT_MODULE_PATH%\assets
22:21:05:MODEL_SIZE = MEDIUM
22:21:05:
22:21:05:Started Object Detection (YOLOv5 .NET) module
22:21:06:ObjectDetectionNet.exe: fail: CodeProject.AI.Modules.ObjectDetection.Yolo.ObjectDetector[0]
22:21:06:ObjectDetectionNet.exe: Unable to load the model at C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet\assets\yolov5m.onnx
22:21:06:ObjectDetectionNet.exe: Application started. Press Ctrl+C to shut down.
22:21:06:ObjectDetectionNet.exe: Hosting environment: Production
22:21:06:ObjectDetectionNet.exe: Content root path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet
22:21:07:Object Detection (YOLOv5 .NET): Object Detection (YOLOv5 .NET) module started.
22:23:47:Preparing to install module 'ALPR'
22:23:47:Downloading module 'ALPR'
22:23:49:Installing module 'ALPR'
22:23:49:ALPR: Installing CodeProject.AI Analysis Module
22:23:49:ALPR: ========================================================================
22:23:49:ALPR: CodeProject.AI Installer
22:23:49:ALPR: ========================================================================
22:23:49:ALPR: General CodeProject.AI setup
22:23:49:ALPR: Creating Directories...Done
22:23:49:ALPR: GPU support
22:23:49:ALPR: CUDA Present...Yes (version 11.7)
22:23:49:ALPR: ROCm Present...False
22:23:50:ALPR: Installing module ALPR 2.7.2
22:23:50:ALPR: Installing Python 3.7
22:23:50:ALPR: Python 3.7 is already installed
22:23:56:ALPR: Creating Virtual Environment (Local)...Done
22:23:56:ALPR: Confirming we have Python 3.7 in our virtual environment...present
22:26:40:ALPR: Downloading ALPR models...Expanding...Done.
22:26:41:ALPR: Copying contents of paddleocr-models.zip to paddleocr...done
22:26:41:ALPR: Cleaning up...done
22:26:41:ALPR: Installing Python packages for ALPR
22:26:41:ALPR: [0;Installing GPU-enabled libraries: If available
22:26:42:ALPR: Ensuring Python package manager (pip) is installed...Done
22:26:51:ALPR: Ensuring Python package manager (pip) is up to date...Done
22:26:52:ALPR: Python packages specified by requirements.windows.cuda11_7.txt
22:28:09:ALPR: - Installing PaddlePaddle, Parallel Distributed Deep Learning...(✔️ checked) Done
22:29:22:ALPR: - Installing PaddleOCR, the OCR toolkit based on PaddlePaddle...(✔️ checked) Done
22:29:26:ALPR: - Installing imutils, the image utilities library...(✔️ checked) Done
22:29:27:ALPR: - Installing Pillow, a Python Image Library...Already installed
22:29:29:ALPR: - Installing OpenCV, the Computer Vision library for Python...Already installed
22:29:30:ALPR: - Installing NumPy, a package for scientific computing...Already installed
22:29:30:ALPR: Installing Python packages for the CodeProject.AI Server SDK
22:29:32:ALPR: Ensuring Python package manager (pip) is installed...Done
22:29:37:ALPR: Ensuring Python package manager (pip) is up to date...Done
22:29:37:ALPR: Python packages specified by requirements.txt
22:29:39:ALPR: - Installing Pillow, a Python Image Library...Already installed
22:29:40:ALPR: - Installing Charset normalizer...Already installed
22:29:41:ObjectDetectionYolo: Downloading Standard YOLO models...Expanding...Done.
22:29:41:ObjectDetectionYolo: Copying contents of models-yolo5-pt.zip to assets...done
22:29:41:ObjectDetectionYolo: Cleaning up...done
22:29:48:ALPR: - Installing aiohttp, the Async IO HTTP library...(✔️ checked) Done
22:29:52:ALPR: - Installing aiofiles, the Async IO Files library...(✔️ checked) Done
22:29:56:ALPR: - Installing py-cpuinfo to allow us to query CPU info...(✔️ checked) Done
22:29:58:ALPR: - Installing Requests, the HTTP library...Already installed
22:29:58:ALPR: Setup complete
22:29:58:Module ALPR installed successfully.
22:29:58:
22:29:58:Module 'License Plate Reader' 2.7.2 (ID: ALPR)
22:29:58:Module Path: C:\Program Files\CodeProject\AI\modules\ALPR
22:29:58:AutoStart: True
22:29:58:Queue: alpr_queue
22:29:58:Platforms: windows,linux,linux-arm64,macos,macos-arm64,!orangepi,!jetson
22:29:58:GPU Libraries: installed if available
22:29:58:GPU Enabled: enabled
22:29:58:Parallelism: 0
22:29:58:Accelerator:
22:29:58:Half Precis.: enable
22:29:58:Runtime: python3.7
22:29:58:Runtime Loc: Local
22:29:58:FilePath: ALPR_adapter.py
22:29:58:Pre installed: False
22:29:58:Start pause: 1 sec
22:29:58:LogVerbosity:
22:29:58:Valid: True
22:29:58:Environment Variables
22:29:58:AUTO_PLATE_ROTATE = True
22:29:58:MIN_COMPUTE_CAPABILITY = 7
22:29:58:MIN_CUDNN_VERSION = 7
22:29:58:OCR_OPTIMAL_CHARACTER_HEIGHT = 60
22:29:58:OCR_OPTIMAL_CHARACTER_WIDTH = 36
22:29:58:OCR_OPTIMIZATION = True
22:29:58:PLATE_CONFIDENCE = 0.7
22:29:58:PLATE_RESCALE_FACTOR = 2
22:29:58:PLATE_ROTATE_DEG = 0
22:29:58:
22:29:58:Started License Plate Reader module
22:29:58:Installer exited with code 0
22:29:58:ALPR_adapter.py: Traceback (most recent call last):
22:29:58:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 17, in
22:29:58:ALPR_adapter.py: from ALPR import init_detect_platenumber, detect_platenumber
22:29:58:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 19, in
22:29:58:ALPR_adapter.py: from paddleocr import PaddleOCR
22:29:58:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\paddleocr\__init__.py", line 14, in
22:29:58:ALPR_adapter.py: from .paddleocr import *
22:29:58:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python37\venv\lib\site-packages\paddleocr\paddleocr.py", line 21, in
22:29:58:ALPR_adapter.py: import paddle
22:29:58:ALPR_adapter.py: ModuleNotFoundError: No module named 'paddle'
22:29:59:Module ALPR has shutdown
22:29:59:ALPR_adapter.py: has exited
22:29:59:Module ALPR started successfully.
22:30:20:Module ObjectDetectionYolo installed successfully.
22:30:20:
22:30:20:Module 'Object Detection (YOLOv5 6.2)' 1.7.1 (ID: ObjectDetectionYolo)
22:30:20:Module Path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo
22:30:20:AutoStart: True
22:30:20:Queue: objectdetection_queue
22:30:20:Platforms: all
22:30:20:GPU Libraries: installed if available
22:30:20:GPU Enabled: enabled
22:30:20:Parallelism: 0
22:30:20:Accelerator:
22:30:20:Half Precis.: enable
22:30:20:Runtime: python3.7
22:30:20:Runtime Loc: Shared
22:30:20:FilePath: detect_adapter.py
22:30:20:Pre installed: False
22:30:20:Start pause: 1 sec
22:30:20:LogVerbosity:
22:30:20:Valid: True
22:30:20:Environment Variables
22:30:20:APPDIR = %CURRENT_MODULE_PATH%
22:30:20:CUSTOM_MODELS_DIR = %CURRENT_MODULE_PATH%/custom-models
22:30:20:MODELS_DIR = %CURRENT_MODULE_PATH%/assets
22:30:20:MODEL_SIZE = Medium
22:30:20:USE_CUDA = True
22:30:20:YOLOv5_AUTOINSTALL = false
22:30:20:YOLOv5_VERBOSE = false
22:30:20:
22:30:20:ObjectDetectionYolo: Downloading Custom YOLO models...
22:30:20:Started Object Detection (YOLOv5 6.2) module
22:30:20:Unable to install ObjectDetectionYolo: Timed out attempting to install Module 'ObjectDetectionYolo' (A task was canceled.)
22:30:20:detect_adapter.py: Traceback (most recent call last):
22:30:20:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo\detect_adapter.py", line 12, in
22:30:20:detect_adapter.py: from request_data import RequestData
22:30:20:detect_adapter.py: File "../../SDK/Python\request_data.py", line 7, in
22:30:20:detect_adapter.py: from PIL import Image
22:30:20:detect_adapter.py: ModuleNotFoundError: No module named 'PIL'
22:30:20:Module ObjectDetectionYolo has shutdown
22:30:20:detect_adapter.py: has exited
22:30:21:Module ObjectDetectionYolo started successfully.
23:27:49:Sending shutdown request to ObjectDetectionNet/ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Shutdown signal received. Ending loop
23:27:49:ObjectDetectionNet.exe: Shutdown signal received. Ending loop
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Shutdown signal received. Ending loop
23:27:49:ObjectDetectionNet.exe: Unable to get request from objectdetection_queue for ObjectDetectionNet
23:27:49:ObjectDetectionNet.exe: Shutdown signal received. Ending loop
23:27:49:ObjectDetectionNet.exe: Shutdown signal received. Ending loop
23:28:22:Forcing shutdown of ObjectDetectionNet/ObjectDetectionNet
23:28:22:Module ObjectDetectionNet has shutdown
23:28:22:ObjectDetectionNet.exe: has exited
23:28:22:
23:28:22:Module 'Object Detection (YOLOv5 .NET)' 1.7.1 (ID: ObjectDetectionNet)
23:28:22:Module Path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet
23:28:22:AutoStart: True
23:28:22:Queue: objectdetection_queue
23:28:22:Platforms: windows,linux,linux-arm64,macos,macos-arm64
23:28:22:GPU Libraries: installed if available
23:28:22:GPU Enabled: disabled
23:28:22:Parallelism: 0
23:28:22:Accelerator:
23:28:22:Half Precis.: enable
23:28:22:Runtime: execute
23:28:22:Runtime Loc: Shared
23:28:22:FilePath: ObjectDetectionNet.exe
23:28:22:Pre installed: False
23:28:22:Start pause: 1 sec
23:28:22:LogVerbosity:
23:28:22:Valid: True
23:28:22:Environment Variables
23:28:22:CUSTOM_MODELS_DIR = %CURRENT_MODULE_PATH%\custom-models
23:28:22:MODELS_DIR = %CURRENT_MODULE_PATH%\assets
23:28:22:MODEL_SIZE = MEDIUM
23:28:22:
23:28:22:Started Object Detection (YOLOv5 .NET) module
23:28:23:ObjectDetectionNet.exe: fail: CodeProject.AI.Modules.ObjectDetection.Yolo.ObjectDetector[0]
23:28:23:ObjectDetectionNet.exe: Unable to load the model at C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet\assets\yolov5m.onnx
23:28:23:ObjectDetectionNet.exe: Application started. Press Ctrl+C to shut down.
23:28:23:ObjectDetectionNet.exe: Hosting environment: Production
23:28:23:ObjectDetectionNet.exe: Content root path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet
23:28:24:Object Detection (YOLOv5 .NET): Object Detection (YOLOv5 .NET) module started.
01:39:13:ObjectDetectionNet.exe: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet\custom-models'.
01:39:13:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
01:39:13:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerator`1.Init()
01:39:13:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
01:39:13:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
01:39:13:ObjectDetectionNet.exe: at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
01:39:13:ObjectDetectionNet.exe: at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
01:39:13:Object Detection (YOLOv5 .NET): Command completed in 45 ms.
01:39:13:Object Detection (YOLOv5 .NET): Command completed in 45 ms.
01:41:02:ObjectDetectionNet.exe: at CodeProject.AI.Modules.ObjectDetection.Yolo.ObjectDetectionWorker.ProcessRequest(BackendRequest request)System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet\custom-models'.
01:41:02:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
01:41:02:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerator`1.Init()
01:41:02:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
01:41:02:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
01:41:02:ObjectDetectionNet.exe: at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
01:41:02:ObjectDetectionNet.exe: at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
01:41:02:Object Detection (YOLOv5 .NET): Command completed in 1 ms.
01:41:02:Object Detection (YOLOv5 .NET): Command completed in 0 ms.
01:41:15:ObjectDetectionNet.exe: at CodeProject.AI.Modules.ObjectDetection.Yolo.ObjectDetectionWorker.ProcessRequest(BackendRequest request)fail: CodeProject.AI.Modules.ObjectDetection.Yolo.ObjectDetector[0]
01:41:15:ObjectDetectionNet.exe: Unable to load the model at C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet\assets\yolov5m.onnx
01:41:15:Object Detection (YOLOv5 .NET): Command completed in 48 ms.
01:41:16:Object Detection (YOLOv5 .NET): Command completed in 0 ms.
01:41:17:Object Detection (YOLOv5 .NET): Command completed in 0 ms.
01:41:22:ObjectDetectionNet.exe: fail: CodeProject.AI.Modules.ObjectDetection.Yolo.ObjectDetector[0]
01:41:22:ObjectDetectionNet.exe: Unable to load the model at C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet\custom-models\ipcam-general.onnx
01:41:22:Object Detection (YOLOv5 .NET): Command completed in 1 ms.
01:41:23:Object Detection (YOLOv5 .NET): Command completed in 0 ms.
01:50:13:ObjectDetectionNet.exe: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet\custom-models'.
01:50:13:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
01:50:13:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerator`1.Init()
01:50:13:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
01:50:13:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
01:50:13:ObjectDetectionNet.exe: at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
01:50:13:ObjectDetectionNet.exe: at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
01:50:13:Object Detection (YOLOv5 .NET): Command completed in 0 ms.
01:50:13:Object Detection (YOLOv5 .NET): Command completed in 0 ms.
19:00:08:ObjectDetectionNet.exe: at CodeProject.AI.Modules.ObjectDetection.Yolo.ObjectDetectionWorker.ProcessRequest(BackendRequest request)System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet\custom-models'.
19:00:08:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
19:00:08:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerator`1.Init()
19:00:08:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
19:00:08:ObjectDetectionNet.exe: at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
19:00:08:ObjectDetectionNet.exe: at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
19:00:08:ObjectDetectionNet.exe: at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
19:00:08:Object Detection (YOLOv5 .NET): Command completed in 4 ms.
19:00:08:Object Detection (YOLOv5 .NET): Command completed in 4 ms.
Server version: 2.3.4-Beta
System: Windows
Operating System: Windows (Microsoft Windows 11 version 10.0.22621)
CPUs: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (Intel)
1 CPU x 6 cores. 12 logical processors (x64)
GPU: NVIDIA GeForce GTX 1060 (6 GiB) (NVIDIA)
Driver: 516.01 CUDA: 11.7.64 (max supported: 11.7) Compute: 6.1
System RAM: 32 GiB
Target: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
.NET framework: .NET 7.0.5
Video adapter info:
Intel(R) UHD Graphics 630:
Driver Version 31.0.101.2125
Video Processor Intel(R) UHD Graphics Family
NVIDIA GeForce GTX 1060:
Driver Version 31.0.15.1601
Video Processor NVIDIA GeForce GTX 1060
System GPU info:
GPU 3D Usage 1%
GPU RAM Usage 92 MiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|
It looks like you're having internet issues or have a slow internet. I can see timeouts and missing packages (eg PIL) in a number of places.
If you could get a more reliable / faster internet connection then that would help. If you can't (and I've been there!) you could dive in a force a manual install.
- Go to the module directory you want to install. They are all in C:\Program Files\CodeProject\AI\modules`.
- In a module you want to re-install (eg ObjectDetectionNet), open a terminal into the folder (
C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet ) and run ..\..\setup . This will force a re-install and should help avoid some of the timeout issues. If you see timeouts, you can try re-running the install - Repeat for the other modules.
cheers
Chris Maunder
|
|
|
|
|
Please add `curl` in the base docker container as it is needed by the install script for the coral module.
It tries to install on container rebuild but fails.
Also if the script fails it should not switch to CPU mode (as it is too slow). At the moment I count the python processes to know if the coral is working
|
|
|
|
|
so adding `apt update` in /ap/setup.sh should solve the issue
# ============================================================================
# House keeping
apt update
if [ "$os" == "linux" ]; then
checkForTool curl
checkForTool bc
fi
checkForTool wget
checkForTool unzip
writeLine ""
|
|
|
|
|
Latest version has this in checkForTool
sudo apt update -y & sudo apt install ${name} -y > /dev/null
cheers
Chris Maunder
|
|
|
|
|
curl is already being added in the docker containers.
The Coral module doesn't switch to CPU mode. It simply installs things. The Coral module will choose the hardware based on what's working. If the TPU init fails it'll fall back. If you get the Coral TPU working again then the module will, once an hour, refresh the interpreter and go back to the TPU if possible
cheers
Chris Maunder
|
|
|
|
|
I've been runnning the tag for gpu on my unraid server.
Do we know if the latest version of the standard cpai server docker works for gpu on unraid yet?
The app from the unraid server.
Docker[^]
|
|
|
|
|
It's not CodeProject.AI Server that uses the GPU, it's the individual modules. We don't support unraid directly so I can't debug unraid issues, but if you let me know which modules you're using that aren't using GPU then I may be able to help with those
cheers
Chris Maunder
|
|
|
|
|
I installed the standard version (latest image) to see and it is working fine with the gpu passthrough now. Disabled the other app with tag (gpu version) from unraid.
Thanks!
|
|
|
|
|
For the help of others, which docker image are you running?
I should have been clearer in my previous answer: the server doesn't care about GPU, the modules do, BUT the docker CUDA (nee GPU) images include the CUDA libraries that allow the modules to make use of the GPU. You should be using the docker image that best matches the version of CUDA you are using.
My understanding is that as long as your host's NVIDIA drivers can support the CUDA version you run, then all is good. This means if you host OS drivers can handle CUDA 12.2 then a CUDA 11.7 docker image is fine. But if your host can only support CUDA 11.7 then a 12.2 docker image will have issues.
cheers
Chris Maunder
|
|
|
|
|
I can not get the AI working at all, the coral is detected as a GPU (TPU) and after a few minutes, it will switch to CPU and stop detecting any person. I followed the Coral instructions on installing the drivers and installed the Coral module. I even contacted Ken of Blue Iris, but he could not help, I'm hoping someone here can help.
|
|
|
|
|
Thanks very much for the report. Can you please share your System Info tab from the CodeProject.AI Server dashboard? Also, if possible, could you show the Coral install logs, and any logs containing errros? Also curious if you're able to detect objects from the just the CodeProject.AI Server Explorer.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Server version: 2.3.4-Beta
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (Intel)
1 CPU x 6 cores. 12 logical processors (x64)
GPU: Intel(R) UHD Graphics 630 (1,024 MiB) (Intel Corporation)
Driver: 31.0.101.2115
System RAM: 16 GiB
Target: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
.NET framework: .NET 7.0.10
Video adapter info:
Intel(R) UHD Graphics 630:
Driver Version 31.0.101.2115
Video Processor Intel(R) UHD Graphics Family
System GPU info:
GPU 3D Usage 2%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|