|
Hi, I am considering upgrading from BI 5.9.2.4 (latest stable version) and CPAI 2.5.6.0 -> 2.6.5.0 on Windows 11
The improvement in modules performance in my case more accurate "person detection" is the result I am hoping for, my install is very stable currently.
I am not sure whether I should be removing modules as part of the install eg. YOLOV5 6.2 and just installing YOLOV8 and what options to choose generally when doing an upgrade, can you please clarify as I have had problems in the past when upgrading?
Should I manually stop the BI and CPAI services prior to starting the upgrade or does this not matter?
The only CPAI module I have installed is:
![](/Uploads/Content/Images/549f0e19-5300-4e34-a7e5-b4b1b63f1dc9-small.png)
BI Settings:
![](/Uploads/Content/Images/7bc1c34c-c3ad-447b-8c7e-cb8c3ee0da75-small.png)
|
|
|
|
|
Typically when I upgrade, I do not remove modules. If you're upgrading beyond 2.08 or earlier, then it would be a good idea to remove everything first.
I would manually stop at least Blue Iris before upgrading. I've read several instances where leaving Blue Iris running can cause issues.
Also I recommend unchecking Auto start/stop with Blue Iris, just as a general tip.
If you do encounter any issues, please let us know.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Thanks for the info, that helps, I will leave the YOLOv5 modules there when I upgrade.
RE: YOLOv8:
- I am assuming I want to move to these modules to get better AI matching from my Blue Iris video streams, is this correct?
- Does the move to v8 happen automatically or is there something I have to do after I upgrade?
|
|
|
|
|
You would have to install the YOLOv8 module from your CodeProject.AI Server dashboard. And if you don't mind a personal opinion answer for getting better AI matching, I haven't necessarily found that to be the case. Personally I use whatever module performs faster and puts less strain on my very old machine.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
I have problem getting YOLOv8 to work on CPAI 2.6.5 for a while now. At the beginning it was a problem with downloading the custom models (I never manage to solve it). Yesterday I decided to uninstall CPAI and reinstall it and after I downloaded the YOLOv8, I got quite a lot of errors. I also tried to detect a sample image and got more errors. Any idea what is causing this?
00:33:52:Module 'Object Detection (YOLOv8)' 1.4.3 (ID: ObjectDetectionYOLOv8)
00:33:52:Valid: True
00:33:52:Module Path: <root>\modules\ObjectDetectionYOLOv8
00:33:52:Module Location: Internal
00:33:52:AutoStart: True
00:33:52:Queue: objectdetection_queue
00:33:52:Runtime: python3.9
00:33:52:Runtime Location: Local
00:33:52:FilePath: detect_adapter.py
00:33:52:Start pause: 1 sec
00:33:52:Parallelism: 0
00:33:52:LogVerbosity:
00:33:52:Platforms: all
00:33:52:GPU Libraries: installed if available
00:33:52:GPU: use if supported
00:33:52:Accelerator:
00:33:52:Half Precision: enable
00:33:52:Environment Variables
00:33:52:APPDIR = <root>\modules\ObjectDetectionYOLOv8
00:33:52:CUSTOM_MODELS_DIR = <root>\modules\ObjectDetectionYOLOv8\custom-models
00:33:52:MODELS_DIR = <root>\modules\ObjectDetectionYOLOv8\assets
00:33:52:MODEL_SIZE = Medium
00:33:52:USE_CUDA = True
00:33:52:YOLO_VERBOSE = false
00:33:52:
00:33:52:Started Object Detection (YOLOv8) module
00:33:57:detect_adapter.py: A module that was compiled using NumPy 1.x cannot be run in
00:33:57:detect_adapter.py: NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
00:33:57:detect_adapter.py: versions of NumPy, modules must be compiled with NumPy 2.0.
00:33:57:detect_adapter.py: Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
00:33:57:detect_adapter.py: If you are a user of the module, the easiest solution will be to
00:33:57:detect_adapter.py: downgrade to 'numpy<2' or try to upgrade the affected module.
00:33:57:detect_adapter.py: We expect that some modules will need time to support NumPy 2.
00:33:57:detect_adapter.py: Traceback (most recent call last): File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect_adapter.py", line 20, in
00:33:57:detect_adapter.py: from detect import do_detection
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect.py", line 11, in
00:33:57:detect_adapter.py: from ultralytics import YOLO
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\__init__.py", line 5, in
00:33:57:detect_adapter.py: from ultralytics.data.explorer.explorer import Explorer
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\__init__.py", line 3, in
00:33:57:detect_adapter.py: from .base import BaseDataset
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\base.py", line 17, in
00:33:57:detect_adapter.py: from ultralytics.utils import DEFAULT_CFG, LOCAL_RANK, LOGGER, NUM_THREADS, TQDM
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\utils\__init__.py", line 943, in
00:33:57:detect_adapter.py: SETTINGS = SettingsManager() # initialize settings
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\utils\__init__.py", line 851, in __init__
00:33:57:detect_adapter.py: from ultralytics.utils.torch_utils import torch_distributed_zero_first
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\utils\torch_utils.py", line 18, in
00:33:57:detect_adapter.py: import torchvision
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\torchvision\__init__.py", line 5, in
00:33:57:detect_adapter.py: from torchvision import datasets, io, models, ops, transforms, utils
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\torchvision\models\__init__.py", line 17, in
00:33:57:detect_adapter.py: from . import detection, optical_flow, quantization, segmentation, video
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\torchvision\models\detection\__init__.py", line 1, in
00:33:57:detect_adapter.py: from .faster_rcnn import *
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\torchvision\models\detection\faster_rcnn.py", line 16, in
00:33:57:detect_adapter.py: from .anchor_utils import AnchorGenerator
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\torchvision\models\detection\anchor_utils.py", line 10, in
00:33:57:detect_adapter.py: class AnchorGenerator(nn.Module):
00:33:57:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\torchvision\models\detection\anchor_utils.py", line 63, in AnchorGenerator
00:33:57:detect_adapter.py: device: torch.device = torch.device("cpu"),
00:33:57:detect_adapter.py: C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\torchvision\models\detection\anchor_utils.py:63: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:77.)
00:33:57:detect_adapter.py: device: torch.device = torch.device("cpu"),
00:37:22:Object Detection (YOLOv8): [RuntimeError] : Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect.py", line 150, in do_detection
results = detector.predict(img, imgsz=resolution, half=use_half_precision,
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\engine\model.py", line 273, in predict
return self.predictor.predict_cli(source=source) if is_cli else self.predictor(source=source, stream=stream)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\engine\predictor.py", line 204, in __call__
return list(self.stream_inference(source, model, *args, **kwargs)) # merge list of Result into one
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\torch\autograd\grad_mode.py", line 43, in generator_context
response = gen.send(None)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\engine\predictor.py", line 279, in stream_inference
im = self.preprocess(im0s)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\engine\predictor.py", line 125, in preprocess
im = torch.from_numpy(im)
RuntimeError: Numpy is not available
00:37:22:Response rec'd from Object Detection (YOLOv8) command 'detect' (...e92ea2)
Here is my system info:
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz (Intel)
1 CPU x 4 cores. 4 logical processors (x64)
GPU (Primary): Intel(R) HD Graphics 530 (1,024 MiB) (Intel Corporation)
Driver: 31.0.101.2125
System RAM: 8 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 8.0.4
.NET SDK: 8.0.204
Default Python: 3.11.4
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
Intel(R) HD Graphics 530:
Driver Version 31.0.101.2125
Video Processor Intel(R) HD Graphics Family
System GPU info:
GPU 3D Usage 17%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|
|
Thanks Sean, that solved it!
|
|
|
|
|
![Go to Parent](https://www.codeproject.com/App_Themes/CodeProject/Img/arrow-up24.png) I noticed that ALPR is having the same issue. I did the same handling, and the ALPR was working after that.
02:27:05:Module 'License Plate Reader' 3.1.0 (ID: ALPR)
02:27:05:Valid: True
02:27:05:Module Path: <root>\modules\ALPR
02:27:05:Module Location: Internal
02:27:05:AutoStart: True
02:27:05:Queue: alpr_queue
02:27:05:Runtime: python3.9
02:27:05:Runtime Location: Local
02:27:05:FilePath: ALPR_adapter.py
02:27:05:Start pause: 3 sec
02:27:05:Parallelism: 0
02:27:05:LogVerbosity:
02:27:05:Platforms: all
02:27:05:GPU Libraries: installed if available
02:27:05:GPU: use if supported
02:27:05:Accelerator:
02:27:05:Half Precision: enable
02:27:05:Environment Variables
02:27:05:AUTO_PLATE_ROTATE = True
02:27:05:CROPPED_PLATE_DIR = <root>\Server\wwwroot
02:27:05:MIN_COMPUTE_CAPABILITY = 6
02:27:05:MIN_CUDNN_VERSION = 7
02:27:05:OCR_OPTIMAL_CHARACTER_HEIGHT = 60
02:27:05:OCR_OPTIMAL_CHARACTER_WIDTH = 30
02:27:05:OCR_OPTIMIZATION = True
02:27:05:PLATE_CONFIDENCE = 0.7
02:27:05:PLATE_RESCALE_FACTOR = 2
02:27:05:PLATE_ROTATE_DEG = 0
02:27:05:REMOVE_SPACES = False
02:27:05:ROOT_PATH = <root>
02:27:05:SAVE_CROPPED_PLATE = False
02:27:05:
02:27:05:Started License Plate Reader module
02:27:05:Installer exited with code 0
02:27:05:ALPR_adapter.py: RuntimeError: module compiled against ABI version 0x1000009 but this version of numpy is 0x2000000
02:27:05:ALPR_adapter.py: Traceback (most recent call last):
02:27:05:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 16, in
02:27:05:ALPR_adapter.py: from ALPR import init_detect_platenumber, detect_platenumber
02:27:05:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 7, in
02:27:05:ALPR_adapter.py: import utils.tools as tool
02:27:05:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\utils\tools.py", line 2, in
02:27:05:ALPR_adapter.py: import cv2
02:27:05:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 181, in
02:27:05:ALPR_adapter.py: bootstrap()
02:27:05:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 153, in bootstrap
02:27:05:ALPR_adapter.py: native_module = importlib.import_module("cv2")
02:27:05:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\lib\importlib\__init__.py", line 127, in import_module
02:27:05:ALPR_adapter.py: return _bootstrap._gcd_import(name[level:], package, level)
02:27:06:ALPR_adapter.py: ImportError: numpy.core.multiarray failed to import
02:27:06:Module ALPR has shutdown
02:27:06:ALPR_adapter.py: has exited
|
|
|
|
|
Hello guys,
I am having an annoying issue with Codeproject. When I am installing it, it is working well but if I restart my PC under windows 10, it is not starting anymore. The solution I found :
- Uninstall it
- Deleting every linked file with program Everything
- Cleaning the registry by removing every key that contain codeproject
- Install again...
This is quite "heavy" to do at each restart. I searched out why CodeProject is not starting and I found that the server can't start and provide error :
The {4991D34B-80A1-4291-83B6-3328366B9097} server did not register with DCOM before the time limit expired.
Anyone could help me please ?
Thanks !
|
|
|
|
|
Thanks very much for your report. Could you please share your System Info tab from your CodeProject.AI Server dashboard?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Sure, let me do the uninstallation process and installation process to get access to the tab.
By the way, trying to start the server manually trough the link does not work also
|
|
|
|
|
Here you are : (new installation is in progress)
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: AMD Ryzen 7 5700X 8-Core Processor (AMD)
1 CPU x 8 cores. 16 logical processors (x64)
GPU (Primary): AMD Radeon RX 6700 (10 GiB) (Advanced Micro Devices, Inc.)
Driver: 31.0.24033.1003
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: 3.8.5
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
AMD Radeon RX 6700:
Driver Version 31.0.24033.1003
Video Processor AMD Radeon Graphics Processor (0x73DF)
System GPU info:
GPU 3D Usage 3%
GPU RAM Usage 900,4 MiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|
I also see this recently.
I am manually starting Code Project.
|
|
|
|
|
By using the link in Windows Start menu ?
Because doing this doesn't change anything for me ![Frown | :(](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_frown.gif)
|
|
|
|
|
Usually I have to go to services.msc to start Code Project.
Windows key+R services.msc
I've just been seeing it not start when I restart the machine, even though the service is set to Automatic. Registering the app...
Man, that's a blast from the past.
I don't remember what we used to do. (I have been retired from IT for a while now.)
|
|
|
|
|
Maybe regsvr32 <dll name="">?
|
|
|
|
|
Have you tried the solution in this link?
cheers
Chris Maunder
|
|
|
|
|
Hello,
After weeks of test on a different PC etc... I finally found out the issue.
CodeProject was working like a charm on my test PC until I install Comodo Security Suite. It started to randomly start and crash till it never start again.
I fully uninstall Comodo Security Suite and it started to work like a charm again... ![Big Grin | :-D](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_biggrin.gif)
|
|
|
|
|
I checked all the model to install using the setup installer. Then when I tried to start the "License Plate Reader 3.1.0", i'm getting the following error and the status is changing to 'Failed to Start'
11:20:40:ALPR_adapter.py: RuntimeError: module compiled against ABI version 0x1000009 but this version of numpy is 0x2000000
11:20:40:ALPR_adapter.py: Traceback (most recent call last):
11:20:40:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 16, in
11:20:40:ALPR_adapter.py: from ALPR import init_detect_platenumber, detect_platenumber
11:20:40:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 7, in
11:20:40:ALPR_adapter.py: import utils.tools as tool
11:20:40:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\utils\tools.py", line 2, in
11:20:40:ALPR_adapter.py: import cv2
11:20:40:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 181, in
11:20:40:ALPR_adapter.py: bootstrap()
11:20:40:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 153, in bootstrap
11:20:40:ALPR_adapter.py: native_module = importlib.import_module("cv2")
11:20:40:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\lib\importlib\__init__.py", line 127, in import_module
11:20:40:ALPR_adapter.py: return _bootstrap._gcd_import(name[level:], package, level)
11:20:40:ALPR_adapter.py: ImportError: numpy.core.multiarray failed to import
I also did reinstall with "Remove previously installed modules" and installed (the ones that were pre-selected), then installed License Plate Reader from the server (install modules). Still getting the same error when starting it.
|
|
|
|
|
Try uninstalling one more time then reinstall using Do not use download cache
![](/Uploads/Content/Images/76b667f4-c994-4f40-aded-4d6fe8b3dae2-small.png)
|
|
|
|
|
It looks like Numpy 2.0 was just released and it is not backward compatible.
We will need to correct some requirements.txt files to take this into account.
"Mistakes are prevented by Experience. Experience is gained by making mistakes."
|
|
|
|
|
So this Numpy issue is prohibiting OCR/License Plate Reader modules from functioning properly? Is that accurate?
|
|
|
|
|
See:
Re: (FIXED) CPAI update from 2.6.2 to 2.6.5 - YOLOv8 installation issues
This fixed my ALPR issue that had the same symptoms. I just changed to the identical path, but with /ALPR/place of /ObjectDetectionYOLOv8/
|
|
|
|
|
![Go to Parent](https://www.codeproject.com/App_Themes/CodeProject/Img/arrow-up24.png) similar numpy error when starting coral
12:33:58:Started Object Detection (Coral) module
12:34:00:objectdetection_coral_adapter.py: A module that was compiled using NumPy 1.x cannot be run in
12:34:00:objectdetection_coral_adapter.py: NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
12:34:00:objectdetection_coral_adapter.py: versions of NumPy, modules must be compiled with NumPy 2.0.
12:34:00:objectdetection_coral_adapter.py: Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
12:34:00:objectdetection_coral_adapter.py: If you are a user of the module, the easiest solution will be to
12:34:00:objectdetection_coral_adapter.py: downgrade to 'numpy<2' or try to upgrade the affected module.
12:34:00:objectdetection_coral_adapter.py: We expect that some modules will need time to support NumPy 2.
12:34:00:objectdetection_coral_adapter.py: Traceback (most recent call last): File "C:\bin\code_project\runtimes\bin\windows\python39\lib\threading.py", line 930, in _bootstrap
12:34:00:objectdetection_coral_adapter.py: self._bootstrap_inner()
12:34:00:objectdetection_coral_adapter.py: File "C:\bin\code_project\runtimes\bin\windows\python39\lib\threading.py", line 973, in _bootstrap_inner
12:34:00:objectdetection_coral_adapter.py: self.run()
12:34:00:objectdetection_coral_adapter.py: File "C:\bin\code_project\runtimes\bin\windows\python39\lib\threading.py", line 910, in run
12:34:00:objectdetection_coral_adapter.py: self._target(*self._args, **self._kwargs)
12:34:00:objectdetection_coral_adapter.py: File "C:\bin\code_project\runtimes\bin\windows\python39\lib\concurrent\futures\thread.py", line 77, in _worker
12:34:00:objectdetection_coral_adapter.py: work_item.run()
12:34:00:objectdetection_coral_adapter.py: File "C:\bin\code_project\runtimes\bin\windows\python39\lib\concurrent\futures\thread.py", line 52, in run
12:34:00:objectdetection_coral_adapter.py: result = self.fn(*self.args, **self.kwargs)
12:34:00:objectdetection_coral_adapter.py: File "C:\bin\code_project\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 48, in initialise
12:34:00:objectdetection_coral_adapter.py: self.enable_GPU = self.system_info.hasCoralTPU
12:34:00:objectdetection_coral_adapter.py: File "C:\bin\code_project\modules\ObjectDetectionCoral\../../SDK/Python\system_info.py", line 344, in hasCoralTPU
12:34:00:objectdetection_coral_adapter.py: from pycoral.utils.edgetpu import list_edge_tpus
12:34:00:objectdetection_coral_adapter.py: File "C:\bin\code_project\modules\ObjectDetectionCoral\bin\windows\python39\venv\lib\site-packages\pycoral\utils\edgetpu.py", line 24, in
12:34:00:objectdetection_coral_adapter.py: from pycoral.pybind._pywrap_coral import GetRuntimeVersion as get_runtime_version
12:34:00:objectdetection_coral_adapter.py: AttributeError: _ARRAY_API not found
|
|
|
|
|
I'd like to start by mentioning that CP.AI works beautifully... when it works.
Usually, that happens after I spend several hours fixing its installation after each update. This is a process that is, and has been in DIRE need of improvement for the last couple years since I started using CP.AI.
Updating from 2.6.2 to 2.6.5 is no different.
2.6.2 worked perfectly for months (that is, since about a day after I upgraded, because the first day was spent fixing the update process). Using YOLOv8 and License Plate Reader on a dedicated machine hosting Blue Iris, with an RTX 4060 as GPU.
I installed 2.6.5 - the default modules checked were YOLOv5 .NET and YOLOv5 6.2; since I use none, I unchecked them and checked YOLOv8 and License Plate Reader. Much to my surprise, once everything was installed, I found out that my options were ignored. It happens, I guess.
I uninstalled those modules and clicked "Install" (with "Do not use cache enabled") next to YOLOv8 module.
Nothing.
After several attempts, I restarted the CP.AI service - still nothing, no reaction to pressing the button for YOLOv8 module.
Running out of options, I restarted the whole PC and reinstalled CP.AI 2.6.5, once again checking YOLOv8 and License Plate Reader only.
Surprisingly, this time, the modules started installing... there is hope.
But both YOLOv8 and ALPR modules failed to install and start properly.
Log is below:
<pre>18:07:31:Installing module 'ObjectDetectionYOLOv8'
18:07:31:ObjectDetectionYOLOv8: Installing CodeProject.AI Analysis Module
18:07:31:ObjectDetectionYOLOv8: ======================================================================
18:07:31:ObjectDetectionYOLOv8: CodeProject.AI Installer
18:07:31:ObjectDetectionYOLOv8: ======================================================================
18:07:31:ObjectDetectionYOLOv8: 868.3Gb of 976Gb available on BIBoot
18:07:31:ObjectDetectionYOLOv8: General CodeProject.AI setup
18:07:31:ObjectDetectionYOLOv8: Creating Directories...done
18:07:31:ObjectDetectionYOLOv8: GPU support
18:07:31:ObjectDetectionYOLOv8: CUDA Present...Yes (CUDA 12.4, cuDNN 9.1)
18:07:31:ObjectDetectionYOLOv8: ROCm Present...No
18:07:31:ObjectDetectionYOLOv8: Checking for .NET 7.0...Checking SDKs...Upgrading: .NET is 0
18:07:31:ObjectDetectionYOLOv8: Current version is 0. Installing newer version.
18:07:31:ObjectDetectionYOLOv8: 'winget' is not recognized as an internal or external command,
18:07:31:ObjectDetectionYOLOv8: operable program or batch file.
18:07:33:ObjectDetectionYOLOv8: Reading ObjectDetectionYOLOv8 settings.......done
18:07:33:ObjectDetectionYOLOv8: Installing module Object Detection (YOLOv8) 1.4.3
18:07:33:Module ALPR started successfully.
18:07:33:ObjectDetectionYOLOv8: Installing Python 3.9
18:07:33:ObjectDetectionYOLOv8: Python 3.9 is already installed
18:07:38:ObjectDetectionYOLOv8: Creating Virtual Environment (Local)...done
18:07:38:ObjectDetectionYOLOv8: Confirming we have Python 3.9 in our virtual environment...present
18:07:38:ObjectDetectionYOLOv8: Installing Python packages for Object Detection (YOLOv8)
18:07:38:ObjectDetectionYOLOv8: [0;Installing GPU-enabled libraries: If available
18:07:40:ObjectDetectionYOLOv8: Ensuring Python package manager (pip) is installed...done
18:07:48:ObjectDetectionYOLOv8: Ensuring Python package manager (pip) is up to date...done
18:07:48:ObjectDetectionYOLOv8: Python packages specified by requirements.windows.cuda.txt
18:08:43:ObjectDetectionYOLOv8: - Installing PyTorch, an open source machine learning framework...(✅ checked) done
18:09:57:ObjectDetectionYOLOv8: - Installing TorchVision, for working with computer vision models...(✅ checked) done
18:11:46:ObjectDetectionYOLOv8: - Installing Ultralytics package for object detection in images...(✅ checked) done
18:11:47:ObjectDetectionYOLOv8: Installing Python packages for the CodeProject.AI Server SDK
18:11:48:ObjectDetectionYOLOv8: Ensuring Python package manager (pip) is installed...done
18:11:50:ObjectDetectionYOLOv8: Ensuring Python package manager (pip) is up to date...done
18:11:50:ObjectDetectionYOLOv8: Python packages specified by requirements.txt
18:11:51:ObjectDetectionYOLOv8: - Installing Pillow, a Python Image Library...Already installed
18:11:52:ObjectDetectionYOLOv8: - Installing Charset normalizer...Already installed
18:11:56:ObjectDetectionYOLOv8: - Installing aiohttp, the Async IO HTTP library...(✅ checked) done
18:11:58:ObjectDetectionYOLOv8: - Installing aiofiles, the Async IO Files library...(✅ checked) done
18:11:59:ObjectDetectionYOLOv8: - Installing py-cpuinfo to allow us to query CPU info...Already installed
18:12:00:ObjectDetectionYOLOv8: - Installing Requests, the HTTP library...Already installed
18:12:01:ObjectDetectionYOLOv8: Scanning modulesettings for downloadable models...Processing model list
18:14:52:ObjectDetectionYOLOv8: Downloading YOLOv8 Object Detection all sizes...Expanding...done.
18:14:52:ObjectDetectionYOLOv8: Copying contents of objectdetection-coco-yolov8-pt-nsmlx.zip to assets...done
18:18:04:ObjectDetectionYOLOv8: Downloading YOLOv8 Object Segmentation all sizes...Expanding...done.
18:18:04:ObjectDetectionYOLOv8: Copying contents of objectsegmentation-coco-yolov8-pt-nsmlx.zip to assets...done
18:18:34:ObjectDetectionYOLOv8: Downloading YOLOv8 Object Custom models...Expanding...done.
18:18:34:ObjectDetectionYOLOv8: Copying contents of objectdetection-custom-yolov8-pt-m.zip to custom-models...done
18:18:38:ObjectDetectionYOLOv8: A module that was compiled using NumPy 1.x cannot be run in
18:18:38:ObjectDetectionYOLOv8: NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
18:18:38:ObjectDetectionYOLOv8: versions of NumPy, modules must be compiled with NumPy 2.0.
18:18:38:ObjectDetectionYOLOv8: Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
18:18:38:ObjectDetectionYOLOv8: If you are a user of the module, the easiest solution will be to
18:18:38:ObjectDetectionYOLOv8: downgrade to 'numpy<2' or try to upgrade the affected module.
18:18:38:ObjectDetectionYOLOv8: We expect that some modules will need time to support NumPy 2.
18:18:38:ObjectDetectionYOLOv8: Traceback (most recent call last): File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect_adapter.py", line 20, in
18:18:38:ObjectDetectionYOLOv8: from detect import do_detection
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect.py", line 11, in
18:18:38:ObjectDetectionYOLOv8: from ultralytics import YOLO
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\__init__.py", line 5, in
18:18:38:ObjectDetectionYOLOv8: from ultralytics.data.explorer.explorer import Explorer
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\__init__.py", line 3, in
18:18:38:ObjectDetectionYOLOv8: from .base import BaseDataset
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\base.py", line 12, in
18:18:38:ObjectDetectionYOLOv8: import cv2
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 181, in
18:18:38:ObjectDetectionYOLOv8: bootstrap()
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 153, in bootstrap
18:18:38:ObjectDetectionYOLOv8: native_module = importlib.import_module("cv2")
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\lib\importlib\__init__.py", line 127, in import_module
18:18:38:ObjectDetectionYOLOv8: return _bootstrap._gcd_import(name[level:], package, level)
18:18:38:ObjectDetectionYOLOv8: AttributeError: _ARRAY_API not found
18:18:38:ObjectDetectionYOLOv8: Traceback (most recent call last):
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect_adapter.py", line 20, in
18:18:38:ObjectDetectionYOLOv8: from detect import do_detection
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect.py", line 11, in
18:18:38:ObjectDetectionYOLOv8: from ultralytics import YOLO
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\__init__.py", line 5, in
18:18:38:ObjectDetectionYOLOv8: from ultralytics.data.explorer.explorer import Explorer
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\__init__.py", line 3, in
18:18:38:ObjectDetectionYOLOv8: from .base import BaseDataset
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\base.py", line 12, in
18:18:38:ObjectDetectionYOLOv8: import cv2
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 181, in
18:18:38:ObjectDetectionYOLOv8: bootstrap()
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 153, in bootstrap
18:18:38:ObjectDetectionYOLOv8: native_module = importlib.import_module("cv2")
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\lib\importlib\__init__.py", line 127, in import_module
18:18:38:ObjectDetectionYOLOv8: return _bootstrap._gcd_import(name[level:], package, level)
18:18:38:ObjectDetectionYOLOv8: ImportError: numpy.core.multiarray failed to import
18:18:38:ObjectDetectionYOLOv8: Self test: Self-test passed
18:18:38:ObjectDetectionYOLOv8: Module setup time 00:11:06.29
18:18:38:ObjectDetectionYOLOv8: Setup complete
18:18:38:ObjectDetectionYOLOv8: Total setup time 00:11:06.94
18:18:38:Module ObjectDetectionYOLOv8 installed successfully.
18:18:38:Module ObjectDetectionYOLOv8 not configured to AutoStart.
18:18:38:Installer exited with code 0
Now, I am not a Python developer, therefore I don't know how to resolve this. I do see there are two separate problems:
1.
18:07:31:ObjectDetectionYOLOv8: Checking for .NET 7.0...Checking SDKs...Upgrading: .NET is 0
18:07:31:ObjectDetectionYOLOv8: Current version is 0. Installing newer version.
18:07:31:ObjectDetectionYOLOv8: 'winget' is not recognized as an internal or external command,
18:07:31:ObjectDetectionYOLOv8: operable program or batch file.
2.
<pre>18:18:38:ObjectDetectionYOLOv8: A module that was compiled using NumPy 1.x cannot be run in
18:18:38:ObjectDetectionYOLOv8: NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
18:18:38:ObjectDetectionYOLOv8: versions of NumPy, modules must be compiled with NumPy 2.0.
18:18:38:ObjectDetectionYOLOv8: Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
18:18:38:ObjectDetectionYOLOv8: If you are a user of the module, the easiest solution will be to
18:18:38:ObjectDetectionYOLOv8: downgrade to 'numpy<2' or try to upgrade the affected module.
18:18:38:ObjectDetectionYOLOv8: We expect that some modules will need time to support NumPy 2.
18:18:38:ObjectDetectionYOLOv8: Traceback (most recent call last): File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect_adapter.py", line 20, in
18:18:38:ObjectDetectionYOLOv8: from detect import do_detection
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect.py", line 11, in
18:18:38:ObjectDetectionYOLOv8: from ultralytics import YOLO
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\__init__.py", line 5, in
18:18:38:ObjectDetectionYOLOv8: from ultralytics.data.explorer.explorer import Explorer
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\__init__.py", line 3, in
18:18:38:ObjectDetectionYOLOv8: from .base import BaseDataset
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\base.py", line 12, in
18:18:38:ObjectDetectionYOLOv8: import cv2
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 181, in
18:18:38:ObjectDetectionYOLOv8: bootstrap()
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 153, in bootstrap
18:18:38:ObjectDetectionYOLOv8: native_module = importlib.import_module("cv2")
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\lib\importlib\__init__.py", line 127, in import_module
18:18:38:ObjectDetectionYOLOv8: return _bootstrap._gcd_import(name[level:], package, level)
18:18:38:ObjectDetectionYOLOv8: AttributeError: _ARRAY_API not found
18:18:38:ObjectDetectionYOLOv8: Traceback (most recent call last):
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect_adapter.py", line 20, in
18:18:38:ObjectDetectionYOLOv8: from detect import do_detection
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\detect.py", line 11, in
18:18:38:ObjectDetectionYOLOv8: from ultralytics import YOLO
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\__init__.py", line 5, in
18:18:38:ObjectDetectionYOLOv8: from ultralytics.data.explorer.explorer import Explorer
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\__init__.py", line 3, in
18:18:38:ObjectDetectionYOLOv8: from .base import BaseDataset
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\ultralytics\data\base.py", line 12, in
18:18:38:ObjectDetectionYOLOv8: import cv2
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 181, in
18:18:38:ObjectDetectionYOLOv8: bootstrap()
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv8\bin\windows\python39\venv\lib\site-packages\cv2\__init__.py", line 153, in bootstrap
18:18:38:ObjectDetectionYOLOv8: native_module = importlib.import_module("cv2")
18:18:38:ObjectDetectionYOLOv8: File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\lib\importlib\__init__.py", line 127, in import_module
18:18:38:ObjectDetectionYOLOv8: return _bootstrap._gcd_import(name[level:], package, level)
18:18:38:ObjectDetectionYOLOv8: ImportError: numpy.core.multiarray failed to import
I attempted to fix the first issue by manually installing .NET 7.0 - which resolved exactly nothing. Same error messages appeared.
So, once again, I am at someone else's pity to help me successfully finalize the update.
Thank you!
|
|
|
|
|