|
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'm currently running 2.6.2 and it is working fine. 2.6.2 was easier to install than previous version and reflects amazing work by the team!
If I read the "release note", it only says: "2.6.5 Various installer fixes"
Given that upgrades may, or may not be, fast or even successful, based on this, I would not choose to upgrade solely for installer fixes...
But, in the UI, I see: "An update to version 2.6.5 is available Download
Support for external modules and module updates."
OK, that's a different matter... do I need to upgrade to get the updated modules? I do not see any modules available for update in the Modules control panel? I thought that was the point of modules?
Is an upgrade recommended if I already have 2.6.2 installed and functioning?
Do I need to upgrade in order to update modules or should module updates be available in 2.6.2?
A little more clarity would be helpful.
|
|
|
|
|
You do indeed need to upgrade to get the updated modules.
Generally the further we get along, the more stable CodeProject.AI Server becomes. Also, if you don't upgrade, you'll get to a point where we're patching modules, updating modules, and actively working on the latest modules with the belief the majority of users are using them. Then if you ever have a problem with your current modules or setup, you'll be that far removed from the latest version.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Server version: 2.6.5
System: Linux
Operating System: Linux (Ubuntu 22.04)
CPUs: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (Intel)
1 CPU x 4 cores. 4 logical processors (x64)
GPU (Primary): HD Graphics 530 (rev 06) (Intel Corporation)
System RAM: 8 GiB
Platform: Linux
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.19
.NET SDK: Not found
Default Python: 3.10.12
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
HD Graphics 530 (rev 06):
Driver Version
Video Processor
System GPU info:
GPU 3D Usage 0%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
Module 'Object Detection (YOLOv5 6.2)' 1.9.1 (ID: ObjectDetectionYOLOv5-6.2)
Valid: True
Module Path: <root>/modules/ObjectDetectionYOLOv5-6.2
Module Location: Internal
AutoStart: True
Queue: objectdetection_queue
Runtime: python3.8
Runtime Location: Shared
FilePath: detect_adapter.py
Start pause: 1 sec
Parallelism: 0
LogVerbosity:
Platforms: all,!raspberrypi,!jetson
GPU Libraries: installed if available
GPU: use if supported
Accelerator:
Half Precision: enable
Environment Variables
APPDIR = <root>/modules/ObjectDetectionYOLOv5-6.2
CUSTOM_MODELS_DIR = <root>/modules/ObjectDetectionYOLOv5-6.2/custom-models
MODELS_DIR = <root>/modules/ObjectDetectionYOLOv5-6.2/assets
MODEL_SIZE = Medium
USE_CUDA = True
YOLOv5_AUTOINSTALL = false
YOLOv5_VERBOSE = false
Status Data: {
"inferenceDevice": "CPU",
"inferenceLibrary": "",
"canUseGPU": "false",
"successfulInferences": 1673,
"failedInferences": 1,
"numInferences": 1674,
"averageInferenceMs": 799.8786610878661
}
Started: 29 May 2024 6:55:47 AM Central Standard Time
LastSeen: 29 May 2024 9:03:58 AM Central Standard Time
Status: Started
Requests: 1674 (includes status calls)
Installation Log
2024-05-29 06:31:54: Setting verbosity to quiet
2024-05-29 06:31:54: Installing CodeProject.AI Analysis Module
2024-05-29 06:31:54: ======================================================================
2024-05-29 06:31:54: CodeProject.AI Installer
2024-05-29 06:31:54: ======================================================================
2024-05-29 06:31:54: 505.05 GiB of 843.02 GiB available on linux
2024-05-29 06:31:54: Installing xz-utils...
2024-05-29 06:31:56: General CodeProject.AI setup
2024-05-29 06:31:56: Setting permissions on runtimes folder...done
2024-05-29 06:31:56: Setting permissions on downloads folder...done
2024-05-29 06:31:56: Setting permissions on modules download folder...done
2024-05-29 06:31:56: Setting permissions on models download folder...done
2024-05-29 06:31:56: Setting permissions on persisted data folder...done
2024-05-29 06:31:56: GPU support
2024-05-29 06:31:56: CUDA (NVIDIA) Present: No
2024-05-29 06:31:56: ROCm (AMD) Present: No
2024-05-29 06:31:56: MPS (Apple) Present: No
2024-05-29 06:31:57: Reading module settings.......done
2024-05-29 06:31:57: Processing module ObjectDetectionYOLOv5-6.2 1.9.1
2024-05-29 06:31:57: Installing Python 3.8
2024-05-29 06:31:57: Python 3.8 is already installed
2024-05-29 06:32:02: W: https:
2024-05-29 06:32:09: Ensuring PIP in base python install... done
2024-05-29 06:32:10: Upgrading PIP in base python install... done
2024-05-29 06:32:10: Virtual Environment already present
2024-05-29 06:32:10: Checking for Python 3.8...(Found Python 3.8.19) All good
2024-05-29 06:32:12: Upgrading PIP in virtual environment... done
2024-05-29 06:32:14: Installing updated setuptools in venv... done
2024-05-29 06:32:47: Downloading Standard YOLO models...Expanding... done.
2024-05-29 06:32:47: Moving contents of models-yolo5-pt.zip to assets...done.
2024-05-29 06:33:30: Downloading Custom YOLO models...Expanding... done.
2024-05-29 06:33:30: Moving contents of custom-models-yolo5-pt.zip to custom-models...done.
2024-05-29 06:33:30: Installing Python packages for Object Detection (YOLOv5 6.2)
2024-05-29 06:33:30: Installing GPU-enabled libraries: If available
2024-05-29 06:33:31: Searching for python3-pip...All good.
2024-05-29 06:33:34: Ensuring PIP compatibility... done
2024-05-29 06:33:34: Python packages will be specified by requirements.linux.txt
2024-05-29 06:33:36: - Installing Pandas, a data analysis / data manipulation tool...Already installed
2024-05-29 06:33:37: - Installing CoreMLTools, for working with .mlmodel format models...Already installed
2024-05-29 06:33:38: - Installing OpenCV, the Open source Computer Vision library...Already installed
2024-05-29 06:33:40: - Installing Pillow, a Python Image Library...Already installed
2024-05-29 06:33:41: - Installing SciPy, a library for mathematics, science, and engineering...Already installed
2024-05-29 06:33:42: - Installing PyYAML, a library for reading configuration files...Already installed
2024-05-29 06:33:44: - Installing Torch, for Tensor computation and Deep neural networks...Already installed
2024-05-29 06:33:45: - Installing TorchVision, for Computer Vision based AI...Already installed
2024-05-29 06:38:39: - Installing Ultralytics YoloV5 package for object detection in images... (✅ checked) done
2024-05-29 06:38:41: - Installing Seaborn, a data visualization library based on matplotlib...Already installed
2024-05-29 06:38:41: Installing Python packages for the CodeProject.AI Server SDK
2024-05-29 06:38:42: Searching for python3-pip...All good.
2024-05-29 06:38:47: Ensuring PIP compatibility... done
2024-05-29 06:38:47: Python packages will be specified by requirements.txt
2024-05-29 06:38:49: - Installing Pillow, a Python Image Library...Already installed
2024-05-29 06:38:51: - Installing Charset normalizer...Already installed
2024-05-29 06:38:53: - Installing aiohttp, the Async IO HTTP library...Already installed
2024-05-29 06:38:55: - Installing aiofiles, the Async IO Files library...Already installed
2024-05-29 06:38:57: - Installing py-cpuinfo to allow us to query CPU info...Already installed
2024-05-29 06:38:59: - Installing Requests, the HTTP library...Already installed
2024-05-29 06:38:59: Scanning modulesettings for downloadable models...No models specified
2024-05-29 06:39:08: Fusing layers...
2024-05-29 06:39:09: YOLOv5.1m summary: 391 layers, 21805053 parameters, 0 gradients
2024-05-29 06:39:09: Adding AutoShape...
2024-05-29 06:39:12: Self test: Self-test passed
2024-05-29 06:39:12: Module setup time 00:07:16
2024-05-29 06:39:13: Setup complete
2024-05-29 06:39:13: Total setup time 00:07:19
Installer exited with code 0
1: Would is be possible to change the "DisableLegacyPort": parameter in the appsettings.json file from false to true? It would save some time troubleshooting when CPAI collides with another program running on the machine.
2: I might be doing this wrong, but...
I am having to do the following to get the service to run on Ubuntu 22.04:
a: copy /bin/codeproject.ai-server-2.6.5/codeproject.ai-server.service to /lib/systemd/system
b: run sudo systemctl enable codeproject.ai-server
c: reboot the machine.
Am I doing something wrong, or should this be done by the install program?
It seems to indicate that the service will start when the machine reboots, but in my experience, that does not happen.
TIA
|
|
|
|
|
Quote: Would is be possible to change the "DisableLegacyPort": parameter in the appsettings.json file from false to true?
Absolutely. We can't do that for everyone, since it's there to provide seamless legacy support, but you can just edit the value yourself and restart the server and you're good to go
Steve Winn wrote: I am having to do the following to get the service to run on Ubuntu 22.04:
The installer does this itself, and you should see the line "Adding CodeProject.AI Server to Daemon list"
It does
sudo cp "/usr/bin/codeproject.ai-server-2.6.5/codeproject.ai-server.service" /etc/systemd/system/codeproject.ai-server.service
sudo systemctl daemon-reload
It doesn't reboot, just releads, so maybe just a reboot is enough. However, if you're not seeing the system file in place then something's up.
cheers
Chris Maunder
|
|
|
|
|
Oh. So I must have an odd distro or install, as at least with 2.6.2 it didn't do that for me.
But also with earlier versions, the only way I could get a proper install was to sudo -i and run dpkg -i as root. (permission issues creating directories)
I haven't used *nix in a production environment for a very long time, so I'm really out of practice.
|
|
|
|
|
To start, as it usually asked for:
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz (Intel)
1 CPU x 4 cores. 4 logical processors (x64)
GPU (Primary): Intel(R) HD Graphics 630 (1,024 MiB) (Intel Corporation)
Driver: 31.0.101.2111
System RAM: 16 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.5
.NET SDK: Not found
Default Python: Not found
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
Intel(R) HD Graphics 630:
Driver Version 31.0.101.2111
Video Processor Intel(R) HD Graphics Family
System GPU info:
GPU 3D Usage 9%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
Module 'Object Detection (YOLOv5 6.2)' 1.9.1 (ID: ObjectDetectionYOLOv5-6.2)
Valid: True
Module Path: <root>\modules\ObjectDetectionYOLOv5-6.2
Module Location: Internal
AutoStart: True
Queue: objectdetection_queue
Runtime: python3.7
Runtime Location: Shared
FilePath: detect_adapter.py
Start pause: 1 sec
Parallelism: 0
LogVerbosity:
Platforms: all,!raspberrypi,!jetson
GPU Libraries: installed if available
GPU: use if supported
Accelerator:
Half Precision: enable
Environment Variables
APPDIR = <root>\modules\ObjectDetectionYOLOv5-6.2
CUSTOM_MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-6.2\custom-models
MODELS_DIR = <root>\modules\ObjectDetectionYOLOv5-6.2\assets
MODEL_SIZE = Medium
USE_CUDA = True
YOLOv5_AUTOINSTALL = false
YOLOv5_VERBOSE = false
Status Data: {
"inferenceDevice": "CPU",
"inferenceLibrary": "",
"canUseGPU": "false",
"successfulInferences": 65,
"failedInferences": 0,
"numInferences": 65,
"averageInferenceMs": 871.9076923076923
}
Started: 29 May 2024 7:52:34 AM Central Standard Time
LastSeen: 29 May 2024 8:04:21 AM Central Standard Time
Status: Started
Requests: 65 (includes status calls)
Installation Log
2024-05-29 07:08:20: Installing CodeProject.AI Analysis Module
2024-05-29 07:08:20: ======================================================================
2024-05-29 07:08:20: CodeProject.AI Installer
2024-05-29 07:08:20: ======================================================================
2024-05-29 07:08:20: 288.3Gb of 487Gb available on
2024-05-29 07:08:21: General CodeProject.AI setup
2024-05-29 07:08:21: Creating Directories...done
2024-05-29 07:08:21: GPU support
2024-05-29 07:08:21: CUDA Present...No
2024-05-29 07:08:21: ROCm Present...No
2024-05-29 07:08:22: Checking for .NET 7.0...Checking SDKs...Upgrading: .NET is 0
2024-05-29 07:08:22: Current version is 0. Installing newer version.
2024-05-29 07:08:22: 'winget' is not recognized as an internal or external command,
2024-05-29 07:08:22: operable program or batch file.
2024-05-29 07:08:24: Reading ObjectDetectionYOLOv5-6.2 settings.......done
2024-05-29 07:08:24: Installing module Object Detection (YOLOv5 6.2) 1.9.1
2024-05-29 07:08:24: Installing Python 3.7
2024-05-29 07:08:32: Downloading Python 3.7 interpreter...Expanding...done.
2024-05-29 07:08:42: Creating Virtual Environment (Shared)...done
2024-05-29 07:08:42: Confirming we have Python 3.7 in our virtual environment...present
2024-05-29 07:09:24: Downloading Standard YOLO models...Expanding...done.
2024-05-29 07:09:25: Copying contents of models-yolo5-pt.zip to assets...done
2024-05-29 07:10:23: Downloading Custom YOLO models...Expanding...done.
2024-05-29 07:10:24: Copying contents of custom-models-yolo5-pt.zip to custom-models...done
2024-05-29 07:10:24: Installing Python packages for Object Detection (YOLOv5 6.2)
2024-05-29 07:10:24: [0;Installing GPU-enabled libraries: If available
2024-05-29 07:10:25: Ensuring Python package manager (pip) is installed...done
2024-05-29 07:10:35: Ensuring Python package manager (pip) is up to date...done
2024-05-29 07:10:35: Python packages specified by requirements.txt
2024-05-29 07:10:37: - Installing urllib3, the HTTP client for Python...(✅ checked) done
2024-05-29 07:10:51: - Installing Pandas, a data analysis / data manipulation tool...(✅ checked) done
2024-05-29 07:11:42: - Installing CoreMLTools, for working with .mlmodel format models...(✅ checked) done
2024-05-29 07:11:49: - Installing OpenCV, the Open source Computer Vision library...(✅ checked) done
2024-05-29 07:11:53: - Installing Pillow, a Python Image Library...(✅ checked) done
2024-05-29 07:12:04: - Installing SciPy, a library for mathematics, science, and engineering...(✅ checked) done
2024-05-29 07:12:05: - Installing PyYAML, a library for reading configuration files...Already installed
2024-05-29 07:12:30: - Installing PyTorch, for Tensor computation and Deep neural networks...(✅ checked) done
2024-05-29 07:13:39: - Installing TorchVision, for Computer Vision based AI...(✅ checked) done
2024-05-29 07:15:24: - Installing Ultralytics YoloV5 package for object detection in images...(✅ checked) done
2024-05-29 07:15:26: - Installing Seaborn, a data visualization library based on matplotlib...Already installed
2024-05-29 07:15:26: Installing Python packages for the CodeProject.AI Server SDK
2024-05-29 07:15:28: Ensuring Python package manager (pip) is installed...done
2024-05-29 07:15:31: Ensuring Python package manager (pip) is up to date...done
2024-05-29 07:15:31: Python packages specified by requirements.txt
2024-05-29 07:15:33: - Installing Pillow, a Python Image Library...Already installed
2024-05-29 07:15:34: - Installing Charset normalizer...Already installed
2024-05-29 07:15:40: - Installing aiohttp, the Async IO HTTP library...(✅ checked) done
2024-05-29 07:15:43: - Installing aiofiles, the Async IO Files library...(✅ checked) done
2024-05-29 07:15:46: - Installing py-cpuinfo to allow us to query CPU info...(✅ checked) done
2024-05-29 07:15:48: - Installing Requests, the HTTP library...Already installed
2024-05-29 07:15:48: Scanning modulesettings for downloadable models...No models specified
2024-05-29 07:15:54: Fusing layers...
2024-05-29 07:15:55: YOLOv5.1m summary: 391 layers, 21805053 parameters, 0 gradients
2024-05-29 07:15:55: Adding AutoShape...
2024-05-29 07:15:56: Self test: Self-test passed
2024-05-29 07:15:56: Module setup time 00:07:33.99
2024-05-29 07:15:56: Setup complete
2024-05-29 07:15:56: Total setup time 00:07:35.51
Installer exited with code 0
I upgraded from CPAI ver 2.5.6 to CPAI version 2.6.5.
I installed version 2.6.5 on both the Windows machine that runs Blue Iris and the Linux machine.
Nothing has changed regarding Blue Iris on the Windows machine.
When I check the Use custom models checkbox on the AI tab, and restart the Blue Iris service, the custom models listbox does not populate.
This occurs when I have the Blue Iris AI pointed to the localhost and the linux machine.
Clicking the open AI dashboard link on the AI tab in Blue Iris opens the dashboard on either machine.
Selecting Default object detection on either machine works without issue. Only use custom models does not work.
Restarting the Blue Iris service has always been my go to to populate this listbox, as I believe it forces Blue Iris to call this from the API reference:
POST: http:
In earliar versions, when I would restart the Blue Iris server service, I would see the list call in the CPAI server log.
In this version of CPAI (2.6.5) I do not see that call anywhere in the log.
Again, I did not change anything in Blue Iris since I installed the last stable version on about 5/2/2024.
Before I installed version 2.6.5 this morning, the listbox was being populated.
My understanding is that this will keep Blue Iris from using custom models.
I have restarted the Blue Iris server service and rebooted the Blue Iris machine multiple times with no good results.
It seems that I will need to roll back CPAI to version 2.5.6 to regain the custom models functionality.
|
|
|
|
|
Can you try hitting Ctrl+F5 on the dashboard just to ensure there's no browser caching issues?
cheers
Chris Maunder
|
|
|
|
|
|
After doing Ctrl-F5 in the browser on each machine. Windows and Linux
Works on the Windows machine (localhost) but not on the Linux machine.
With Use AI server on IP port: Localhost
Restart BI Service
Listbox populates.
With Use AI service on IP port: 192.168.1.27 (the Linux machine)
Restart BI service
Listbox is blank
Can you run the POST: http://localhost:32168/v1/vision/custom/list command from a browser?
Or do you need to use a programming language?
Just to see if it works. I've never tried it.
|
|
|
|
|
Postman is your friend!
Do a POST to localhost:32168/v1/vision/custom/list:
{
"success": true,
"models": [
"ipcam-combined",
"license-plate",
"actionnetv2",
"ipcam-dark",
"ipcam-animal",
"ipcam-general"
],
"moduleId": "ObjectDetectionYOLOv5-6.2",
"moduleName": "Object Detection (YOLOv5 6.2)",
"code": 200,
"command": "list-custom",
"requestId": "35ead6ed-6eb8-4a5b-b7da-45833de826bc",
"inferenceDevice": "CPU",
"analysisRoundTripMs": 24668,
"processedBy": "localhost",
"timestampUTC": "Thu, 30 May 2024 16:39:59 GMT"
}
cheers
Chris Maunder
|
|
|
|
|
Then found that Blue Iris was doing nothing. All nothing found, no listbox contents.
Had to reboot the machine again.
|
|
|
|
|
I have a Dell PC with Blue Iris and CPAI for motion detection. It has been running very good with the Intel UHD 630 display adapter in DirectML mode until 2.6.2 version. I use .NET model.
The symptom is that after a random amount of time objects are no more detected. The only evidence I see in the logs is that the processing times pass from 150-200ms to 10-40ms ... No crash of the server.
License Plates reader stops as well. Same behavior with custom models.. Is there something I can investigate?
Thank you
|
|
|
|
|
Thanks very much for your report. Could you please share your System Info tab from your CodeProject.AI Server dashboard? Also, could you please share the logs from CodeProject.AI Server when the detections simply stop? And, when they do, are you able to still do a manual detection from the CodeProject.AI Server Explorer?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Hi Thanks for coming back. Here's the System Info:
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 11 version 10.0.22631)
CPUs: Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (Intel)
1 CPU x 8 cores. 8 logical processors (x64)
GPU (Primary): Microsoft Remote Display Adapter (Microsoft)
Driver: 10.0.22621.3593
System RAM: 16 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.5
.NET SDK: Not found
Default Python: 3.10.6
Go: Not found
NodeJS: 18.16.1
Rust: Not found
Video adapter info:
Microsoft Remote Display Adapter:
Driver Version 10.0.22621.3593
Video Processor
Intel(R) UHD Graphics 630:
Driver Version 30.0.101.1692
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
In the logs there is nothing , just a reduction of ms in precessing the request. No errors. Don't know if there are more verbose logs stored somewhere on the disk.
Will try to use the explorer as soon as it happens again.
Thank you.
|
|
|
|
|
If you open the CodeProject.AI Explorer and try object detection on an image there, does it work?
cheers
Chris Maunder
|
|
|
|
|
Noticed Object Detection (Coral) wouldn't start on upgrade to 2.6.5 (docker install)
Uninstalled module and reinstalled only to receive below.
Not seeing anything in logs. Only error seen in GUI as follows.
Error in Install ObjectDetectionCoral: 404
Moving back to 2.6.2 allowed reinstall of module.
Logs at startup ..
Creating runtimes path '/app/runtimes'
Creating downloaded models path '/app/downloads/models'
Debug Settings file: /app/server/installmodules.json exists: False
Infor ** System: Docker (486afa18b838)
Infor ** Operating System: Linux (Ubuntu 22.04)
Infor ** CPUs: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (Intel)
Infor ** 1 CPU x 2 cores. 4 logical processors (x64)
Infor ** System RAM: 8 GiB
Infor ** Platform: Linux
Infor ** BuildConfig: Release
Infor ** Execution Env: Docker
Infor ** Runtime Env: Production
Infor ** Runtimes installed:
Infor ** .NET runtime: 7.0.19
Infor ** .NET SDK: Not found
Infor ** Default Python: 3.10.12
Infor ** Go: Not found
Infor ** NodeJS: Not found
Infor ** Rust: Not found
Infor ** App DataDir: /etc/codeproject/ai
Infor Video adapter info:
Infor *** STARTING CODEPROJECT.AI SERVER
Infor RUNTIMES_PATH = /app/runtimes
Infor PREINSTALLED_MODULES_PATH = /app/preinstalled-modules
Infor DEMO_MODULES_PATH = /app/src/demos/modules
Infor EXTERNAL_MODULES_PATH =
Infor MODULES_PATH = /app/modules
Infor PYTHON_PATH = /bin/linux/%PYTHON_NAME%/venv/bin/python3
Infor Data Dir = /etc/codeproject/ai
Infor ** Server version: 2.6.5
Server is listening on port 32168
Server is also listening on legacy port 5000
Trace ModuleRunner Start
Trace Starting Background AI Modules
Warni Overriding address(es) 'http://+:32168, http://+:5000'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead.
Debug Current Version is 2.6.5
Infor Server: This is the latest version
Trace Client request 'alpr' in queue 'alpr_queue' (#reqid 2d9fd17f-a60c-4136-9b82-a9708c64e4c9)
Trace Client request 'alpr' in queue 'alpr_queue' (#reqid ef21cad0-f907-4f66-847e-308200dae696)
Trace Client request 'alpr' in queue 'alpr_queue' (#reqid 28aa08ed-eae4-44b7-bbf7-c4766b533db4)
|
|
|
|
|
having the same issue. Except I don't know how to revert back to 2.6.2 (running as a docker in unRaid), so hopefully there is a fix soon!
|
|
|
|
|
Not sure where you set configuration for image, but look for
image: codeproject/ai-server:latest
and change it to
image: codeproject/ai-server:2.6.2
|
|
|
|
|
Thanks very much for your report. Could you please share your System Info tab from your CodeProject.AI Server dashboard?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Server version: 2.6.5
System: Docker (d1e1925ba47f)
Operating System: Linux (Ubuntu 22.04)
CPUs: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (Intel)
1 CPU x 2 cores. 4 logical processors (x64)
System RAM: 8 GiB
Platform: Linux
BuildConfig: Release
Execution Env: Docker
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.19
.NET SDK: Not found
Default Python: 3.10.12
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
System GPU info:
GPU 3D Usage 0%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|
After 2.6.5 upgrade, starting the module shows these errors..
22:15:19:Started Object Detection (Coral) module
22:15:21:objectdetection_coral_adapter.py: Exception ignored in:
22:15:21:objectdetection_coral_adapter.py: Traceback (most recent call last):
22:15:21:objectdetection_coral_adapter.py: File "/app/modules/ObjectDetectionCoral/bin/linux/python39/venv/lib/python3.9/site-packages/tflite_runtime/interpreter.py", line 124, in __del__
22:15:21:objectdetection_coral_adapter.py: if self._library is not None:
22:15:21:objectdetection_coral_adapter.py: AttributeError: 'Delegate' object has no attribute '_library'
22:15:21:objectdetection_coral_adapter.py: An exception occurred initialising the module: libedgetpu.so.1: cannot open shared object file: No such file or directory
22:15:22:Object Detection (Coral): [ImportError] : Error during main_loop: Traceback (most recent call last):
File "/app/modules/ObjectDetectionCoral/../../SDK/Python/module_runner.py", line 576, in main_loop
output = await callbacktask
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/app/modules/ObjectDetectionCoral/objectdetection_coral_adapter.py", line 107, in process
response = self._do_detection(img, threshold)
File "/app/modules/ObjectDetectionCoral/objectdetection_coral_adapter.py", line 179, in _do_detection
from objectdetection_coral_singletpu import do_detect
File "/app/modules/ObjectDetectionCoral/objectdetection_coral_singletpu.py", line 65, in
from pycoral.utils.edgetpu import make_interpreter
File "/app/modules/ObjectDetectionCoral/bin/linux/python39/venv/lib/python3.9/site-packages/pycoral/utils/edgetpu.py", line 24, in
from pycoral.pybind._pywrap_coral import GetRuntimeVersion as get_runtime_version
ImportError: libedgetpu.so.1: cannot open shared object file: No such file or directory
|
|
|
|
|
Thanks very much for that. What command line did you run to setup CodeProject.AI Server / what parameters did you use?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Fresh install of 2.6.5. Getting this error when starting a Large YoloV8 Model with Coral. It seemingly works fine but switches over from TPU to CPU silently off and on (even though the error states it's using CPU)
00:43:45:Module 'Object Detection (Coral)' 2.2.2 (ID: ObjectDetectionCoral)
00:43:45:Valid: True
00:43:45:Module Path: <root>\modules\ObjectDetectionCoral
00:43:45:Module Location: Internal
00:43:45:AutoStart: True
00:43:45:Queue: objectdetection_queue
00:43:45:Runtime: python3.9
00:43:45:Runtime Location: Local
00:43:45:FilePath: objectdetection_coral_adapter.py
00:43:45:Start pause: 1 sec
00:43:45:Parallelism: 16
00:43:45:LogVerbosity:
00:43:45:Platforms: all
00:43:45:GPU Libraries: installed if available
00:43:45:GPU: use if supported
00:43:45:Accelerator:
00:43:45:Half Precision: enable
00:43:45:Environment Variables
00:43:45:CPAI_CORAL_MODEL_NAME = YOLOv8
00:43:45:CPAI_CORAL_MULTI_TPU = True
00:43:45:MODELS_DIR = <root>\modules\ObjectDetectionCoral\assets
00:43:45:MODEL_SIZE = large
00:43:45:
00:43:45:Started Object Detection (Coral) module
00:43:47:objectdetection_coral_adapter.py: TPU detected
00:43:47:objectdetection_coral_adapter.py: Attempting multi-TPU initialisation
00:43:47:objectdetection_coral_adapter.py: Supporting multiple Edge TPUs
00:46:30:objectdetection_coral_adapter.py: ERROR:root:TFLite file C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\assets\tf2_ssd_mobilenet_v1_fpn_640x640_coco17_ptq_segment_0_of_2_edgetpu.tflite doesn't exist
00:46:30:objectdetection_coral_adapter.py: WARNING:root:Model file not found: [Errno 2] No such file or directory: 'C:\\Program Files\\CodeProject\\AI\\modules\\ObjectDetectionCoral\\assets\\tf2_ssd_mobilenet_v1_fpn_640x640_coco17_ptq_segment_0_of_2_edgetpu.tflite'
00:46:30:objectdetection_coral_adapter.py: WARNING:root:No Coral TPUs found or able to be initialized. Using CPU.
00:46:30:objectdetection_coral_adapter.py: WARNING:root:Unable to load delegate for TPU cpu: Failed to load delegate from edgetpu.dll
00:46:30:objectdetection_coral_adapter.py: WARNING:root:Unable to create interpreter for CPU using edgeTPU library: cpu
00:46:30:objectdetection_coral_adapter.py: ERROR:root:TFLite file C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\assets\tf2_ssd_mobilenet_v1_fpn_640x640_coco17_ptq_segment_0_of_2_edgetpu.tflite doesn't exist
00:46:30:objectdetection_coral_adapter.py: WARNING:root:Model file not found: [Errno 2] No such file or directory: 'C:\\Program Files\\CodeProject\\AI\\modules\\ObjectDetectionCoral\\assets\\tf2_ssd_mobilenet_v1_fpn_640x640_coco17_ptq_segment_0_of_2_edgetpu.tflite'
00:46:30:objectdetection_coral_adapter.py: WARNING:root:No Coral TPUs found or able to be initialized. Using CPU.
00:46:30:objectdetection_coral_adapter.py: WARNING:root:Unable to load delegate for TPU cpu: Failed to load delegate from edgetpu.dll
00:4
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 11 version 10.0.22631)
CPUs: AMD Ryzen 9 3950X 16-Core Processor (AMD)
1 CPU x 16 cores. 32 logical processors (x64)
GPU (Primary): NVIDIA GeForce RTX 3060 (12 GiB) (NVIDIA)
Driver: 555.85, CUDA: 12.2.140 (up to: 12.5), Compute: 8.6, cuDNN: 8.5
System RAM: 64 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 8.0.3
.NET SDK: 8.0.203
Default Python: Not found
Go: Not found
NodeJS: 21.7.2
Rust: Not found
Video adapter info:
NVIDIA GeForce RTX 3060:
Driver Version 32.0.15.5585
Video Processor NVIDIA GeForce RTX 3060
System GPU info:
GPU 3D Usage 31%
GPU RAM Usage 6.3 GiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|