|
sc delete "CodeProject AI Server" will not delete the service name with spaces in it.
I went to the registry key and deleted the key...
|
|
|
|
|
If you put it between quotes and type EXACTLY as-is, then it works. That's how I got to remove the extra service.
|
|
|
|
|
According to API Reference - CodeProject.AI Server v2.1.11[^]
The response should be:
{
"success": (Boolean)
"predictions": (Object)
"inferenceMs": (int)
"processMs" : (int)
"analysisRoundTripMs": (int)
}
But instead with 2.2.2 I get:
laptop
chair
chair
chair
sink
chair
chair
chair
clock
chair
cat
chair
{'message': 'Found laptop, chair, chair...', 'count': 12, 'predictions': [{'confidence': 0.4091796875, 'label': 'laptop', 'x_min': 978, 'y_min': 130, 'x_max': 1058, 'y_max': 198}, {'confidence':
0.410888671875, 'label': 'chair', 'x_min': 977, 'y_min': 130, 'x_max': 1059, 'y_max': 199}, {'confidence': 0.41455078125, 'label': 'chair', 'x_min': 868, 'y_min': 125, 'x_max': 937, 'y_max': 17
4}, {'confidence': 0.505859375, 'label': 'chair', 'x_min': 0, 'y_min': 696, 'x_max': 465, 'y_max': 1068}, {'confidence': 0.55029296875, 'label': 'sink', 'x_min': 1659, 'y_min': 525, 'x_max': 179
4, 'y_max': 610}, {'confidence': 0.55908203125, 'label': 'chair', 'x_min': 1044, 'y_min': 151, 'x_max': 1159, 'y_max': 233}, {'confidence': 0.6064453125, 'label': 'chair', 'x_min': 771, 'y_min':
147, 'x_max': 885, 'y_max': 279}, {'confidence': 0.60986328125, 'label': 'chair', 'x_min': 609, 'y_min': 197, 'x_max': 813, 'y_max': 417}, {'confidence': 0.60986328125, 'label': 'clock', 'x_min
': 242, 'y_min': 37, 'x_max': 310, 'y_max': 175}, {'confidence': 0.7333984375, 'label': 'chair', 'x_min': 1046, 'y_min': 172, 'x_max': 1193, 'y_max': 345}, {'confidence': 0.798828125, 'label': '
cat', 'x_min': 636, 'y_min': 432, 'x_max': 1054, 'y_max': 746}, {'confidence': 0.814453125, 'label': 'chair', 'x_min': 874, 'y_min': 172, 'x_max': 1023, 'y_max': 356}], 'success': True, 'process
Ms': 113, 'inferenceMs': 104, 'code': 200, 'command': 'detect', 'moduleId': 'ObjectDetectionYolo', 'executionProvider': 'CUDA', 'analysisRoundTripMs': 156}
And is Probably why Blue Iris is throwing 200 errors.
|
|
|
|
|
How are you seeing that (ie what tool are you using?). When I do a raw dump using text() in the Explorer, I get
{
"message":"Found car",
"count":1,
"predictions": [{
"label":"car",
"confidence":0.5860529,
"y_min":1,
"x_min":622,
"y_max":89,
"x_max":770} ],
"success":true,
"code":200,
"command":"detect",
"moduleId":"ObjectDetectionNet",
"executionProvider":"CPU",
"canUseGPU":true,
"inferenceMs":219,
"processMs":219,
"analysisRoundTripMs":226
}
The docs need updating, for sure, but I'm not seeing the labels at the start of the package. Which module are you using?
cheers
Chris Maunder
|
|
|
|
|
I am just using the example from the API doc - just realized why there is a diff - sorry:
import requests
image_data = open("my_image.jpg","rb").read()
response = requests.post("http://localhost:32168/v1/vision/detection",
files={"image":image_data}).json()
for object in response["predictions"]:
print(object["label"])
print(response)
commenting out the "for object" part gives as expected (I think):
{'message': 'Found laptop, chair, chair...', 'count': 12, 'predictions': [{'confidence': 0.4091796875, 'label': 'laptop', 'x_min': 978, 'y_min': 130, 'x_max': 1058, 'y_max': 198}, {'confidence':
0.410888671875, 'label': 'chair', 'x_min': 977, 'y_min': 130, 'x_max': 1059, 'y_max': 199}, {'confidence': 0.41455078125, 'label': 'chair', 'x_min': 868, 'y_min': 125, 'x_max': 937, 'y_max': 17
4}, {'confidence': 0.505859375, 'label': 'chair', 'x_min': 0, 'y_min': 696, 'x_max': 465, 'y_max': 1068}, {'confidence': 0.55029296875, 'label': 'sink', 'x_min': 1659, 'y_min': 525, 'x_max': 179
4, 'y_max': 610}, {'confidence': 0.55908203125, 'label': 'chair', 'x_min': 1044, 'y_min': 151, 'x_max': 1159, 'y_max': 233}, {'confidence': 0.6064453125, 'label': 'chair', 'x_min': 771, 'y_min':
147, 'x_max': 885, 'y_max': 279}, {'confidence': 0.60986328125, 'label': 'chair', 'x_min': 609, 'y_min': 197, 'x_max': 813, 'y_max': 417}, {'confidence': 0.60986328125, 'label': 'clock', 'x_min
': 242, 'y_min': 37, 'x_max': 310, 'y_max': 175}, {'confidence': 0.7333984375, 'label': 'chair', 'x_min': 1046, 'y_min': 172, 'x_max': 1193, 'y_max': 345}, {'confidence': 0.798828125, 'label': '
cat', 'x_min': 636, 'y_min': 432, 'x_max': 1054, 'y_max': 746}, {'confidence': 0.814453125, 'label': 'chair', 'x_min': 874, 'y_min': 172, 'x_max': 1023, 'y_max': 356}], 'success': True, 'process
Ms': 123, 'inferenceMs': 113, 'code': 200, 'command': 'detect', 'moduleId': 'ObjectDetectionYolo', 'executionProvider': 'CUDA', 'analysisRoundTripMs': 183}
|
|
|
|
|
OK, that makes sense. With a JSON object, the ordering of properties doesn't matter, and the presence of extra properties should also not matter. They are typically just ignored. JSON is pretty chill.
cheers
Chris Maunder
|
|
|
|
|
BI log shows:
9/17/2023 11:03:39.291 AM <Camera Name> AI: error 200
9/17/2023 11:03:39.298 AM <Camera Name> AI: Alert canceled [AI: non-JSON response] 248ms
Error comes up when using both Object Detection (YOLOv5 .NET) and Object Detection (YOLOv5 6.2). The CPAI server log shows the detected objects but BI apparently has no idea what to do with the data it receives.
11:03:38:Object Detection (YOLOv5 .NET): Command completed in 202 ms.
11:03:38:Response received (...dbc60b): Found motorcycle, car
11:03:38:Client request 'detect' in queue 'objectdetection_queue' (...d0cba4)
11:03:38:Request 'detect' dequeued from 'objectdetection_queue' (...d0cba4)
11:03:38:Response received (...d0cba4): Found car
11:03:38:Object Detection (YOLOv5 .NET): Command completed in 242 ms.
11:03:39:Client request 'detect' in queue 'objectdetection_queue' (...9839a6)
11:03:39:Request 'detect' dequeued from 'objectdetection_queue' (...9839a6)
11:03:39:Object Detection (YOLOv5 .NET): Command completed in 197 ms.
11:03:39:Response received (...9839a6): Found car
|
|
|
|
|
Are you running the latest Blue Iris?
cheers
Chris Maunder
|
|
|
|
|
Running BI 5.7.9.10
|
|
|
|
|
Great, thanks for that
cheers
Chris Maunder
|
|
|
|
|
We found a regression in sending the responses to Blue Iris and have a fix that will be deployed very shortly.
"Mistakes are prevented by Experience. Experience is gained by making mistakes."
|
|
|
|
|
2.2.2 installs over 2.2.1 with one hitch. The service name change leaves the old service in place...
|
|
|
|
|
Yes - we just spotted this.
For now, open a command prompt with elevated privileges and type
sc delete CodeProject.AI-Server
cheers
Chris Maunder
|
|
|
|
|
Yep, did that.
side note: I have not been able to have the service start automatically with any version...
|
|
|
|
|
Have you gone into the Windows services app and checked the settings?
Can you run the CodeProject.AI Server manually (just double clicking the exe)?
Which OS?
cheers
Chris Maunder
|
|
|
|
|
I should have clarified. Service starts just fine manually. It is set to automatic. I can run the exe just fine.
The service has never started automatically on any version. It is a minor issue.
Also, sort order and additions to the json response do not affect my HomeSeer plugin because I parse the json correctly. I do like the extra info returned. More would be better for my use case.
|
|
|
|
|
I'm a data nerd and a control freak. The more info I get, the calmer I am.
Let me know if there's anything else I can add to make life easier. I wish I had a suggestion for the service issue.
cheers
Chris Maunder
|
|
|
|
|
You guys are doing fine. You have made life easier already. A functional addition to home automation.
Software is hard sometimes. There will be bugs and typos. Just the way it is.
ObjectDetectionYolo/requirements.txt -> "In case you were morbidly curious:"
Says it all as to the efforts put into this program.
Thank you again...
|
|
|
|
|
We'll have a 2.2.3 out tonight or tomorrow morning. It's the weekend here so resources are stretched a little thin.
cheers
Chris Maunder
|
|
|
|
|
I learned long ago never to release anything on a Friday.
|
|
|
|
|
cheers
Chris Maunder
|
|
|
|
|
Grabbing now, thanks for all your guys hard work this weekend, was way above and beyond.
|
|
|
|
|
I've tried completely uninstalling (ensuring folders deleted) and re-installing twice and the module installer for Coral gets stuck on "12:47:40: ObjectDetectionCoral: Installing UsbDk" both times. Manually running the install.bat does not help anything. If I restart the service while its hung the Coral module will show up as a failed install and it is also not uninstallable.
Server version: 2.2.2-Beta
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i7-5960X CPU @ 3.00GHz (Intel)
1 CPU x 8 cores. 16 logical processors (x64)
GPU: NVIDIA GeForce GTX 1080 Ti (11 GiB) (NVIDIA)
Driver: 536.67 CUDA: 11.3.109 (max supported: 12.2) Compute: 6.1
System RAM: 64 GiB
Target: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
.NET framework: .NET 7.0.5
Video adapter info:
NVIDIA GeForce GTX 1080 Ti:
Driver Version 31.0.15.3667
Video Processor NVIDIA GeForce GTX 1080 Ti
System GPU info:
GPU 3D Usage 98%
GPU RAM Usage 7 GiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
12:07:11:Operating System: Windows (Microsoft Windows 10.0.19045)
12:07:11:CPUs: Intel(R) Core(TM) i7-5960X CPU @ 3.00GHz (Intel)
12:07:11: 1 CPU x 8 cores. 16 logical processors (x64)
12:07:11:GPU: NVIDIA GeForce GTX 1080 Ti (11 GiB) (NVIDIA)
12:07:11: Driver: 536.67 CUDA: 11.3.109 (max supported: 12.2) Compute: 6.1
12:07:11:System RAM: 64 GiB
12:07:11:Target: Windows
12:07:11:BuildConfig: Release
12:07:11:Execution Env: Native
12:07:11:Runtime Env: Production
12:07:11:.NET framework: .NET 7.0.5
12:07:11:App DataDir: C:\ProgramData\CodeProject\AI
12:07:11:Video adapter info:
12:07:11: NVIDIA GeForce GTX 1080 Ti:
12:07:11: Driver Version 31.0.15.3667
12:07:11: Video Processor NVIDIA GeForce GTX 1080 Ti
12:07:11:STARTING CODEPROJECT.AI SERVER
12:07:11:RUNTIMES_PATH = C:\Program Files\CodeProjec\AI\runtimes
12:07:11:PREINSTALLED_MODULES_PATH = C:\Program Files\CodeProjec\AI\preinstalled-modules
12:07:11:MODULES_PATH = C:\Program Files\CodeProjec\AI\modules
12:07:11:PYTHON_PATH = \bin\windows\%PYTHON_RUNTIME%\venv\scripts\Python
12:07:11:Data Dir = C:\ProgramData\CodeProject\AI
12:07:11:Server version: 2.2.2-Beta
12:07:11:ModuleRunner Start
12:07:12:Starting Background AI Modules
12:07:15:Setting up initial modules. Please be patient...
12:07:15:Installing initial module FaceProcessing.
12:07:15:Preparing to install module 'FaceProcessing'
12:07:15:Downloading module 'FaceProcessing'
12:07:15:Installing module 'FaceProcessing'
12:07:15:Installer script at 'C:\Program Files\CodeProjec\AI\setup.bat'
12:07:16:FaceProcessing: Installing CodeProject.AI Analysis Module
12:07:16:FaceProcessing: ========================================================================
12:07:16:FaceProcessing: CodeProject.AI Installer
12:07:16:FaceProcessing: ========================================================================
12:07:16:FaceProcessing: Checking GPU support
12:07:16:FaceProcessing: CUDA Present...True
12:07:16:FaceProcessing: Allowing GPU Support: Yes
12:07:16:FaceProcessing: Allowing CUDA Support: Yes
12:07:16:FaceProcessing: General CodeProject.AI setup
12:07:16:FaceProcessing: Creating Directories...Done
12:07:16:FaceProcessing: Processing Core SDK
12:07:16:FaceProcessing: Installing module FaceProcessing 1.7
12:07:17:Server: This is a new, unreleased version
12:07:17:Current Version is 2.2.2-Beta
12:07:22:FaceProcessing: Downloading Python 3.7 interpreter...Expanding...Done.
12:07:35:FaceProcessing: Creating Virtual Environment (Shared)...Done
12:07:35:FaceProcessing: Enabling our Virtual Environment...Done
12:07:36:FaceProcessing: Confirming we have Python 3.7...present
12:07:37:FaceProcessing: Ensuring Python package manager (pip) is installed...Done
12:07:44:FaceProcessing: Ensuring Python package manager (pip) is up to date...Done
12:07:44:FaceProcessing: Choosing Python packages from requirements.windows.cuda.txt
12:10:18:FaceProcessing: Installing Packages into Virtual Environment...Success
12:11:21:FaceProcessing: Downloading YOLO models...Expanding...Done.
12:11:21:FaceProcessing: Installing Server SDK support:
12:11:23:FaceProcessing: Ensuring Python package manager (pip) is installed...Done
12:11:24:FaceProcessing: Ensuring Python package manager (pip) is up to date...Done
12:11:24:FaceProcessing: Choosing Python packages from requirements.txt
12:11:31:FaceProcessing: Installing Packages into Virtual Environment...Success
12:11:31:FaceProcessing: Setup complete
12:11:31:Module FaceProcessing installed successfully.
12:11:31:GetCommandByRuntime: Runtime=python37, Location=Shared
12:11:31:Command: C:\Program Files\CodeProjec\AI\runtimes\bin\windows\python37\venv\scripts\Python
12:11:31:
12:11:31:Attempting to start FaceProcessing with C:\Program Files\CodeProjec\AI\runtimes\bin\windows\python37\venv\scripts\Python "C:\Program Files\CodeProjec\AI\modules\FaceProcessing\intelligencelayer\face.py"
12:11:31:
12:11:31:Module 'Face Processing' 1.7 (ID: FaceProcessing)
12:11:31:Module Path: C:\Program Files\CodeProjec\AI\modules\FaceProcessing
12:11:31:Starting C:\Program Files...ws\python37\venv\scripts\Python "C:\Program Files...ing\intelligencelayer\face.py"
12:11:31:AutoStart: True
12:11:31:Queue: faceprocessing_queue
12:11:31:Platforms: windows,linux,linux-arm64,macos,macos-arm64
12:11:31:GPU: Support enabled
12:11:31:Parallelism: 0
12:11:31:Accelerator:
12:11:31:Half Precis.: enable
12:11:31:Runtime: python37
12:11:31:Runtime Loc: Shared
12:11:31:FilePath: intelligencelayer\face.py
12:11:31:Pre installed: False
12:11:31:Start pause: 3 sec
12:11:31:LogVerbosity:
12:11:31:Valid: True
12:11:31:Environment Variables
12:11:31:APPDIR = %CURRENT_MODULE_PATH%\intelligencelayer
12:11:31:DATA_DIR = %DATA_DIR%
12:11:31:MODE = MEDIUM
12:11:31:MODELS_DIR = %CURRENT_MODULE_PATH%\assets
12:11:31:PROFILE = desktop_gpu
12:11:31:USE_CUDA = True
12:11:31:YOLOv5_AUTOINSTALL = false
12:11:31:YOLOv5_VERBOSE = false
12:11:31:
12:11:31:Started Face Processing module
12:11:31:Installer exited with code 0
12:11:31:Installing initial module ObjectDetectionNet.
12:11:31:Preparing to install module 'ObjectDetectionNet'
12:11:31:Downloading module 'ObjectDetectionNet'
12:11:31:Installing module 'ObjectDetectionNet'
12:11:31:Installer script at 'C:\Program Files\CodeProjec\AI\setup.bat'
12:11:32:ObjectDetectionNet: Installing CodeProject.AI Analysis Module
12:11:32:ObjectDetectionNet: ========================================================================
12:11:32:ObjectDetectionNet: CodeProject.AI Installer
12:11:32:ObjectDetectionNet: ========================================================================
12:11:32:ObjectDetectionNet: Checking GPU support
12:11:32:ObjectDetectionNet: CUDA Present...True
12:11:32:ObjectDetectionNet: Allowing GPU Support: Yes
12:11:32:ObjectDetectionNet: Allowing CUDA Support: Yes
12:11:32:ObjectDetectionNet: General CodeProject.AI setup
12:11:32:ObjectDetectionNet: Creating Directories...Done
12:11:32:ObjectDetectionNet: Processing Core SDK
12:11:32:ObjectDetectionNet: Installing module ObjectDetectionNet 1.6
12:11:34:Module FaceProcessing started successfully.
12:11:41:ObjectDetectionNet: Downloading ObjectDetectionNet module...Expanding...Done.
12:11:41:Running init for Face Processing
12:11:41:face.py: Vision AI services setup: Retrieving environment variables...
12:11:41:face.py: CPAI_MODULE_REQUIRED_MB not found. Setting to default 0
12:11:41:face.py: GPU in use: NVIDIA GeForce GTX 1080 Ti
12:11:41:face.py: USE_MPS not found. Setting to default True
12:11:41:face.py: APPDIR: C:\Program Files\CodeProjec\AI\modules\FaceProcessing\intelligencelayer
12:11:41:face.py: PROFILE: desktop_gpu
12:11:41:face.py: USE_CUDA: True
12:11:41:face.py: DATA_DIR: C:\ProgramData\CodeProject\AI
12:11:41:face.py: MODELS_DIR: C:\Program Files\CodeProjec\AI\modules\FaceProcessing\assets
12:11:41:face.py: MODE: MEDIUM
12:11:41:Face Processing: Face Processing started.
12:12:11:ObjectDetectionNet: Downloading YOLO ONNX models...Expanding...Done.
12:12:28:ObjectDetectionNet: Downloading Custom YOLO ONNX models...Expanding...Done.
12:12:28:ObjectDetectionNet: Setup complete
12:12:28:Module ObjectDetectionNet installed successfully.
12:12:28:Module ObjectDetectionNet not configured to AutoStart.
12:12:28:Installer exited with code 0
12:12:28:Installing initial module ObjectDetectionYolo.
12:12:28:Preparing to install module 'ObjectDetectionYolo'
12:12:28:Downloading module 'ObjectDetectionYolo'
12:12:28:Installing module 'ObjectDetectionYolo'
12:12:28:Installer script at 'C:\Program Files\CodeProjec\AI\setup.bat'
12:12:29:ObjectDetectionYolo: Installing CodeProject.AI Analysis Module
12:12:29:ObjectDetectionYolo: ========================================================================
12:12:29:ObjectDetectionYolo: CodeProject.AI Installer
12:12:29:ObjectDetectionYolo: ========================================================================
12:12:29:ObjectDetectionYolo: Checking GPU support
12:12:29:ObjectDetectionYolo: CUDA Present...True
12:12:29:ObjectDetectionYolo: Allowing GPU Support: Yes
12:12:29:ObjectDetectionYolo: Allowing CUDA Support: Yes
12:12:29:ObjectDetectionYolo: General CodeProject.AI setup
12:12:29:ObjectDetectionYolo: Creating Directories...Done
12:12:29:ObjectDetectionYolo: Processing Core SDK
12:12:29:ObjectDetectionYolo: Installing module ObjectDetectionYolo 1.6.1
12:12:29:ObjectDetectionYolo: Checking for python37 download...Present
12:12:29:ObjectDetectionYolo: Creating Virtual Environment (Shared)...Python 3.7 Already present
12:12:29:ObjectDetectionYolo: Enabling our Virtual Environment...Done
12:12:29:ObjectDetectionYolo: Confirming we have Python 3.7...present
12:12:31:ObjectDetectionYolo: Ensuring Python package manager (pip) is installed...Done
12:12:32:ObjectDetectionYolo: Ensuring Python package manager (pip) is up to date...Done
12:12:32:ObjectDetectionYolo: Choosing Python packages from requirements.windows.cuda.txt
12:16:09:ObjectDetectionYolo: Installing Packages into Virtual Environment...Success
12:16:29:ObjectDetectionYolo: Downloading Standard YOLO models...Expanding...Done.
12:16:56:ObjectDetectionYolo: Downloading Custom YOLO models...Expanding...Done.
12:16:56:ObjectDetectionYolo: Installing Server SDK support:
12:16:58:ObjectDetectionYolo: Ensuring Python package manager (pip) is installed...Done
12:16:59:ObjectDetectionYolo: Ensuring Python package manager (pip) is up to date...Done
12:16:59:ObjectDetectionYolo: Choosing Python packages from requirements.txt
12:17:06:ObjectDetectionYolo: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
12:17:06:ObjectDetectionYolo: botocore 1.31.49 requires urllib3<1.27,>=1.25.4, but you have urllib3 2.0.4 which is incompatible.
12:17:06:ObjectDetectionYolo: google-auth 2.23.0 requires urllib3<2.0, but you have urllib3 2.0.4 which is incompatible.
12:17:07:ObjectDetectionYolo: Installing Packages into Virtual Environment...Success
12:17:07:ObjectDetectionYolo: Setup complete
12:17:07:Module ObjectDetectionYolo installed successfully.
12:17:07:GetCommandByRuntime: Runtime=python37, Location=Shared
12:17:07:Command: C:\Program Files\CodeProjec\AI\runtimes\bin\windows\python37\venv\scripts\Python
12:17:07:Starting C:\Program Files...ws\python37\venv\scripts\Python "C:\Program Files...tectionYolo\detect_adapter.py"
12:17:07:
12:17:07:Attempting to start ObjectDetectionYolo with C:\Program Files\CodeProjec\AI\runtimes\bin\windows\python37\venv\scripts\Python "C:\Program Files\CodeProjec\AI\modules\ObjectDetectionYolo\detect_adapter.py"
12:17:07:
12:17:07:Module 'Object Detection (YOLOv5 6.2)' 1.6.1 (ID: ObjectDetectionYolo)
12:17:07:Module Path: C:\Program Files\CodeProjec\AI\modules\ObjectDetectionYolo
12:17:07:AutoStart: True
12:17:07:Queue: objectdetection_queue
12:17:07:Platforms: all
12:17:07:GPU: Support enabled
12:17:07:Parallelism: 0
12:17:07:Accelerator:
12:17:07:Half Precis.: enable
12:17:07:Runtime: python37
12:17:07:Runtime Loc: Shared
12:17:07:FilePath: detect_adapter.py
12:17:07:Pre installed: False
12:17:07:Start pause: 1 sec
12:17:07:LogVerbosity:
12:17:07:Valid: True
12:17:07:Environment Variables
12:17:07:APPDIR = %CURRENT_MODULE_PATH%
12:17:07:CUSTOM_MODELS_DIR = %CURRENT_MODULE_PATH%/custom-models
12:17:07:MODELS_DIR = %CURRENT_MODULE_PATH%/assets
12:17:07:MODEL_SIZE = Medium
12:17:07:USE_CUDA = True
12:17:07:YOLOv5_AUTOINSTALL = false
12:17:07:YOLOv5_VERBOSE = false
12:17:07:
12:17:07:Started Object Detection (YOLOv5 6.2) module
12:17:07:Installer exited with code 0
12:17:08:Module ObjectDetectionYolo started successfully.
12:17:12:detect_adapter.py: CPAI_MODULE_REQUIRED_MB not found. Setting to default 0
12:17:12:detect_adapter.py: APPDIR: C:\Program Files\CodeProjec\AI\modules\ObjectDetectionYolo
12:17:12:detect_adapter.py: MODEL_SIZE: medium
12:17:12:detect_adapter.py: MODELS_DIR: C:\Program Files\CodeProjec\AI\modules\ObjectDetectionYolo\assets
12:17:12:Running init for Object Detection (YOLOv5 6.2)
12:17:12:Object Detection (YOLOv5 6.2): Object Detection (YOLOv5 6.2) started.
12:44:39:Sending shutdown request to python/ObjectDetectionYolo
12:44:39:Request 'Quit' dequeued from 'objectdetection_queue' (...f6c22a)
12:44:39:Client request 'Quit' in queue 'objectdetection_queue' (...f6c22a)
12:44:39:Object Detection (YOLOv5 6.2): Retrieved objectdetection_queue command
12:44:40:Sending shutdown request to python/FaceProcessing
12:44:40:Client request 'Quit' in queue 'faceprocessing_queue' (...4eef89)
12:44:40:Request 'Quit' dequeued from 'faceprocessing_queue' (...4eef89)
12:44:40:Face Processing: Retrieved faceprocessing_queue command
12:44:44:Module FaceProcessing has shutdown
12:44:44:face.py: has exited
12:44:44:Module ObjectDetectionYolo has shutdown
12:44:44:detect_adapter.py: has exited
12:45:12:ObjectDetectionYolo went quietly
12:45:13:FaceProcessing went quietly
12:47:07:Preparing to install module 'ObjectDetectionCoral'
12:47:07:Downloading module 'ObjectDetectionCoral'
12:47:07:Installing module 'ObjectDetectionCoral'
12:47:07:Installer script at 'C:\Program Files\CodeProjec\AI\setup.bat'
12:47:08:ObjectDetectionCoral: Installing CodeProject.AI Analysis Module
12:47:08:ObjectDetectionCoral: ========================================================================
12:47:08:ObjectDetectionCoral: CodeProject.AI Installer
12:47:08:ObjectDetectionCoral: ========================================================================
12:47:08:ObjectDetectionCoral: Checking GPU support
12:47:08:ObjectDetectionCoral: CUDA Present...True
12:47:08:ObjectDetectionCoral: Allowing GPU Support: Yes
12:47:08:ObjectDetectionCoral: Allowing CUDA Support: Yes
12:47:08:ObjectDetectionCoral: General CodeProject.AI setup
12:47:08:ObjectDetectionCoral: Creating Directories...Done
12:47:08:ObjectDetectionCoral: Processing Core SDK
12:47:08:ObjectDetectionCoral: Installing module ObjectDetectionCoral 1.5
12:47:08:ObjectDetectionCoral: Checking for python37 download...Present
12:47:17:ObjectDetectionCoral: Creating Virtual Environment (Local)...Done
12:47:17:ObjectDetectionCoral: Enabling our Virtual Environment...Done
12:47:17:ObjectDetectionCoral: Confirming we have Python 3.7...present
12:47:18:ObjectDetectionCoral: Ensuring Python package manager (pip) is installed...Done
12:47:26:ObjectDetectionCoral: Ensuring Python package manager (pip) is up to date...Done
12:47:26:ObjectDetectionCoral: Choosing Python packages from requirements.txt
12:47:37:ObjectDetectionCoral: Installing Packages into Virtual Environment...Success
12:47:40:ObjectDetectionCoral: Downloading edge TPU runtime...Expanding...Done.
12:47:40:ObjectDetectionCoral: *** You may need to run C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\edgetpu_runtime\install.bat to complete this process. Attempting to run this script now.
12:47:40:ObjectDetectionCoral: Installing UsbDk
=============================================
=============================================
EDIT:
I just let it hang to see if it would eventually do something. The module shows up but does not detect my Coral TPU (module is set to CPU).
13:07:08:Module ObjectDetectionCoral installed successfully.
13:07:08:Module ObjectDetectionCoral not configured to AutoStart.
13:07:08:Timed out attempting to install Module 'ObjectDetectionCoral' ($A task was canceled.)
13:10:54:GetCommandByRuntime: Runtime=python37, Location=Local
13:10:54:Command: C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\bin\windows\python37\venv\scripts\Python
13:10:54:
13:10:54:Attempting to start ObjectDetectionCoral with C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\bin\windows\python37\venv\scripts\Python "C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py"
13:10:54:
13:10:54:Module 'ObjectDetection (Coral)' 1.5 (ID: ObjectDetectionCoral)
13:10:54:Starting C:\Program Files...ws\python37\venv\scripts\Python "C:\Program Files...ectdetection_coral_adapter.py"
13:10:54:Module Path: C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral
13:10:54:AutoStart: True
13:10:54:Queue: objectdetection_queue
13:10:54:Platforms: windows,linux,linux-arm64,macos,macos-arm64
13:10:54:GPU: Support enabled
13:10:54:Parallelism: 1
13:10:54:Accelerator:
13:10:54:Half Precis.: enable
13:10:54:Runtime: python37
13:10:54:Runtime Loc: Local
13:10:54:FilePath: objectdetection_coral_adapter.py
13:10:54:Pre installed: False
13:10:54:Start pause: 1 sec
13:10:54:LogVerbosity:
13:10:54:Valid: True
13:10:54:Environment Variables
13:10:54:MODELS_DIR = %CURRENT_MODULE_PATH%/assets
13:10:54:MODEL_SIZE = Medium
13:10:54:
13:10:54:Started ObjectDetection (Coral) module
13:10:54:objectdetection_coral_adapter.py: Traceback (most recent call last):
13:10:54:objectdetection_coral_adapter.py: File "C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 10, in
13:10:54:objectdetection_coral_adapter.py: from module_runner import ModuleRunner
13:10:54:objectdetection_coral_adapter.py: File "../../SDK/Python\module_runner.py", line 28, in
13:10:54:objectdetection_coral_adapter.py: import aiohttp
13:10:54:objectdetection_coral_adapter.py: ModuleNotFoundError: No module named 'aiohttp'
13:10:54:Module ObjectDetectionCoral has shutdown
13:10:54:objectdetection_coral_adapter.py: has exited
Module 'ObjectDetection (Coral)' 1.5 (ID: ObjectDetectionCoral)
Module Path: <root>\modules\ObjectDetectionCoral
AutoStart: False
Queue: objectdetection_queue
Platforms: windows,linux,linux-arm64,macos,macos-arm64
GPU: Support enabled
Parallelism: 1
Accelerator:
Half Precis.: enable
Runtime: python37
Runtime Loc: Local
FilePath: objectdetection_coral_adapter.py
Pre installed: False
Start pause: 1 sec
LogVerbosity:
Valid: True
Environment Variables
MODELS_DIR = <root>\modules\ObjectDetectionCoral\assets
MODEL_SIZE = Medium
Started: 17 Sep 2023 1:10:54 PM Eastern Standard Time
LastSeen: Not seen
Status: Stopped
Processed: 0
Provider:
CanUseGPU: False
HardwareType: CPU
modified 17-Sep-23 13:20pm.
|
|
|
|
|
The relevant bits of the log are the last bits:
12:47:08:ObjectDetectionCoral: Installing CodeProject.AI Analysis Module
12:47:08:ObjectDetectionCoral: ========================================================================
12:47:08:ObjectDetectionCoral: CodeProject.AI Installer
12:47:08:ObjectDetectionCoral: ========================================================================
12:47:08:ObjectDetectionCoral: Checking GPU support
12:47:08:ObjectDetectionCoral: CUDA Present...True
12:47:08:ObjectDetectionCoral: Allowing GPU Support: Yes
12:47:08:ObjectDetectionCoral: Allowing CUDA Support: Yes
12:47:08:ObjectDetectionCoral: General CodeProject.AI setup
12:47:08:ObjectDetectionCoral: Creating Directories...Done
12:47:08:ObjectDetectionCoral: Processing Core SDK
12:47:08:ObjectDetectionCoral: Installing module ObjectDetectionCoral 1.5
12:47:08:ObjectDetectionCoral: Checking for python37 download...Present
12:47:17:ObjectDetectionCoral: Creating Virtual Environment (Local)...Done
12:47:17:ObjectDetectionCoral: Enabling our Virtual Environment...Done
12:47:17:ObjectDetectionCoral: Confirming we have Python 3.7...present
12:47:18:ObjectDetectionCoral: Ensuring Python package manager (pip) is installed...Done
12:47:26:ObjectDetectionCoral: Ensuring Python package manager (pip) is up to date...Done
12:47:26:ObjectDetectionCoral: Choosing Python packages from requirements.txt
12:47:37:ObjectDetectionCoral: Installing Packages into Virtual Environment...Success
12:47:40:ObjectDetectionCoral: Downloading edge TPU runtime...Expanding...Done.
12:47:40:ObjectDetectionCoral: *** You may need to run C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\edgetpu_runtime\install.bat to complete this process. Attempting to run this script now.
12:47:40:ObjectDetectionCoral: Installing UsbDk
The message "You may need to run C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\edgetpu_runtime\install.bat to complete this process. Attempting to run this script now." is the trick.
To use the Coral TPU you need to ensure the edge TPU libraries are installed, and they need admin rights. Depending on your platform, setup, and security settings and how you launch CodeProject.AI Server, the server *may* have enough rights to run that script, or it may not.
Try running C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\edgetpu_runtime\install.bat and see if the Coral module works.
Was there anything in the logs after that? There's no further messages so I can't tell if the installer hung, crashed, or you only cut and pasted up until that point.
cheers
Chris Maunder
|
|
|
|
|
Running the install.bat file completes successfully (because it's already installed) and doesn't affect the module. The installer freezes at "Installing UsbDK" until the timeout. Here's the remainder of the log I recently acquired (previously did not wait for the timeout):
I just let it hang to see if it would eventually do something. The module shows up but does not detect my Coral TPU (module is set to CPU).
13:07:08:Module ObjectDetectionCoral installed successfully.
13:07:08:Module ObjectDetectionCoral not configured to AutoStart.
13:07:08:Timed out attempting to install Module 'ObjectDetectionCoral' ($A task was canceled.)
13:10:54:GetCommandByRuntime: Runtime=python37, Location=Local
13:10:54:Command: C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\bin\windows\python37\venv\scripts\Python
13:10:54:
13:10:54:Attempting to start ObjectDetectionCoral with C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\bin\windows\python37\venv\scripts\Python "C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py"
13:10:54:
13:10:54:Module 'ObjectDetection (Coral)' 1.5 (ID: ObjectDetectionCoral)
13:10:54:Starting C:\Program Files...ws\python37\venv\scripts\Python "C:\Program Files...ectdetection_coral_adapter.py"
13:10:54:Module Path: C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral
13:10:54:AutoStart: True
13:10:54:Queue: objectdetection_queue
13:10:54:Platforms: windows,linux,linux-arm64,macos,macos-arm64
13:10:54:GPU: Support enabled
13:10:54:Parallelism: 1
13:10:54:Accelerator:
13:10:54:Half Precis.: enable
13:10:54:Runtime: python37
13:10:54:Runtime Loc: Local
13:10:54:FilePath: objectdetection_coral_adapter.py
13:10:54:Pre installed: False
13:10:54:Start pause: 1 sec
13:10:54:LogVerbosity:
13:10:54:Valid: True
13:10:54:Environment Variables
13:10:54:MODELS_DIR = %CURRENT_MODULE_PATH%/assets
13:10:54:MODEL_SIZE = Medium
13:10:54:
13:10:54:Started ObjectDetection (Coral) module
13:10:54:objectdetection_coral_adapter.py: Traceback (most recent call last):
13:10:54:objectdetection_coral_adapter.py: File "C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 10, in
13:10:54:objectdetection_coral_adapter.py: from module_runner import ModuleRunner
13:10:54:objectdetection_coral_adapter.py: File "../../SDK/Python\module_runner.py", line 28, in
13:10:54:objectdetection_coral_adapter.py: import aiohttp
13:10:54:objectdetection_coral_adapter.py: ModuleNotFoundError: No module named 'aiohttp'
13:10:54:Module ObjectDetectionCoral has shutdown
13:10:54:objectdetection_coral_adapter.py: has exited
Module 'ObjectDetection (Coral)' 1.5 (ID: ObjectDetectionCoral)
Module Path: <root>\modules\ObjectDetectionCoral
AutoStart: False
Queue: objectdetection_queue
Platforms: windows,linux,linux-arm64,macos,macos-arm64
GPU: Support enabled
Parallelism: 1
Accelerator:
Half Precis.: enable
Runtime: python37
Runtime Loc: Local
FilePath: objectdetection_coral_adapter.py
Pre installed: False
Start pause: 1 sec
LogVerbosity:
Valid: True
Environment Variables
MODELS_DIR = <root>\modules\ObjectDetectionCoral\assets
MODEL_SIZE = Medium
Started: 17 Sep 2023 1:10:54 PM Eastern Standard Time
LastSeen: Not seen
Status: Stopped
Processed: 0
Provider:
CanUseGPU: False
HardwareType: CPU
C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\edgetpu_runtime>install.bat
Installing UsbDk
Installing Windows drivers
Microsoft PnP Utility
Adding driver package: coral.inf
Driver package added successfully. (Already exists in the system)
Published Name: oem66.inf
Adding driver package: Coral_USB_Accelerator.inf
Driver package added successfully. (Already exists in the system)
Published Name: oem67.inf
Adding driver package: Coral_USB_Accelerator_(DFU).inf
Driver package added successfully. (Already exists in the system)
Published Name: oem53.inf
Driver package is up-to-date on device: USB\VID_1A6E&PID_089A\6&2c14036a&0&4
Total driver packages: 3
Added driver packages: 2
Installing performance counters
Info: Provider {aaa5bf9e-c44b-4177-af65-d3a06ba45fe7} defined in C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\edgetpu_runtime\third_party\coral_accelerator_windows\coral.man is already installed in system repository.
Info: Successfully installed performance counters in C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\edgetpu_runtime\third_party\coral_accelerator_windows\coral.manCopying edgetpu and libusb to System32
1 file(s) copied.
1 file(s) copied.
Install complete
C:\Program Files\CodeProjec\AI\modules\ObjectDetectionCoral\edgetpu_runtime>
modified 17-Sep-23 13:29pm.
|
|
|
|
|