CodeProject.AI Version 2.0

harleyl7

Pulling my weight
Joined
Jun 4, 2021
Messages
260
Reaction score
223
@CCTVCam Are you running CPAI in docker? I am on unraid and I cant seem to get the docker container to identify the TPU. However, UnRaid can see it. on CPAI Dashboard will it be listed in the system info?
 

hopalong

Getting the hang of it
Joined
Apr 19, 2021
Messages
72
Reaction score
34
Location
California
@CCTVCam Are you running CPAI in docker? I am on unraid and I cant seem to get the docker container to identify the TPU. However, UnRaid can see it. on CPAI Dashboard will it be listed in the system info?
I don't think the unraid container works with the Coral yet, That's what I'm waiting on before I pull the trigger on a Coral.
 

harleyl7

Pulling my weight
Joined
Jun 4, 2021
Messages
260
Reaction score
223
I don't think the unraid container works with the Coral yet, That's what I'm waiting on before I pull the trigger on a Coral.
Just got it working as I saw this notification haha. I'm gonna do a write up on it since there doesn't seem to be clear instructions out there for the most part.
Note: it hasn't been tested yet, but I have the m.2 tpu being detected by the unRAID docker CPAI
 

hopalong

Getting the hang of it
Joined
Apr 19, 2021
Messages
72
Reaction score
34
Location
California
Just got it working as I saw this notification haha. I'm gonna do a write up on it since there doesn't seem to be clear instructions out there for the most part.
Note: it hasn't been tested yet, but I have the m.2 tpu being detected by the unRAID docker CPAI
Sweet. Time to bust out the wallet. Please do share your experience in the unraid docker container.
 

CCTVCam

Known around here
Joined
Sep 25, 2017
Messages
2,684
Reaction score
3,528
I can see when I get home tonight if no-one beats me to it. Not much to adjust is there? I know I run medium on model size and my sub steam is 1080P although I believe that something like 640 is recommended for faster processing.
Only items i have ticked are:

"Use AI server on IP Port"

"Auto Stop / STart AI with Blue Iris"

"Default Object Detection" - set to Medium


@CCTVCam Are you running CPAI in docker? I am on unraid and I cant seem to get the docker container to identify the TPU. However, UnRaid can see it. on CPAI Dashboard will it be listed in the system info?
No. I'm running Windows 10.
 

chain

Young grasshopper
Joined
Feb 29, 2020
Messages
30
Reaction score
3
Location
great white north
i'm running version code project 2.1.11 and have setup under the trigger, but it doesn't get any hits on people or car. Blueiris 5.7.7.3 Not sure what is the issue need some help, did a complete delete and install of code project
09:32:23:Operating System: Windows (Microsoft Windows 11 version 10.0.22000)
09:32:23:CPUs: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (Intel)
09:32:23: 1 CPU x 4 cores. 8 logical processors (x64)
09:32:23:GPU: Intel(R) HD Graphics 530 (1,024 MiB) (Intel Corporation)
09:32:23: Driver: 31.0.101.2111
09:32:23:System RAM: 32 GiB
09:32:23:Target: Windows
09:32:23:BuildConfig: Release
09:32:23:Execution Env: Native
09:32:23:Runtime Env: Production
09:32:23:.NET framework: .NET 7.0.10
09:32:23:App DataDir: C:\ProgramData\CodeProject\AI
09:32:23:Video adapter info:
09:32:23: Intel(R) HD Graphics 530:
09:32:23: Driver Version 31.0.101.2111
09:32:23: Video Processor Intel(R) HD Graphics Family
09:32:23:ROOT_PATH = C:\Program Files\CodeProject\AI
09:32:23:RUNTIMES_PATH = C:\Program Files\CodeProject\AI\runtimes
09:32:23:pREINSTALLED_MODULES_PATH = C:\Program Files\CodeProject\AI\preinstalled-modules
09:32:23:MODULES_PATH = C:\Program Files\CodeProject\AI\modules
09:32:23:pYTHON_PATH = \bin\windows\%PYTHON_RUNTIME%\venv\scripts\Python
09:32:23:Data Dir = C:\ProgramData\CodeProject\AI
09:32:23:Server version: 2.1.11-Beta
09:32:26:
09:32:26:Module 'Face Processing' (ID: FaceProcessing)
09:32:26:Module Path: C:\Program Files\CodeProject\AI\modules\FaceProcessing
09:32:26:AutoStart: True
09:32:26:Queue: faceprocessing_queue
09:32:26:platforms: windows,linux,linux-arm64,macos,macos-arm64
09:32:26:GPU: Support disabled
09:32:26:parallelism: 0
09:32:26:Accelerator:
09:32:26:Half Precis.: enable
09:32:26:Runtime: python37
09:32:26:Runtime Loc: Shared
09:32:26:FilePath: intelligencelayer\face.py
09:32:26:pre installed: False
09:32:26:Start pause: 1 sec
09:32:26:LogVerbosity:
09:32:26:Valid: True
09:32:26:Environment Variables
09:32:26:APPDIR = %CURRENT_MODULE_PATH%\intelligencelayer
09:32:26:DATA_DIR = %DATA_DIR%
09:32:26:MODE = MEDIUM
09:32:26:MODELS_DIR = %CURRENT_MODULE_PATH%\assets
09:32:26:pROFILE = desktop_gpu
09:32:26:USE_CUDA = True
09:32:26:YOLOv5_AUTOINSTALL = false
09:32:26:YOLOv5_VERBOSE = false
09:32:26:
09:32:26:Started Face Processing module
09:32:26:face.py: Fatal Python error: initfsencoding: unable to load the file system codec
09:32:26:face.py: ModuleNotFoundError: No module named 'encodings'
09:32:26:face.py: Current thread 0x00000c74 (most recent call first):
09:32:27:face.py: has exited
09:32:27:Module FaceProcessing has shutdown
09:32:27:
09:32:27:Module 'Object Detection (YOLOv5 6.2)' (ID: ObjectDetectionYolo)
09:32:27:Module Path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo
09:32:27:AutoStart: True
09:32:27:Queue: objectdetection_queue
09:32:27:platforms: all
09:32:27:GPU: Support enabled
09:32:27:parallelism: 0
09:32:27:Accelerator:
09:32:27:Half Precis.: enable
09:32:27:Runtime: python37
09:32:27:Runtime Loc: Shared
09:32:27:FilePath: detect_adapter.py
09:32:27:pre installed: False
09:32:27:Start pause: 1 sec
09:32:27:LogVerbosity:
09:32:27:Valid: True
09:32:27:Environment Variables
09:32:27:APPDIR = %CURRENT_MODULE_PATH%
09:32:27:CUSTOM_MODELS_DIR = %CURRENT_MODULE_PATH%/custom-models
09:32:27:MODELS_DIR = %CURRENT_MODULE_PATH%/assets
09:32:27:MODEL_SIZE = Medium
09:32:27:USE_CUDA = True
09:32:27:YOLOv5_AUTOINSTALL = false
09:32:27:YOLOv5_VERBOSE = false
09:32:27:
09:32:27:Started Object Detection (YOLOv5 6.2) module
09:32:27:detect_adapter.py: Fatal Python error: initfsencoding: unable to load the file system codec
09:32:27:detect_adapter.py: ModuleNotFoundError: No module named 'encodings'
09:32:27:detect_adapter.py: Current thread 0x000027a8 (most recent call first):
09:32:28:Module ObjectDetectionYolo has shutdown
09:32:28:detect_adapter.py: has exited
09:32:29:Server: This is the latest version
19:12:50:
19:12:50:Module 'Object Detection (YOLOv5 .NET)' (ID: ObjectDetectionNet)
19:12:50:Module Path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet
19:12:50:AutoStart: True
19:12:50:Queue: objectdetection_queue
19:12:50:platforms: windows,linux,linux-arm64,macos,macos-arm64
19:12:50:GPU: Support enabled
19:12:50:parallelism: 0
19:12:50:Accelerator:
19:12:50:Half Precis.: enable
19:12:50:Runtime: execute
19:12:50:Runtime Loc: Shared
19:12:50:FilePath: ObjectDetectionNet.exe
19:12:50:pre installed: False
19:12:50:Start pause: 1 sec
19:12:50:LogVerbosity:
19:12:50:Valid: True
19:12:50:Environment Variables
19:12:50:CUSTOM_MODELS_DIR = %CURRENT_MODULE_PATH%\custom-models
19:12:50:MODELS_DIR = %CURRENT_MODULE_PATH%\assets
19:12:50:MODEL_SIZE = MEDIUM
19:12:50:
19:12:50:Started Object Detection (YOLOv5 .NET) module
19:12:52:ObjectDetectionNet.exe: Application started. Press Ctrl+C to shut down.
19:12:52:ObjectDetectionNet.exe: Hosting environment: Production
19:12:52:ObjectDetectionNet.exe: Content root path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet
19:12:53:ObjectDetectionNet.exe: Please ensure you don't enable this module along side any other Object Detection module using the 'vision/detection' route and 'objectdetection_queue' queue (eg. ObjectDetectionYolo). There will be conflicts
19:12:53:ObjectDetectionNet.exe: CodeProject.AI.Modules.ObjectDetection.Yolo_ObjectDetector[0]
19:12:53:Object Detection (YOLOv5 .NET): Object Detection (YOLOv5 .NET) module started.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,226
Reaction score
4,280
Location
Brooklyn, NY
i'm running version code project 2.1.11 and have setup under the trigger, but it doesn't get any hits on people or car. Blueiris 5.7.7.3 Not sure what is the issue need some help, did a complete delete and install of code project
09:32:23:Operating System: Windows (Microsoft Windows 11 version 10.0.22000)
09:32:23:CPUs: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (Intel)
09:32:23: 1 CPU x 4 cores. 8 logical processors (x64)
09:32:23:GPU: Intel(R) HD Graphics 530 (1,024 MiB) (Intel Corporation)
09:32:23: Driver: 31.0.101.2111
09:32:23:System RAM: 32 GiB
09:32:23:Target: Windows
09:32:23:BuildConfig: Release
09:32:23:Execution Env: Native
09:32:23:Runtime Env: Production
09:32:23:.NET framework: .NET 7.0.10
09:32:23:App DataDir: C:\ProgramData\CodeProject\AI
09:32:23:Video adapter info:
09:32:23: Intel(R) HD Graphics 530:
09:32:23: Driver Version 31.0.101.2111
09:32:23: Video Processor Intel(R) HD Graphics Family
09:32:23:ROOT_PATH = C:\Program Files\CodeProject\AI
09:32:23:RUNTIMES_PATH = C:\Program Files\CodeProject\AI\runtimes
09:32:23:pREINSTALLED_MODULES_PATH = C:\Program Files\CodeProject\AI\preinstalled-modules
09:32:23:MODULES_PATH = C:\Program Files\CodeProject\AI\modules
09:32:23:pYTHON_PATH = \bin\windows\%PYTHON_RUNTIME%\venv\scripts\Python
09:32:23:Data Dir = C:\ProgramData\CodeProject\AI
09:32:23:Server version: 2.1.11-Beta
09:32:26:
09:32:26:Module 'Face Processing' (ID: FaceProcessing)
09:32:26:Module Path: C:\Program Files\CodeProject\AI\modules\FaceProcessing
09:32:26:AutoStart: True
09:32:26:Queue: faceprocessing_queue
09:32:26:platforms: windows,linux,linux-arm64,macos,macos-arm64
09:32:26:GPU: Support disabled
09:32:26:parallelism: 0
09:32:26:Accelerator:
09:32:26:Half Precis.: enable
09:32:26:Runtime: python37
09:32:26:Runtime Loc: Shared
09:32:26:FilePath: intelligencelayer\face.py
09:32:26:pre installed: False
09:32:26:Start pause: 1 sec
09:32:26:LogVerbosity:
09:32:26:Valid: True
09:32:26:Environment Variables
09:32:26:APPDIR = %CURRENT_MODULE_PATH%\intelligencelayer
09:32:26:DATA_DIR = %DATA_DIR%
09:32:26:MODE = MEDIUM
09:32:26:MODELS_DIR = %CURRENT_MODULE_PATH%\assets
09:32:26:pROFILE = desktop_gpu
09:32:26:USE_CUDA = True
09:32:26:YOLOv5_AUTOINSTALL = false
09:32:26:YOLOv5_VERBOSE = false
09:32:26:
09:32:26:Started Face Processing module
09:32:26:face.py: Fatal Python error: initfsencoding: unable to load the file system codec
09:32:26:face.py: ModuleNotFoundError: No module named 'encodings'
09:32:26:face.py: Current thread 0x00000c74 (most recent call first):
09:32:27:face.py: has exited
09:32:27:Module FaceProcessing has shutdown
09:32:27:
09:32:27:Module 'Object Detection (YOLOv5 6.2)' (ID: ObjectDetectionYolo)
09:32:27:Module Path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo
09:32:27:AutoStart: True
09:32:27:Queue: objectdetection_queue
09:32:27:platforms: all
09:32:27:GPU: Support enabled
09:32:27:parallelism: 0
09:32:27:Accelerator:
09:32:27:Half Precis.: enable
09:32:27:Runtime: python37
09:32:27:Runtime Loc: Shared
09:32:27:FilePath: detect_adapter.py
09:32:27:pre installed: False
09:32:27:Start pause: 1 sec
09:32:27:LogVerbosity:
09:32:27:Valid: True
09:32:27:Environment Variables
09:32:27:APPDIR = %CURRENT_MODULE_PATH%
09:32:27:CUSTOM_MODELS_DIR = %CURRENT_MODULE_PATH%/custom-models
09:32:27:MODELS_DIR = %CURRENT_MODULE_PATH%/assets
09:32:27:MODEL_SIZE = Medium
09:32:27:USE_CUDA = True
09:32:27:YOLOv5_AUTOINSTALL = false
09:32:27:YOLOv5_VERBOSE = false
09:32:27:
09:32:27:Started Object Detection (YOLOv5 6.2) module
09:32:27:detect_adapter.py: Fatal Python error: initfsencoding: unable to load the file system codec
09:32:27:detect_adapter.py: ModuleNotFoundError: No module named 'encodings'
09:32:27:detect_adapter.py: Current thread 0x000027a8 (most recent call first):
09:32:28:Module ObjectDetectionYolo has shutdown
09:32:28:detect_adapter.py: has exited
09:32:29:Server: This is the latest version
19:12:50:
19:12:50:Module 'Object Detection (YOLOv5 .NET)' (ID: ObjectDetectionNet)
19:12:50:Module Path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet
19:12:50:AutoStart: True
19:12:50:Queue: objectdetection_queue
19:12:50:platforms: windows,linux,linux-arm64,macos,macos-arm64
19:12:50:GPU: Support enabled
19:12:50:parallelism: 0
19:12:50:Accelerator:
19:12:50:Half Precis.: enable
19:12:50:Runtime: execute
19:12:50:Runtime Loc: Shared
19:12:50:FilePath: ObjectDetectionNet.exe
19:12:50:pre installed: False
19:12:50:Start pause: 1 sec
19:12:50:LogVerbosity:
19:12:50:Valid: True
19:12:50:Environment Variables
19:12:50:CUSTOM_MODELS_DIR = %CURRENT_MODULE_PATH%\custom-models
19:12:50:MODELS_DIR = %CURRENT_MODULE_PATH%\assets
19:12:50:MODEL_SIZE = MEDIUM
19:12:50:
19:12:50:Started Object Detection (YOLOv5 .NET) module
19:12:52:ObjectDetectionNet.exe: Application started. Press Ctrl+C to shut down.
19:12:52:ObjectDetectionNet.exe: Hosting environment: Production
19:12:52:ObjectDetectionNet.exe: Content root path: C:\Program Files\CodeProject\AI\modules\ObjectDetectionNet
19:12:53:ObjectDetectionNet.exe: Please ensure you don't enable this module along side any other Object Detection module using the 'vision/detection' route and 'objectdetection_queue' queue (eg. ObjectDetectionYolo). There will be conflicts
19:12:53:ObjectDetectionNet.exe: CodeProject.AI.Modules.ObjectDetection.Yolo_ObjectDetector[0]
19:12:53:Object Detection (YOLOv5 .NET): Object Detection (YOLOv5 .NET) module started.
To see if it is a CodeProject.AI or Blue Iris issue run a test using CodeProject.AI Explorer
1694372960400.png
1694373100262.png
 

harleyl7

Pulling my weight
Joined
Jun 4, 2021
Messages
260
Reaction score
223
Yes, if it is using the CPU it will show CPU instead of GPU (DirectML). When the module first starts it will show CPU then after the first detection it will change to GPU (DirectML)

View attachment 171978
Awesome thanks. Gonna try passing it through now to the container - using this for the time being until they get the coral stuff more refined/custom models for it. Gotta use the MikeLud Models!
 

harleyl7

Pulling my weight
Joined
Jun 4, 2021
Messages
260
Reaction score
223
@MikeLud1 passed it through, but doesn't seem to be switching from CPU to directML. Anything I need to do to force it? Or should try and good ole uninstall reinstall module?
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,226
Reaction score
4,280
Location
Brooklyn, NY
Doing this on docker. Confirmed on unRAID that it's seeing my igpu from my e2176g. Passed it through to the container by adding a device to the docker container /dev/dri/
So did passing it through to the container work?
 

harleyl7

Pulling my weight
Joined
Jun 4, 2021
Messages
260
Reaction score
223
All you need to do is the below

  • Disable Object Detection (YOLOv5 6.2)
  • Enable Object Detection (YOLOv5 .NET). One note when you first enable .NET is will show only CPU, after the first detection it should show GPU (DirectML)
Tried this and walked around my cameras, detection worked, but didn't switch to DirectML
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,226
Reaction score
4,280
Location
Brooklyn, NY
I believe so, really hard to confirm that it worked unless I'm missing something on CPAI dashboard
Post a screenshot of the dashboard. I found the below on the unraid forum that might help

 

harleyl7

Pulling my weight
Joined
Jun 4, 2021
Messages
260
Reaction score
223
ahh directML might only be available via windows/windows docker with WSL. Time to break out the 3080... only if I could fit it in the 2u server rack lol
 
Top