|
IF YOU ARE HAVING A PROBLEM
- Take a look at the logs in
C:\Program Files\CodeProject\AI\logs and see if there's anything in there that screams 'something broke'.
- Check the FAQs in the CodeProject.AI Server documentation
- Make sure you've tested the server using the Explorer (blue link, top middle of the dashboard) to ensure it's a server issue rather than something else such as Blue Iris or another app using CodeProject.AI server.
- If there's no obvious answer, then copy and paste into a message the contents of the System Info tab, describe what you are doing, and what you see, and what you would expect.
Always include a copy and paste from the System Info tab of the dashboard. It gives us a ton of info on your setup. If an individual module is failing, click the 'Info' button to the right of the module's name in the status list and copy and paste that info too.
How to reinstall a module
Option 1. Go to the install modules tab on the dashboard and try re-installing the package. Make sure you have enough disk space and a reliable internet connection.
Option 2: (Option 1 with a vengeance): If that fails, head to the module's folder ([app root]\modules\module-id), open a terminal in admin mode, and run ..\..\setup . This will force a manual reinstall using the install script.
Docker: In Docker you will need to open a terminal into the docker container. You can do this using Docker Desktop, or Visual Studio Code with the Docker remote extension, or on the command using using docker attach . Then do a cd /app/modules/module-id where module-id is the id of the module you need to resinstall. Next, run sudo bash ../../setup.sh --verbosity info to force a manual reinstall of that module. (Set verbosity as quiet, info or loud to get less or more info)
cheers
Chris Maunder
modified 18-Feb-24 15:48pm.
|
|
|
|
|
If you are a Blue Iris user and you are using custom models, then you would notice that the option, in Blue Iris, to set the custom model location is greyed out. This is because Blue Iris does not currently make changes to CodeProject.AI Server's settings. It can be done by manually starting CodeProject.AI with command line parameters (not a great solution), or editing the module settings files (a little messy), or setting system-wide environment variables (way easier). For version 1.6 we added an API to allow any app to change our settings programmatically, and we take care of stopping/restarting things and persisting the changes.
So: Blue Iris doesn't currently change CodeProject.AI Server's settings, so it doesn't provide you a way to change the custom model folder location from within Blue Iris.
Blue Iris will still use the contents of this folder to determine the calls it makes. If you don't specify a model to use in the Custom Models textbox, then Blue Iris will use all models in the custom models folder that it knows about.
Here we've specified a specific model to use. The Blue Iris help file explains more about how this works, including inclusive and exclusive filters on the models it finds.
CodeProject.AI Server doesn't know about Blue Iris' folder, so it can't tell what models it may be expected to use, nor can it tell Blue Iris about what models CodeProject.AI server has available. Our API allows Blue Iris to get a list of the AI models installed with CodeProject.AI Server, and also to set the folder where these models reside. But Blue Iris doesn't, yet, use that API.
So we do a hack.
At install time we sniff the registry to find where Blue Iris thinks the custom models should be. We then make empty copies of the models that we have, and copy them into that folder. If the folder doesn't exist (eg you were using C:\Program Files\CodeProject\AI\AnalysisLayer\CustomObjectDetection\assets , which no longer exists) then we create that folder, and then copy over the empty files.
When Blue Iris looks in that folder to decide what custom calls it can make, it sees the models, notes their names, and uses those names in the calls. CodeProject.AI Server has those models, so when the calls come through we can process them.
Blue Iris doesn't use the models. It uses the list of model names.
If you have your own models in the Blue Iris folder
You will need to copy them to the CodeProject.AI server's custom model folder (by default this is C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\custom-models )
If you've modified the registry and have your own custom models
If you were using a folder in C:\Program Files\CodeProject\AI\AnalysisLayer\CustomObjectDetection\ (which no longer existed after the upgrade, but was recreated by our hack) you'll need to re-copy your custom model into that folder.
The simplest solutions are:
- Modify the registry (Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Perspective Software\Blue Iris\Options\AI, key 'deepstack_custompath') so Blue Iris looks in
C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\custom-models for custom models, and copy your models into there.
or
- Modify
C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\modulesettings.json file and set CUSTOM_MODELS_DIR to be whatever Blue Iris thinks the custom model folder is.
cheers
Chris Maunder
|
|
|
|
|
I have been using CodeProject AI 2.5.4 (I haven't update it yet) and it has been running YOLOv5 6.2 (1.9.1) and ALPR (3.0.2) on a 24/7 basis. The number of detections is over 100,000. However, every once in a while, I will get the CPAI error. I checked the log and it says:
24:19:21:Object Detection (YOLOv5 6.2): [RuntimeError] : Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2\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 74, in forward
xy = (xy * 2 + self.grid[i]) * self.stride[i] # xy
RuntimeError: The size of tensor a (60) must match the size of tensor b (32) at non-singleton dimension 2
I think this error is a bit deeper than something I can handle myself, so I wanted to see if anyone has any idea on how to solve this?
Update:
I just found out that YOLOv8 also supports ALPR and moved over to YOVOv8. We will see if YOLOv8 also gives me the same error or not.
modified 1hr ago.
|
|
|
|
|
I'm trying to get YOLOv5 6.2 to install on a clean install of CPAI 2.5.6.
After initial installation both Face Processing and Object Detection (YOLOv5 6.2) failed to start, giving the error "ModuleNotFoundError: No module named 'aiohttp' ".
I don't use Face processing, so I disabled it, but need to get Object Detection working.
Chris recommended uninstalling and reinstalling Object Detection in a post about the aiohttp module not found error. In another post it was mentioned to uninstall and then reinstall with download cache disabled.
I think I've now done 4 uninstall/reinstalls of ObjectDetectionYOLOv5-6.2 (which on my slow internet connection takes 20+ minutes) both with and without download cache enabled.
I even tried shutting down the service and deleting the C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2 directory before trying the install with download cache disabled.
Each time the install gets part way through the process, throws the timeout error, but eventually comes back and says that "Module ObjectDetectionYOLOv5-6.2 installed successfully."
Unfortunately, when it tries to start Object Detection it still throws the ModuleNotFoundError, and detect_adapter.py exits.
Here is my log after the latest attempt:
13:53:22:System: Windows
13:53:22:Operating System: Windows (Microsoft Windows 11 version 10.0.22631)
13:53:22:CPUs: 13th Gen Intel(R) Core(TM) i7-13700K (Intel)
13:53:22: 1 CPU x 16 cores. 24 logical processors (x64)
13:53:22:GPU (Primary): NVIDIA GeForce RTX 4070 (12 GiB) (NVIDIA)
13:53:22: Driver: 546.12, CUDA: 12.3 (up to: 12.3), Compute: 8.9, cuDNN: 8.9
13:53:22:System RAM: 32 GiB
13:53:22:Platform: Windows
13:53:22:BuildConfig: Release
13:53:22:Execution Env: Native
13:53:22:Runtime Env: Production
13:53:22:Runtimes installed:
13:53:22: .NET runtime: 8.0.0
13:53:22: .NET SDK: 8.0.100
13:53:22: Default Python: Not found
13:53:22: Go: Not found
13:53:22: NodeJS: Not found
13:53:22:App DataDir: C:\ProgramData\CodeProject\AI
13:53:22:Video adapter info:
13:53:22: NVIDIA GeForce RTX 4070:
13:53:22: Driver Version 31.0.15.4612
13:53:22: Video Processor NVIDIA GeForce RTX 4070
13:53:22:STARTING CODEPROJECT.AI SERVER
13:53:22:RUNTIMES_PATH = C:\Program Files\CodeProject\AI\runtimes
13:53:22:PREINSTALLED_MODULES_PATH = C:\Program Files\CodeProject\AI\preinstalled-modules
13:53:22:MODULES_PATH = C:\Program Files\CodeProject\AI\modules
13:53:22:PYTHON_PATH = \bin\windows\%PYTHON_NAME%\venv\Scripts\python
13:53:22:Data Dir = C:\ProgramData\CodeProject\AI
13:53:22:Server version: 2.5.6
13:53:25:
13:53:25:Module 'License Plate Reader' 3.0.2 (ID: ALPR)
13:53:25:Valid: True
13:53:25:Module Path: <root>\modules\ALPR
13:53:25:AutoStart: True
13:53:25:Queue: alpr_queue
13:53:25:Runtime: python3.9
13:53:25:Runtime Loc: Local
13:53:25:FilePath: ALPR_adapter.py
13:53:25:Pre installed: False
13:53:25:Start pause: 3 sec
13:53:25:Parallelism: 0
13:53:25:LogVerbosity:
13:53:25:Platforms: all
13:53:25:GPU Libraries: installed if available
13:53:25:GPU Enabled: enabled
13:53:25:Accelerator:
13:53:25:Half Precis.: enable
13:53:25:Environment Variables
13:53:25:AUTO_PLATE_ROTATE = True
13:53:25:MIN_COMPUTE_CAPABILITY = 6
13:53:25:MIN_CUDNN_VERSION = 7
13:53:25:OCR_OPTIMAL_CHARACTER_HEIGHT = 60
13:53:25:OCR_OPTIMAL_CHARACTER_WIDTH = 30
13:53:25:OCR_OPTIMIZATION = True
13:53:25:PLATE_CONFIDENCE = 0.7
13:53:25:PLATE_RESCALE_FACTOR = 2
13:53:25:PLATE_ROTATE_DEG = 0
13:53:25:
13:53:25:Started License Plate Reader module
13:53:28:Server: This is the latest version
13:53:59:Preparing to install module 'ObjectDetectionYOLOv5-6.2'
13:53:59:Downloading module 'ObjectDetectionYOLOv5-6.2'
13:53:59:Installing module 'ObjectDetectionYOLOv5-6.2'
13:54:00:ObjectDetectionYOLOv5-6.2: Installing CodeProject.AI Analysis Module
13:54:00:ObjectDetectionYOLOv5-6.2: ======================================================================
13:54:00:ObjectDetectionYOLOv5-6.2: CodeProject.AI Installer
13:54:00:ObjectDetectionYOLOv5-6.2: ======================================================================
13:54:00:ObjectDetectionYOLOv5-6.2: 1582.6Gb of 1906Gb available on
13:54:00:ObjectDetectionYOLOv5-6.2: os, arch = windows x86_64
13:54:00:ObjectDetectionYOLOv5-6.2: systemName, platform = Windows, windows
13:54:00:ObjectDetectionYOLOv5-6.2: setupMode = InstallModule
13:54:00:ObjectDetectionYOLOv5-6.2: executionEnvironment = Production
13:54:00:ObjectDetectionYOLOv5-6.2: rootDirPath = C:\Program Files\CodeProject\AI
13:54:00:ObjectDetectionYOLOv5-6.2: appRootDirPath = C:\Program Files\CodeProject\AI\
13:54:00:ObjectDetectionYOLOv5-6.2: setupScriptDirPath = C:\Program Files\CodeProject\AI\
13:54:00:ObjectDetectionYOLOv5-6.2: sdkScriptsDirPath = C:\Program Files\CodeProject\AI\SDK\Scripts
13:54:00:ObjectDetectionYOLOv5-6.2: runtimesDirPath = C:\Program Files\CodeProject\AI\runtimes
13:54:00:ObjectDetectionYOLOv5-6.2: modulesDirPath = C:\Program Files\CodeProject\AI\modules
13:54:00:ObjectDetectionYOLOv5-6.2: downloadDirPath = C:\Program Files\CodeProject\AI\downloads
13:54:00:ObjectDetectionYOLOv5-6.2: General CodeProject.AI setup
13:54:00:ObjectDetectionYOLOv5-6.2: Creating Directories...Done
13:54:00:ObjectDetectionYOLOv5-6.2: GPU support
13:54:00:ObjectDetectionYOLOv5-6.2: CUDA Present...Yes (CUDA 12.3, cuDNN 8.9)
13:54:00:ObjectDetectionYOLOv5-6.2: ROCm Present...No
13:54:00:ObjectDetectionYOLOv5-6.2: Reading ObjectDetectionYOLOv5-6.2 settingsUsed modulesettings.json to get value Object Detection (YOLOv5 6.2)
13:54:01:ObjectDetectionYOLOv5-6.2: .Used modulesettings.json to get value 1.9.1
13:54:01:ObjectDetectionYOLOv5-6.2: .Used modulesettings.windows.json to get value python3.7
13:54:01:ObjectDetectionYOLOv5-6.2: .Used modulesettings.json to get value Shared
13:54:01:ObjectDetectionYOLOv5-6.2: .Used modulesettings.json to get value detect_adapter.py
13:54:01:ObjectDetectionYOLOv5-6.2: .Used modulesettings.json to get value true
13:54:01:ObjectDetectionYOLOv5-6.2: .Used modulesettings.json to get value ["all","raspberrypi","jetson"]
13:54:01:ObjectDetectionYOLOv5-6.2: .Done
13:54:01:ObjectDetectionYOLOv5-6.2: Installing module Object Detection (YOLOv5 6.2) 1.9.1
13:54:01:ObjectDetectionYOLOv5-6.2: Variable Dump
13:54:01:ObjectDetectionYOLOv5-6.2: moduleName = Object Detection (YOLOv5 6.2)
13:54:01:ObjectDetectionYOLOv5-6.2: moduleVersion = 1.9.1
13:54:02:ObjectDetectionYOLOv5-6.2: runtime = python3.7
13:54:02:ObjectDetectionYOLOv5-6.2: runtimeLocation = Shared
13:54:02:ObjectDetectionYOLOv5-6.2: installGPU = true
13:54:02:ObjectDetectionYOLOv5-6.2: pythonVersion = 3.7
13:54:02:ObjectDetectionYOLOv5-6.2: virtualEnvDirPath = C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv
13:54:02:ObjectDetectionYOLOv5-6.2: venvPythonCmdPath = C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Scripts\python.exe
13:54:02:ObjectDetectionYOLOv5-6.2: packagesDirPath = C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Lib\site-packages
13:54:02:ObjectDetectionYOLOv5-6.2: moduleStartFilePath = detect_adapter.py
13:54:02:ObjectDetectionYOLOv5-6.2: Installing Python 3.7
13:54:02:ObjectDetectionYOLOv5-6.2: Installing python37 in C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37
13:54:02:ObjectDetectionYOLOv5-6.2: Python 3.7 is already installed
13:54:02:ObjectDetectionYOLOv5-6.2: Creating Virtual Environment (Shared)...Virtual Environment already present
13:54:02:ObjectDetectionYOLOv5-6.2: Confirming we have Python 3.7 in our virtual environment...present
13:54:02:ObjectDetectionYOLOv5-6.2: Downloading models-yolo5-pt.zip to C:\Program Files\CodeProject\AI\downloads\ObjectDetectionYOLOv5-6.2\assets
13:54:02:ObjectDetectionYOLOv5-6.2: Downloading Standard YOLO models...Checking 'C:\Program Files\CodeProject\AI\downloads\ObjectDetectionYOLOv5-6.2\models-yolo5-pt.zip'
13:54:02:ObjectDetectionYOLOv5-6.2: already exists...Expanding...Heading to C:\Program Files\CodeProject\AI\downloads\ObjectDetectionYOLOv5-6.2
13:54:02:ObjectDetectionYOLOv5-6.2: Extracting models-yolo5-pt.zip
13:54:02:ObjectDetectionYOLOv5-6.2: Done.
13:54:03:ObjectDetectionYOLOv5-6.2: Copying contents of models-yolo5-pt.zip to assets...done
13:54:03:ObjectDetectionYOLOv5-6.2: Downloading custom-models-yolo5-pt.zip to C:\Program Files\CodeProject\AI\downloads\ObjectDetectionYOLOv5-6.2\custom-models
13:54:03:ObjectDetectionYOLOv5-6.2: Downloading Custom YOLO models...Checking 'C:\Program Files\CodeProject\AI\downloads\ObjectDetectionYOLOv5-6.2\custom-models-yolo5-pt.zip'
13:54:03:ObjectDetectionYOLOv5-6.2: already exists...Expanding...Heading to C:\Program Files\CodeProject\AI\downloads\ObjectDetectionYOLOv5-6.2
13:54:03:ObjectDetectionYOLOv5-6.2: Extracting custom-models-yolo5-pt.zip
13:54:04:ObjectDetectionYOLOv5-6.2: Done.
13:54:04:ObjectDetectionYOLOv5-6.2: Copying contents of custom-models-yolo5-pt.zip to custom-models...done
13:54:04:ObjectDetectionYOLOv5-6.2: Installing Python packages for Object Detection (YOLOv5 6.2)
13:54:04:ObjectDetectionYOLOv5-6.2: [0;Installing GPU-enabled libraries: If available
13:54:05:ObjectDetectionYOLOv5-6.2: Ensuring Python package manager (pip) is installed...Looking in links: c:\Windows\TEMP\tmpnayfpu86
13:54:05:ObjectDetectionYOLOv5-6.2: Requirement already satisfied: setuptools in c:\program files\codeproject\ai\runtimes\bin\windows\python37\venv\lib\site-packages (68.0.0)
13:54:05:ObjectDetectionYOLOv5-6.2: Requirement already satisfied: pip in c:\program files\codeproject\ai\runtimes\bin\windows\python37\venv\lib\site-packages (24.0)
13:54:05:ObjectDetectionYOLOv5-6.2: Done
13:54:07:ObjectDetectionYOLOv5-6.2: Ensuring Python package manager (pip) is up to date...Done
13:54:07:ObjectDetectionYOLOv5-6.2: Requirements Search Path is C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2
13:54:07:ObjectDetectionYOLOv5-6.2: Searching for a suitable requirements.txts file in C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2
13:54:07:ObjectDetectionYOLOv5-6.2: CUDA version is 12.3 (12_3 / 12)
13:54:07:ObjectDetectionYOLOv5-6.2: Python packages specified by requirements.windows.cuda.txt
13:54:07:ObjectDetectionYOLOv5-6.2: Choosing Python packages from C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2\requirements.windows.cuda.txt
13:54:08:ObjectDetectionYOLOv5-6.2: - Installing Pandas, a data analysis / data manipulation tool...Already installed
13:54:09:ObjectDetectionYOLOv5-6.2: - Installing CoreMLTools, for working with .mlmodel format models...Already installed
13:54:09:ObjectDetectionYOLOv5-6.2: - Installing OpenCV, the Open source Computer Vision library...Already installed
13:54:10:ObjectDetectionYOLOv5-6.2: - Installing Pillow, a Python Image Library...Already installed
13:54:11:ObjectDetectionYOLOv5-6.2: - Installing SciPy, a library for mathematics, science, and engineering...Already installed
13:54:11:ObjectDetectionYOLOv5-6.2: - Installing PyYAML, a library for reading configuration files...Already installed
13:54:29:Response timeout. Try increasing the timeout value
14:14:00:Module ObjectDetectionYOLOv5-6.2 installed successfully.
14:14:00:
14:14:00:Module 'Object Detection (YOLOv5 6.2)' 1.9.1 (ID: ObjectDetectionYOLOv5-6.2)
14:14:00:Valid: True
14:14:00:Module Path: <root>\modules\ObjectDetectionYOLOv5-6.2
14:14:00:AutoStart: True
14:14:00:Queue: objectdetection_queue
14:14:00:Runtime: python3.7
14:14:00:Runtime Loc: Shared
14:14:00:FilePath: detect_adapter.py
14:14:00:Pre installed: False
14:14:00:Start pause: 1 sec
14:14:00:Parallelism: 0
14:14:00:LogVerbosity:
14:14:00:Platforms: all,!raspberrypi,!jetson
14:14:00:GPU Libraries: installed if available
14:14:00:GPU Enabled: enabled
14:14:00:ObjectDetectionYOLOv5-6.2: - Installing PyTorch, an open source machine learning framework...
14:14:00:Accelerator:
14:14:00:Half Precis.: enable
14:14:00:Environment Variables
14:14:00:APPDIR = <root>\modules\ObjectDetectionYOLOv5-6.2
14:14:00:CUSTOM_MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-6.2\custom-models
14:14:00:MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-6.2\assets
14:14:00:MODEL_SIZE = Medium
14:14:00:USE_CUDA = True
14:14:00:YOLOv5_AUTOINSTALL = false
14:14:00:YOLOv5_VERBOSE = false
14:14:00:
14:14:00:Started Object Detection (YOLOv5 6.2) module
14:14:00:Timed out attempting to install Module 'ObjectDetectionYOLOv5-6.2' (A task was canceled.)
14:14:00:detect_adapter.py: Traceback (most recent call last):
14:14:00:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2\detect_adapter.py", line 13, in
14:14:00:detect_adapter.py: from module_runner import ModuleRunner
14:14:00:detect_adapter.py: File "../../SDK/Python\module_runner.py", line 30, in
14:14:00:detect_adapter.py: import aiohttp
14:14:00:detect_adapter.py: ModuleNotFoundError: No module named 'aiohttp'
14:14:00:Module ObjectDetectionYOLOv5-6.2 has shutdown
14:14:00:detect_adapter.py: has exited
14:14:01:Module ObjectDetectionYOLOv5-6.2 started successfully.
modified 21hrs ago.
|
|
|
|
|
What worked for me with python packages not downloading was to change this following setting in /AI/setup.bat from false to true
REM Whether or not to install all python packages in one step (-r requirements.txt)
REM or step by step. Doing this allows the PIP manager to handle incompatibilities
REM better.
REM ** WARNING ** There is a big tradeoff on keeping the users informed and speed/
REM reliability. Generally one-step shouldn't be needed. But it often is. And it
REM often doesn't actually solve problems either. Overall it's safer, but not a
REM panacea
set oneStepPIP=true
and then manually run ../../setup on that module.
YMMV
|
|
|
|
|
|
Hello,
is it possible to reduce the log spam?
Everytime when i open the frontend i need to wait until the whole log is parsed.
Maybe insert the function to change the logging level permanently?
|
|
|
|
|
Using latest CPAI (2.5.6) with latest Coral module. Fresh install, every other module except Coral turned off. Blue Iris has face detection turned off.
I'm getting error 500 after almost every trigger from Blue Iris (latest stable).
Not using any custom models or anything. Literally a fresh install of CPAI from Docker on Linux, using Coral. (So default model: MobileNet SSD, default option: Multi-TPU).
modified 5 days ago.
|
|
|
|
|
|
Hi,
Tried updating yolov8 to v1.4.0 and got this error:
Unable to download module 'ObjectDetectionYOLOv8' from https:
That URL doesn't seem valid; any ideas? It uninstalled the previous version and I'm now stuck.
Thanks
modified 5 days ago.
|
|
|
|
|
I'm getting this error:
Error in Update ObjectDetectionYOLOv8: API server is offline (NetworkError when attempting to fetch resource.)
Also, no indication that an update was happening.
15:06:30:Server version: 2.5.6
15:06:35:Server: This is the latest version
15:06:51:Preparing to install module 'ObjectDetectionYOLOv8'
15:06:51:Downloading module 'ObjectDetectionYOLOv8'
15:06:51:Unable to download module 'ObjectDetectionYOLOv8' from https:
Now it's broken. No option to re-install
EDIT - Wait F5 to the rescue but have to re-install
EDIT 2 Nope, still broken
There also appears to be no way to revert to an older version. After trying to re-install YOLO V8 it just shows "Unknown"
modified 12-Mar-24 18:48pm.
|
|
|
|
|
Thanks very much for the report. We're looking into it.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Please try uninstalling and reinstalling the module, with "Do not use download cache" turned on.
Thanks,
Sean Ewington
CodeProject
modified 5 days ago.
|
|
|
|
|
It's working for me now, although I had to reboot to get is to start detecting.
|
|
|
|
|
Nvidia 1050Ti (best I can do on my motherboard)
Hi,
In the hope it might fix my problem below, Is there a way to remove cuda 12.4.
I assume it was installed with Nvidia drivers. There is no mention in Windows Add/Remove. JUST 11.7 (& before 11.8), I had installed a variety in the past, removed 11.8 for the moment ..
ALPR GPU CUDA is started but does not detect anything, CPU mode does.
Now a few months after several days of trying to get CUDA enabled for ALPR, I gave up, CPU (only) worked but too slow.
New CPAI 2.5.6 thought have another go.
Only ever had CPU option before.
Object detection worked before & still OK in GPU, Cuda mode
ALPR CPU did work OK but was far too slow for what I wanted.
Back then tried dozens of combinations 11.7, 11.8, 12, CPAI versions, installs using all the procedures as described.
NOW, enabled but does not recognise any plates, No predictions returned using explorer & also in Blue Iris.
If I disable GPU mode & back to running in CPU it does find the plate OK.
08:21:32:System: Windows
08:21:32:Operating System: Windows (Microsoft Windows 10.0.19045)
08:21:32:CPUs: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (Intel)
08:21:32: 1 CPU x 4 cores. 8 logical processors (x64)
08:21:32:GPU (Primary): NVIDIA GeForce GTX 1050 Ti (4 GiB) (NVIDIA)
08:21:32: Driver: 551.76, CUDA: 12.4 (up to: 12.4), Compute: 6.1, cuDNN: 8.9
08:21:32:System RAM: 16 GiB
08:21:32:Platform: Windows
08:21:32:BuildConfig: Release
08:21:32:Execution Env: Native
08:21:32:Runtime Env: Production
08:21:32:Runtimes installed:
08:21:32: .NET runtime: 7.0.10
08:21:32: .NET SDK: Not found
08:21:32: Default Python: 3.9.7
08:21:32: Go: Not found
08:21:32: NodeJS: Not found
08:21:32:App DataDir: C:\ProgramData\CodeProject\AI
08:21:32:Video adapter info:
08:21:32: NVIDIA GeForce GTX 1050 Ti:
08:21:32: Driver Version 31.0.15.5176
08:21:32: Video Processor NVIDIA GeForce GTX 1050 Ti
08:21:32: Intel(R) HD Graphics 4600:
08:21:32: Driver Version 20.19.15.5126
08:21:32: Video Processor Intel(R) HD Graphics Family
08:21:32:STARTING CODEPROJECT.AI SERVER
08:21:32:RUNTIMES_PATH = C:\Program Files\CodeProject\AI\runtimes
08:21:32:PREINSTALLED_MODULES_PATH = C:\Program Files\CodeProject\AI\preinstalled-modules
08:21:32:MODULES_PATH = C:\Program Files\CodeProject\AI\modules
08:21:32:PYTHON_PATH = \bin\windows\%PYTHON_NAME%\venv\Scripts\python
08:21:32:Data Dir = C:\ProgramData\CodeProject\AI
08:21:32:Server version: 2.5.6
08:21:36:
08:21:36:Attempting to start ALPR with C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\Scripts\python "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py"
08:21:36:
08:21:36:Module 'License Plate Reader' 3.0.2 (ID: ALPR)
08:21:36:Valid: True
08:21:36:Module Path: <root>\modules\ALPR
08:21:36:AutoStart: True
08:21:36:Queue: alpr_queue
08:21:36:Runtime: python3.9
08:21:36:Runtime Loc: Local
08:21:36:FilePath: ALPR_adapter.py
08:21:36:Pre installed: False
08:21:36:Start pause: 3 sec
08:21:36:Parallelism: 0
08:21:36:LogVerbosity:
08:21:36:Platforms: all
08:21:36:GPU Libraries: installed if available
08:21:36:GPU Enabled: enabled
08:21:36:Accelerator:
08:21:36:Half Precis.: enable
08:21:36:Environment Variables
08:21:36:AUTO_PLATE_ROTATE = false
08:21:36:MIN_COMPUTE_CAPABILITY = 6
08:21:36:MIN_CUDNN_VERSION = 7
08:21:36:OCR_OPTIMAL_CHARACTER_HEIGHT = 60
08:21:36:OCR_OPTIMAL_CHARACTER_WIDTH = 30
08:21:36:OCR_OPTIMIZATION = True
08:21:36:PLATE_CONFIDENCE = 0.50
08:21:36:PLATE_RESCALE_FACTOR = 2
08:21:36:PLATE_ROTATE_DEG = 0
08:21:36:
08:21:36:Started License Plate Reader module
08:21:38:Current Version is 2.5.6
08:21:38:Server: This is the latest version
08:21:39:
08:21:39:Attempting to start ObjectDetectionYOLOv5-6.2 with C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Scripts\python "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2\detect_adapter.py"
08:21:39:
08:21:39:Module 'Object Detection (YOLOv5 6.2)' 1.9.1 (ID: ObjectDetectionYOLOv5-6.2)
08:21:39:Valid: True
08:21:39:Module Path: <root>\modules\ObjectDetectionYOLOv5-6.2
08:21:39:AutoStart: True
08:21:39:Queue: objectdetection_queue
08:21:39:Runtime: python3.7
08:21:39:Runtime Loc: Shared
08:21:39:FilePath: detect_adapter.py
08:21:39:Pre installed: False
08:21:39:Start pause: 1 sec
08:21:39:Parallelism: 0
08:21:39:LogVerbosity:
08:21:39:Platforms: all,!raspberrypi,!jetson
08:21:39:GPU Libraries: installed if available
08:21:39:GPU Enabled: enabled
08:21:39:Accelerator:
08:21:39:Half Precis.: enable
08:21:39:Environment Variables
08:21:39:APPDIR = <root>\modules\ObjectDetectionYOLOv5-6.2
08:21:39:CPAI_MODULE_ENABLE_GPU = True
08:21:39:CUSTOM_MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-6.2\custom-models
08:21:39:MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-6.2\assets
08:21:39:MODEL_SIZE = Medium
08:21:39:USE_CUDA = True
08:21:39:YOLOv5_AUTOINSTALL = false
08:21:39:YOLOv5_VERBOSE = false
08:21:39:
08:21:39:Started Object Detection (YOLOv5 6.2) module
08:21:50:Sending shutdown request to python/ObjectDetectionYOLOv5-6.2
08:22:01:detect_adapter.py: APPDIR: C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2
08:22:01:detect_adapter.py: MODEL_SIZE: medium
08:22:01:detect_adapter.py: MODELS_DIR: C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2\assets
08:22:01:Object Detection (YOLOv5 6.2): Retrieved objectdetection_queue command 'Quit'
08:22:16:detect_adapter.py: Object Detection (YOLOv5 6.2) started.
08:22:17:Module ObjectDetectionYOLOv5-6.2 has shutdown
08:22:17:detect_adapter.py: has exited
08:22:23:ObjectDetectionYOLOv5-6.2 went quietly
08:22:23:
08:22:23:Attempting to start ObjectDetectionYOLOv5-6.2 with C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Scripts\python "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2\detect_adapter.py"
08:22:23:
08:22:23:Module 'Object Detection (YOLOv5 6.2)' 1.9.1 (ID: ObjectDetectionYOLOv5-6.2)
08:22:23:Valid: True
08:22:23:Module Path: <root>\modules\ObjectDetectionYOLOv5-6.2
08:22:23:AutoStart: True
08:22:23:Queue: objectdetection_queue
08:22:23:Runtime: python3.7
08:22:23:Runtime Loc: Shared
08:22:23:FilePath: detect_adapter.py
08:22:23:Pre installed: False
08:22:23:Start pause: 1 sec
08:22:23:Parallelism: 0
08:22:23:LogVerbosity:
08:22:23:Platforms: all,!raspberrypi,!jetson
08:22:23:GPU Libraries: installed if available
08:22:23:GPU Enabled: enabled
08:22:23:Accelerator:
08:22:23:Half Precis.: enable
08:22:23:Environment Variables
08:22:23:APPDIR = <root>\modules\ObjectDetectionYOLOv5-6.2
08:22:23:CPAI_MODULE_ENABLE_GPU = True
08:22:23:CUSTOM_MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-6.2\custom-models
08:22:23:MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-6.2\assets
08:22:23:MODEL_SIZE = Medium
08:22:23:USE_CUDA = True
08:22:23:YOLOv5_AUTOINSTALL = false
08:22:23:YOLOv5_VERBOSE = false
08:22:23:
08:22:23:Started Object Detection (YOLOv5 6.2) module
08:22:39:detect_adapter.py: APPDIR: C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2
08:22:39:detect_adapter.py: MODEL_SIZE: medium
08:22:39:detect_adapter.py: MODELS_DIR: C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2\assets
modified 5 days ago.
|
|
|
|
|
This user had the same issue as you and I think it may be worth going through their thread (though they're on a different system).
CodeProject.AI Server: AI the easy way.[^]
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
SOLVED. Windows 10
I cannot really advise what fixed this but just to advise of things I tried & there were dozens & dozens of variations, reboots etc etc. I had tried even more a while ago but was on an older CPAI. Now latest 2.5.6, not sure relevant or just finally hit the right pattern. Below might not be 100% as was rather bashing about in desperation. Once is did show Cuda enabled but did not read a plate, later crashed on other fiddling.
I have Licence plate working 1050Ti, Cuda 11.8 CuDNN to match.
11.8 is reported in Nvidia components (this was 12.4 before despite not being mentioned in Add/Remove)
I always had 11.8 with cmd "nvcc --version" despite Nvidia reporting 12.4
I uninstalled Licence Plate
I Add/Removed NVidia graphics driver, then from Device manager as seemed to remain.
I did not reinstall Nvidia. I used the BAT & it loaded 11.8 & this was confirmed in Nvidia/control panel/components.
(I Had tried below with LP installed & did not work, think an error when starting)
Lots of reboots & I think other bits & pieces but it eventually started working & reading the plates correctly!
I am sure had done these steps when I tried some months ago (I tried hundreds of combinations) so not sure what was the magic bullet this time.
modified 5 days ago.
|
|
|
|
|
Hello, I can't seem to get Project AI Object Detection to enable my newly installed Tesla P4. Any idea what I'm doing wrong? YOLOv5 Doesn't have the option to enable the GPU and only the CPU shows.
18:46:20:System: Windows
18:46:20:Operating System: Windows (Microsoft Windows 10.0.19045)
18:46:20:CPUs: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz (Intel)
18:46:20: 1 CPU x 4 cores. 4 logical processors (x64)
18:46:20:GPU (Primary): Tesla P4 (8 GiB) (NVIDIA)
18:46:20: Driver: 551.61, CUDA: 12.4 (up to: 12.4), Compute: 6.1, cuDNN: 8.9
18:46:20:System RAM: 16 GiB
18:46:20:Platform: Windows
18:46:20:BuildConfig: Release
18:46:20:Execution Env: Native
18:46:20:Runtime Env: Production
18:46:20:Runtimes installed:
18:46:20: .NET runtime: 7.0.10
18:46:20: .NET SDK: Not found
18:46:20: Default Python: Not found
18:46:20: Go: Not found
18:46:20: NodeJS: Not found
18:46:20:App DataDir: C:\ProgramData\CodeProject\AI
18:46:20:Video adapter info:
18:46:20: Intel(R) HD Graphics:
18:46:20: Driver Version 10.18.10.4425
18:46:20: Video Processor Intel(R) HD Graphics Family
18:46:20: NVIDIA Tesla P4:
18:46:20: Driver Version 31.0.15.5161
18:46:20: Video Processor
18:46:20:STARTING CODEPROJECT.AI SERVER
18:46:20:RUNTIMES_PATH = C:\Program Files\CodeProject\AI\runtimes
18:46:20:PREINSTALLED_MODULES_PATH = C:\Program Files\CodeProject\AI\preinstalled-modules
18:46:20:MODULES_PATH = C:\Program Files\CodeProject\AI\modules
18:46:20:PYTHON_PATH = \bin\windows\%PYTHON_NAME%\venv\Scripts\python
18:46:20:Data Dir = C:\ProgramData\CodeProject\AI
18:46:20:Server version: 2.5.6
18:46:23:
18:46:23:Module 'Object Detection (YOLOv5 3.1)' 1.9.1 (ID: ObjectDetectionYOLOv5-3.1)
18:46:23:Valid: True
18:46:23:Module Path: <root>\modules\ObjectDetectionYOLOv5-3.1
18:46:23:AutoStart: True
18:46:23:Queue: objectdetection_queue
18:46:23:Runtime: python3.7
18:46:23:Runtime Loc: Local
18:46:23:FilePath: detect_adapter.py
18:46:23:Pre installed: False
18:46:23:Start pause: 1 sec
18:46:23:Parallelism: 0
18:46:23:LogVerbosity:
18:46:23:Platforms: all,!macos-arm64
18:46:23:GPU Libraries: installed if available
18:46:23:GPU Enabled: enabled
18:46:23:Accelerator:
18:46:23:Half Precis.: enable
18:46:23:Environment Variables
18:46:23:APPDIR = <root>\modules\ObjectDetectionYOLOv5-3.1
18:46:23:CPAI_MODULE_ENABLE_GPU = True
18:46:23:DATA_DIR = C:\ProgramData\CodeProject\AI
18:46:23:MODE = MEDIUM
18:46:23:MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-3.1\assets
18:46:23:PROFILE = desktop_gpu
18:46:23:TEMP_PATH = <root>\modules\ObjectDetectionYOLOv5-3.1\tempstore
18:46:23:USE_CUDA = True
18:46:23:YOLOv5_VERBOSE = false
18:46:23:
18:46:23:Started Object Detection (YOLOv5 3.1) module
18:46:26:Server: This is the latest version
18:49:12:Sending shutdown request to python/ObjectDetectionYOLOv5-3.1
18:49:12:detect_adapter.py: Object Detection (YOLOv5 3.1) started.
18:49:13:Module ObjectDetectionYOLOv5-3.1 has shutdown
18:49:13:detect_adapter.py: has exited
18:49:45:ObjectDetectionYOLOv5-3.1 went quietly
18:49:45:
18:49:45:Module 'Object Detection (YOLOv5 3.1)' 1.9.1 (ID: ObjectDetectionYOLOv5-3.1)
18:49:45:Valid: True
18:49:45:Module Path: <root>\modules\ObjectDetectionYOLOv5-3.1
18:49:45:AutoStart: True
18:49:45:Queue: objectdetection_queue
18:49:45:Runtime: python3.7
18:49:45:Runtime Loc: Local
18:49:45:FilePath: detect_adapter.py
18:49:45:Pre installed: False
18:49:45:Start pause: 1 sec
18:49:45:Parallelism: 0
18:49:45:LogVerbosity:
18:49:45:Platforms: all,!macos-arm64
18:49:45:GPU Libraries: installed if available
18:49:45:GPU Enabled: enabled
18:49:45:Accelerator:
18:49:45:Half Precis.: enable
18:49:45:Environment Variables
18:49:45:APPDIR = <root>\modules\ObjectDetectionYOLOv5-3.1
18:49:45:CPAI_MODULE_ENABLE_GPU = True
18:49:45:DATA_DIR = C:\ProgramData\CodeProject\AI
18:49:45:MODE = MEDIUM
18:49:45:MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-3.1\assets
18:49:45:PROFILE = desktop_gpu
18:49:45:TEMP_PATH = <root>\modules\ObjectDetectionYOLOv5-3.1\tempstore
18:49:45:USE_CUDA = True
18:49:45:YOLOv5_VERBOSE = false
18:49:45:
18:49:45:Started Object Detection (YOLOv5 3.1) module
modified 4 days ago.
|
|
|
|
|
|
Thank you! That did help keep YOLOv5 from crashing but YOLOv5 still only uses the CPU and no option to enable GPU. Whats odd is that BlueIris is responding 50x faster as before I installed the Tesla P4. Here is the system info:
Server version: 2.5.6
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz (Intel)
1 CPU x 4 cores. 4 logical processors (x64)
GPU (Primary): Intel(R) HD Graphics (2 GiB) (Intel Corporation)
Driver: 10.18.10.4425
System RAM: 16 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.10
.NET SDK: Not found
Default Python: Not found
Go: Not found
NodeJS: Not found
Video adapter info:
Intel(R) HD Graphics:
Driver Version 10.18.10.4425
Video Processor Intel(R) HD Graphics Family
NVIDIA Tesla P4:
Driver Version 30.0.14.7168
Video Processor Tesla P4
System GPU info:
GPU 3D Usage 0%
GPU RAM Usage 4 MiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|
Could you please run the nvidia-smi command and then the nvcc --version command and let me know what it shows?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
[nvidia-smi.exe]
Unable to determine the device handle for GPU 0000:01:00.0: GPU is lost. Reboot the system to recover this GPU
[nvcc --version]
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
[nvidia-smi.exe] after reboot
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 471.68 Driver Version: 471.68 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla P4 WDDM | 00000000:01:00.0 Off | 0 |
| N/A 34C P8 7W / 75W | 146MiB / 7680MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 852 C+G Insufficient Permissions N/A |
+-----------------------------------------------------------------------------+
modified 12-Mar-24 13:27pm.
|
|
|
|
|
Okay, just a random thought: Do you know if your YOLOv5 was installed with the dependencies necessary to run on GPU? Perhaps it was 'not detected' previously, so those required dependencies were not downloaded?
Maybe, worth to try to reinstall YoloV5?
|
|
|
|
|
Just reinstalled YOLOv5. GPU still not showing available to enable. Thank you for the suggestion though.
|
|
|
|
|
it may not be relevant but I am having similar issues with YOLO not working on 2 CodePorject installs. Both systems where I am having problems are using a Tesla P4 with the Nvidia Grid drivers, CUDA 11.8 and CUDNN 8.9.
CodeProject.AI Server: AI the easy way.[^]
|
|
|
|
|