5.5.8 - June 13, 2022 - Code Project’s SenseAI,

wepee

Getting the hang of it
Joined
Jul 16, 2016
Messages
199
Reaction score
40
Hi, I am just testing my newly installed CodeProject.AI server, today.

Just wonder, is normal to have a CPU spike(from 16% to 48%, sometimes even higher to 68%)
when I manually pressed the trigger now button on 1 of my cameras?

2022-09-28_16-51-08.jpg
 

Dave Lonsdale

Pulling my weight
Joined
Dec 3, 2015
Messages
436
Reaction score
192
Location
Congleton Edge, UK
I still struggling with getting a YOLO model working, and am looking for suggestions: I have moved a copy of yolov5l-cls.pt into the appropriate folder (CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\custom-models), yet when I try to enable the yolov5l-cls model in the camera, Custom models box, here is my result in the CPAI log:

10:22:02 PM: Object Detection (YOLO): Detecting using yolov5l-cls
10:22:02 PM: Object Detection (YOLO): Unable to load model at C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\custom-models\yolov5l-cls.pt (Can't get attribute 'ClassificationModel' on )
10:22:02 PM: Object Detection (YOLO): Unable to create YOLO detector for model yolov5l-cls

What am I doing wrong here?
I don’t want to skew the direction of this thread, but just to answer jrbeddow, I can’t find yolov5l-cls.pt. I used yolov5l.pt from ObjectDetectionYolo\assets. The registry is still edited to \ObjectDetectionYolo\custom-detection.

Is there any significance in the different colours used in the BI status window results? I don’t really want the green ticks when nothing is found.

Is there a good reason for not using the “to confirm” line with default detection as spammenotinoz says? I’m not interested in backpacks being identified and yet want all animals. Yesterday, for example, I was getting bear and cow when it’s a dog.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,202
Reaction score
2,155
Finally Ken has done some integration work, settings are unlocked

View attachment 141069
I'm not getting those unlocked running BI 5.6.2.1. The use custom model folder is still greyed out for me.

Any idea why I can't complete the benchmark? It starts to run, pegs the CPU for a few seconds, and then crashes with this error message.
codeai.png
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,155
Reaction score
2,567
Location
Brooklyn, NY
I'm not getting those unlocked running BI 5.6.2.1. The use custom model folder is still greyed out for me.

Any idea why I can't complete the benchmark? It starts to run, pegs the CPU for a few seconds, and then crashes with this error message.
View attachment 141112
I'm not getting those unlocked running BI 5.6.2.1. The use custom model folder is still greyed out for me.

Any idea why I can't complete the benchmark? It starts to run, pegs the CPU for a few seconds, and then crashes with this error message.
View attachment 141112
Try a reboot and see if it still happens.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,202
Reaction score
2,155
Post a screenshot of the main AI setting for the BI issue and the dashboard for the CP.AI issue
I uninstalled CP AI 1.6.1 and installed 1.6.2. I was able to run the benchmark successfully a couple times on 1.6.2 getting ~1.5 operations per second in a Win 10 VM. But now trying to run the benchmark it keeps failing with the above error code.

Using my desktop with a GTX 2060 I can get ~50 operations per second using the same benchmark and it completes every time. I wonder if the test is taking so long in the VM it's just timing itself out.

No idea why the custom model options in BI are greyed out. I even tried unchecking "Default Object Detection" but it didn't make any difference.
 

Attachments

CrazyAsYou

Pulling my weight
Joined
Mar 28, 2018
Messages
171
Reaction score
183
Location
England, Near Sheffield
Yes, this could be another way to solve the problem.
I am guessing, since I am a beginner in this AI world, I will be stumbling over many obstacles in the future. Thanks for your advice. much appreciated. :)
The better way to work on config files is to install something better than the normal/default Windows Notepad. A great app is Notepad++ - Not only do you get much better formatting (colour highlights) for almost all coding syntax, but when you open a file from a protected location (all Windows system/install folders) you don't have to mess about changing the ownership on the files, they will open and when you click save Notepad++ will prompt you saying it can restart in Administrator mode and allow you to save/edit. Once you move to a tool like this, you'll never open normal notepad again. By not changing the ownership / permissions on files/folders, you're also keeping an extra layer of security.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,155
Reaction score
2,567
Location
Brooklyn, NY
I uninstalled CP AI 1.6.1 and installed 1.6.2. I was able to run the benchmark successfully a couple times on 1.6.2 getting ~1.5 operations per second in a Win 10 VM. But now trying to run the benchmark it keeps failing with the above error code.

Using my desktop with a GTX 2060 I can get ~50 operations per second using the same benchmark and it completes every time. I wonder if the test is taking so long in the VM it's just timing itself out.

No idea why the custom model options in BI are greyed out. I even tried unchecking "Default Object Detection" but it didn't make any difference.
For the custom model options in BI are greyed out checkoff Auto start/stop the click ok and reopen the AI settings and the custom model options in BI will not be greyed out
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
260
Reaction score
341
Location
USA
I just ran across a very comprehensive guide explaining exacty what is controlled via BI settings vs. CodeProject AI settings written by the CPAI lead coder Chris Maunder on Sept. 24th. It should be required reading for all us struggling with understanding settings (did you know, for example, that using the main checkbox for Custom Models then leaving the individual camera custom models box blank results in CPAI using EVERY custom model it knows about?).
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,202
Reaction score
2,155
For the custom model options in BI are greyed out checkoff Auto start/stop the click ok and reopen the AI settings and the custom model options in BI will not be greyed out
Hmmm. If I have "Auto Start/Stop with Blue Iris" checked, I can select CUDA, Default Object Detection, Facial Recognition, Mode, and Time Out. If I uncheck "Auto Start/Stop with Blue Iris" then all of those items are greyed out except Default Object Detection.

Use Custom model Folder is greyed out still no matter if Auto Start/Stop is checked or unchecked. Confirmed after multiple restarts of BI and the VM. Strange. Anyone else have this issue?
 

NNate

n3wb
Joined
Jan 13, 2021
Messages
1
Reaction score
1
Location
USA
Is there support for a Coral unit yet? I have a Debian NUC sitting idle with a PCI Coral device in it. Would love to run CP from that and just point BI to it.
No, but it sounds like it's on the roadmap per a comment on their forum stating they got a Coral device to test/play with: CodeProject.AI Server: AI the easy way. Hopefully that links properly - otherwise just search that message board for Coral

I'm waiting for it myself since I finally received my Coral device after a 9 month wait.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
2,780
Reaction score
2,344
Location
United Kingdom
How refreshing to once again find Docker self-updating and running the latest image.

DockerDesktop is perfect for apps like this under constant development;
  • Single command to download and deploy Code.Project.AI Server (always self-restarts, if it stops for any reason)
  • Watchtower ensures Code.project.AI is always running the latest version
So no need to worry about clean un-installs\upgrades
No need to worry about dependencies\optimal configuration
Doesn't bog down windows, with legacy registry keys\settings\temp files. Replace the container and it's gone
More secure than a native windows app
No compatibility issues, just works as the developer intended
I just today installed Docker Desktop for Windows, made sure WSL2 was limited to only use 2GB of RAM (for now), pulled the latest version of CodeProject:AI Server and ran it on port 32168. All seems to be working, only performed a few benchmark tests and detection tests to see what the response time was like, am getting anywhere between 150ms all the way upto 490ms, not that great but then again I only have a lowly i5-6500 with 16Gb of RAM.

Will play around with it over the weekend when I plan to add another cam to my system so I might use this new cam as a test cam to test the overall performance.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
1,155
Reaction score
2,567
Location
Brooklyn, NY
No, but it sounds like it's on the roadmap per a comment on their forum stating they got a Coral device to test/play with: CodeProject.AI Server: AI the easy way. Hopefully that links properly - otherwise just search that message board for Coral

I'm waiting for it myself since I finally received my Coral device after a 9 month wait.
I was just on a zoom call with Chris from CP.AI and he does have a Coral device, he showed it to me. So they are working on adding support.
 

spammenotinoz

Pulling my weight
Joined
Apr 4, 2019
Messages
324
Reaction score
249
Location
Sydney
I just today installed Docker Desktop for Windows, made sure WSL2 was limited to only use 2GB of RAM (for now), pulled the latest version of CodeProject:AI Server and ran it on port 32168. All seems to be working, only performed a few benchmark tests and detection tests to see what the response time was like, am getting anywhere between 150ms all the way upto 490ms, not that great but then again I only have a lowly i5-6500 with 16Gb of RAM.

Will play around with it over the weekend when I plan to add another cam to my system so I might use this new cam as a test cam to test the overall performance.
If you want to always have the latest container running, Watchtower is good. By-default will check your containers once every 24hours, if it finds a new container will download it, and start the new one with the same actions as the old one.
You can use labels to exclude containers form the automatic upgrades.
docker run -d --name watchtower --restart always -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower
Here's the command I used for my docker container (default port 5000)
docker run -d -p 5000:5000 --name 'SenseAI-ServerGPU' --restart always --gpus all -e VISION-GENERAL=true -e Mode=Medium codeproject/ai-server:gpu

CPU would be
docker run -d -p 5000:5000 --name 'SenseAI-Server' --restart always -e VISION-GENERAL=true -e Mode=Medium codeproject/ai-server
 

Tusabrat

n3wb
Joined
Sep 26, 2022
Messages
17
Reaction score
7
Location
Spain
Hmmm. If I have "Auto Start/Stop with Blue Iris" checked, I can select CUDA, Default Object Detection, Facial Recognition, Mode, and Time Out. If I uncheck "Auto Start/Stop with Blue Iris" then all of those items are greyed out except Default Object Detection.

Use Custom model Folder is greyed out still no matter if Auto Start/Stop is checked or unchecked. Confirmed after multiple restarts of BI and the VM. Strange. Anyone else have this issue?
Hi - my first post here, total newbie to all this. I had this same issue - I think it's caused by the AI service still running in the background. For me, I opened Services, stopped the Codeproject.AI service (I have issues stopping it, always have to stop twice as it always times out the first time), then, when it has stopped, go back to BI and the Custom checkbox is available. I make my selection, then restart the AI service.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,202
Reaction score
2,155
Hi - my first post here, total newbie to all this. I had this same issue - I think it's caused by the AI service still running in the background. For me, I opened Services, stopped the Codeproject.AI service (I have issues stopping it, always have to stop twice as it always times out the first time), then, when it has stopped, go back to BI and the Custom checkbox is available. I make my selection, then restart the AI service.
Thanks! I’ll give this a try today! Oh and welcome to the forum!
 

Tusabrat

n3wb
Joined
Sep 26, 2022
Messages
17
Reaction score
7
Location
Spain
Thanks! I’ll give this a try today! Oh and welcome to the forum!
Thanks! My head feels like it's going to explode trying to get a grip on all this. I'm using BI primarily to keep an eye on my cats, so trying to find the settings to give the most reliable alerts is proving difficult. Mostly my big cat (8kg) is being flagged as a dog - don't mind that, as long as he gets flagged. But, I'm getting people flagged as dogs and cats too.... so lots of tinkering to do. May have to delve into my own AI training as my one cat is roughly the same colour as the floorboards, so I can't use the contrast setting...
 

105437

BIT Beta Team
Joined
Jun 8, 2015
Messages
1,636
Reaction score
693
The better support for older NVidia GPUs was added with all the help from users that tested my revised process.py. Below is the revised code.

PHP:
device_name = torch.cuda.get_device_name(self.device)
# https://www.nvidia.com/en-us/design-visualization/previous-quadro-desktop-gpus/
no_half = ["TU102","TU104","TU106","TU116", "TU117",
           "GeForce RTX 2060", "GeForce RTX 2070", "GeForce RTX 2080",
           "GeForce GTX 1650", "GeForce GTX 1660", "MX550", "MX450",
           "Quadro RTX 8000", "Quadro RTX 6000", "Quadro RTX 5000", "Quadro RTX 4000"
           "Quadro P1000", "Quadro P620", "Quadro P400",
           "T1000", "T600", "T400","T1200","T500","T2000",
            "Tesla T4"]
self.half = not any(check_name in device_name for check_name in no_half)
So the P400 is not supported?
 
Top