CodeProject.AI Version 2.0

Skinny1

Getting the hang of it
Joined
Jul 10, 2016
Messages
271
Reaction score
49
Mike,

I uninstall the ALPR module then reinstall the module using Do not use download cache. Now I am getting a new message -

17:40:20:Started License Plate Reader module
17:40:20:ALPR_adapter.py: Traceback (most recent call last):
17:40:20:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 7, in
17:40:20:ALPR_adapter.py: from request_data import RequestData
17:40:20:ALPR_adapter.py: File "../../SDK/Python\request_data.py", line 7, in
17:40:20:ALPR_adapter.py: from PIL import Image
17:40:20:ALPR_adapter.py: ModuleNotFoundError: No module named 'PIL'
17:40:20:ALPR_adapter.py: has exited
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,220
Reaction score
4,267
Location
Brooklyn, NY
Mike,

I uninstall the ALPR module then reinstall the module using Do not use download cache. Now I am getting a new message -

17:40:20:Started License Plate Reader module
17:40:20:ALPR_adapter.py: Traceback (most recent call last):
17:40:20:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 7, in
17:40:20:ALPR_adapter.py: from request_data import RequestData
17:40:20:ALPR_adapter.py: File "../../SDK/Python\request_data.py", line 7, in
17:40:20:ALPR_adapter.py: from PIL import Image
17:40:20:ALPR_adapter.py: ModuleNotFoundError: No module named 'PIL'
17:40:20:ALPR_adapter.py: has exited
Can you try one more time and then post the install log.
 

Skinny1

Getting the hang of it
Joined
Jul 10, 2016
Messages
271
Reaction score
49
Man, this should not be this complicated ! I am now getting part of the first error message again -

16:02:05:ALPR_adapter.py: Traceback (most recent call last):
16:02:05:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 7, in
16:02:05:ALPR_adapter.py: from request_data import RequestData
16:02:05:ALPR_adapter.py: File "../../SDK/Python\request_data.py", line 7, in
16:02:05:ALPR_adapter.py: from PIL import Image
16:02:05:ALPR_adapter.py: ModuleNotFoundError: No module named 'PIL'

Any idaea's?

Rick
I went back and reinstalled it a 3rd time and then installed a second object detection and it a started working. It's been up and working for about twenty minutes. We'll see if it makes it through the night. If not, I will try a clean install.

Thaks for your help Mike.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,220
Reaction score
4,267
Location
Brooklyn, NY
I went back and reinstalled it a 3rd time and then installed a second object detection and it a started working. It's been up and working for about twenty minutes. We'll see if it makes it through the night. If not, I will try a clean install.

Thaks for your help Mike.
What Object Detection modules are you using?
 
Joined
Nov 11, 2022
Messages
9
Reaction score
1
Location
US
I recently upgraded to BI 5.8.0.11 and still had CP 1.6.2 installed which was working fine. Last night I decided to upgrade CP to 2.3.2 and have been running into a lot of issues with high CPU usage and CP constantly stopping and restarting. I'm not seeing any obvious errors in the CP log.

I have already tried uninstalling CP, removing ProgramData and Program Files directories, and then reinstalling.

I am using Object Detection (YOLOv5 .NET) and running everything with an 11th generation Intel CPU/GPU in Windows.

Anything else I can try?
 

sewington

Getting the hang of it
Joined
Oct 25, 2022
Messages
25
Reaction score
51
Location
Alberta, Canada
I recently upgraded to BI 5.8.0.11 and still had CP 1.6.2 installed which was working fine. Last night I decided to upgrade CP to 2.3.2 and have been running into a lot of issues with high CPU usage and CP constantly stopping and restarting. I'm not seeing any obvious errors in the CP log.
Can you please share your System Info tab from the CodeProject.AI Server dashboard?
 
Joined
Nov 11, 2022
Messages
9
Reaction score
1
Location
US
Can you please share your System Info tab from the CodeProject.AI Server dashboard?
I downgraded to version 2.2.4 and that seems to have fixed the high CPU issue but the CP service still continues to restart. When it's running, BI is able to use it to tag alerts "car", "person", etc. before the service stops and restarts.

Screenshot 2023-11-01 112915.png
 

sewington

Getting the hang of it
Joined
Oct 25, 2022
Messages
25
Reaction score
51
Location
Alberta, Canada
I downgraded to version 2.2.4 and that seems to have fixed the high CPU issue but the CP service still continues to restart.
I'm wondering if when you upgraded, something from 2.2.4 lingered which is causing the high CPU issue. Curious what happens if when you're re-installing, did you first delete the file C:\ProgramData\CodeProject\AI\modulesettings.json

Not C:\Program Files..., but C:\ProgramData.

As for restarting, do you have auto start / stop with start with Blue Iris checked off? Try unchecking that box if it is checked.
 
Joined
Nov 11, 2022
Messages
9
Reaction score
1
Location
US
I'm wondering if when you upgraded, something from 2.2.4 lingered which is causing the high CPU issue. Curious what happens if when you're re-installing, did you first delete the file C:\ProgramData\CodeProject\AI\modulesettings.json

Not C:\Program Files..., but C:\ProgramData.

As for restarting, do you have auto start / stop with start with Blue Iris checked off? Try unchecking that box if it is checked.
When I upgraded from 1.6.2 -> 2.3.2, that's when the issues started so I performed an uninstall. After uninstalling, I deleted the entire C:\Program Files\CodeProject and C:\ProgramData\CodeProject directories before installing again.

After re-installing 2.3.2, I still was experiencing issues so I repeated the steps above to reinstalled 2.2.4 instead.


Capture.JPG

Objects are occasionally recognized but the service seems to stay started for a little while before restarting (in which case it's down for like 5 minutes).

Does anyone have an older version of CP that they'd be willing to share? I can't find anything older than 2.2.4 online and using Deepstack doesn't appear to be an option.
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
374
Reaction score
489
Location
USA
Does anyone have an older version of CP that they'd be willing to share? I can't find anything older than 2.2.4 online and using Deepstack doesn't appear to be an option.
Somewhere on the CPAI site there are links to older versions, I don't remember where at the moment. However, it isn't so simple for another member to "share" their installation: in reality every installation file that we download and execute is just a tiny portion or stub of the full CPAI install which usually takes about 20-30 minutes to fully download and install (it has to pull the majority of it from their servers).
 

tedrpi

Getting the hang of it
Joined
Sep 2, 2015
Messages
85
Reaction score
36
@MikeLud1 - See my info below, any idea how or why LPR isnt using the GPU when Yolo is?


Sure:

Server version: 2.3.2-Beta
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (Intel)
1 CPU x 4 cores. 8 logical processors (x64)
GPU: NVIDIA GeForce GT 1030 (2 GiB) (NVIDIA)
Driver: 536.23 CUDA: 11.8.89 (max supported: 12.2) Compute: 6.1
System RAM: 48 GiB
Target: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
.NET framework: .NET 7.0.5
Video adapter info:
NVIDIA GeForce GT 1030:
Driver Version 31.0.15.3623
Video Processor NVIDIA GeForce GT 1030
Intel(R) HD Graphics 530:
Driver Version 31.0.101.2111
Video Processor Intel(R) HD Graphics Family
System GPU info:
GPU 3D Usage 24%
GPU RAM Usage 630 MiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
 

sewington

Getting the hang of it
Joined
Oct 25, 2022
Messages
25
Reaction score
51
Location
Alberta, Canada

Mast3r0fN0n3

Getting the hang of it
Joined
Sep 16, 2022
Messages
64
Reaction score
73
Location
Texas
What happens if you uncheck auto start/stop?
[/QUOTE]
you will have to start manually did you reboot the pc when you reinstalled
 
Last edited:
Joined
Nov 11, 2022
Messages
9
Reaction score
1
Location
US
You can download any version from here:
What happens if you uncheck auto start/stop?
I let it run that way for a little while and it seems to have stopped the CP service from stopping/starting over and over which could mean those instructions were coming from BI. However, this didn't stop the occasional high CPU usage which I was not seeing in the older version

I did reboot several times.

I switch to running CP in Docker rather than natively on Windows and the container stays running and I don't see high CPU usage anymore (although I think I need to do some additional tuning).
 

Mast3r0fN0n3

Getting the hang of it
Joined
Sep 16, 2022
Messages
64
Reaction score
73
Location
Texas
If anyone is interested I am running 5.8.0.13, and cp 2.1.1 - yolov5 6.2 - no alpr, no issues i can see yet, there is a new update to 5.8.0.14, wish me luck, well , halloween was yesterday, right?
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,220
Reaction score
4,267
Location
Brooklyn, NY
@MikeLud1 - See my info below, any idea how or why LPR isnt using the GPU when Yolo is?
I have been looking into why the LPR module is not using your GPU. The CP.AI team add a parameter that disables older GPU due to users having issue with the older GPUs.
Did your GPU work on the older version of CodeProject.AI? I think they were to aggressive with disabling older GPUs.

Your GPU
1698888886487.png

Required GPU
1698889030513.png
 

tedrpi

Getting the hang of it
Joined
Sep 2, 2015
Messages
85
Reaction score
36
Makes sense. Yes, LPR was working with my 1030 GPU on previous versions. For the moment I'm okay splitting, with Yolo using the GPU and LPR using CPU given my LPR use is only on one camera.

Separate question, what version of CUDA should I be using? I recall CPAI supporting 12.2 but LPR needing an older version.

Thanks for the help.


I have been looking into why the LPR module is not using your GPU. The CP.AI team add a parameter that disables older GPU due to users having issue with the older GPUs.
Did your GPU work on the older version of CodeProject.AI? I think they were to aggressive with disabling older GPUs.

Your GPU
View attachment 176769

Required GPU
View attachment 176770
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,220
Reaction score
4,267
Location
Brooklyn, NY
Makes sense. Yes, LPR was working with my 1030 GPU on previous versions. For the moment I'm okay splitting, with Yolo using the GPU and LPR using CPU given my LPR use is only on one camera.

Separate question, what version of CUDA should I be using? I recall CPAI supporting 12.2 but LPR needing an older version.

Thanks for the help.
License Plate Reader v2.7.2 now supports CUDA 12.x. Just today I updated to CUDA 12.3, before I have been running CUDA 11.8. When changing CUDA versions you need to uninstall the modules and then reinstall the module so that the correct python modules get installed.
I will have the CP.AI team change the MIN COMPUTE CAPABILITY to 6. This should make your GPU work with the APR module.
 
Top