5.5.8 - June 13, 2022 - Code Project’s SenseAI Version 1 - See V2 here https://ipcamtalk.com/threads/codeproject-ai-version-2-0.68030/

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
Finally Ken has done some integration work settings are unlocked

View attachment 141069
Yes, I saw that 5.6.2.1 was just released, with the usual rather minimal release notes alluding to custom CodeProject AI settings. Ok, nice to see, but are we expecting any further refinements that will open up any additional tweaking?
 

Dave Lonsdale

Pulling my weight
Joined
Dec 3, 2015
Messages
456
Reaction score
195
Location
Congleton Edge, UK
Yes, I saw that 5.6.2.1 was just released, with the usual rather minimal release notes alluding to custom CodeProject AI settings. Ok, nice to see, but are we expecting any further refinements that will open up any additional tweaking?
Yes, I'm sure there will be further refinements, but with MikeLud1's help, mine was already working fine. I notice that 5.6.2.1 does not appear to have edited my registry.

Experimenting with object detection models, it seems to me that yolov5 works better than ipcam-general etc. I copied the yolov5l file into the same directory as AI\AnalysisLayer\ObjectDetectionYolo\custom-models and yolov5 finds the objects more reliably and more accurately although CodeProject sometimes does not choose the best image with the highest percentage object confidence. See examples below, including difficult lighting conditions (the cyclist was at dusk):-

Screenshot 2022-09-27 223133.png
Screenshot 2022-09-27 223453.png
Screenshot 2022-09-27 224312.png
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
Yes, I'm sure there will be further refinements, but with MikeLud1's help, mine was already working fine. I notice that 5.6.2.1 does not appear to have edited my registry.

Experimenting with object detection models, it seems to me that yolov5 works better than ipcam-general etc. I copied the yolov5l file into the same directory as AI\AnalysisLayer\ObjectDetectionYolo\custom-models and yolov5 finds the objects more reliably and more accurately although CodeProject sometimes does not choose the best image with the highest percentage object confidence. See examples below, including difficult lighting conditions (the cyclist was at dusk):-

View attachment 141073
View attachment 141075
View attachment 141076
Interesting, yes I agree that overall CPAI is working well, and the speed is pretty good even on a CPU only system (I am averaging 160ms times on a i5-8500). I haven't been able to get the yolov5l working yet: I did copy it into the same folder, and changed the model name in the camera AI settings, but it wasn't working for me. I will double check everything and try again tonight.

One thing I have noticed and am curious if others have as well: I know that Ken recently made some changes that are supposed to improve "static object detection", yet it seems like I am having more false hits in that area since switching to CPAI about a week ago. For example, often a person walking in front of a parked car will detect the car as in being in motion.
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
And a new update here too :)

View attachment 141078
That's been up for a day or two at least, but I haven tried running it: I did try to install 1.6.1 over a fresh install of 1.6.0 and it failed, maybe that is sorted out now. On the other hand, it probably doesn't have any applicable changes for me (CPU only), as much of the last several days of development seem focused on adding support for more (mostly older) Nvidia cards.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,539
Reaction score
2,765
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.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
And a new update here too :)

View attachment 141078
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)
 

Philip Gonzales

Getting comfortable
Joined
Sep 20, 2017
Messages
697
Reaction score
551
With Blue Iris 5.6.2.1 and CPAI 1.6.2-Beta.

I thought this was working before. Doesn't matter much to me but just pointing out what I see because why not . Maybe bc I am on the bleeding edge?

Screenshot_20220927-205408.png
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
Yep service is running fine. I rebooted and it run fines. The "issue" is only if I hit the stop button in Blue Iris. Simple solution for me, just don't hit the stop button .
Yes, that's one way obviously. :)

I suspect it has to do with the "Auto start/stop with Blueiris" checkbox. Another possible solution rather than a full reboot: exit the BI console, open the Windows "services" app (services.msc), shutdown the BlueIris service, wait for CodeProject AI to also shutdown, then restart the BlueIris service and it will restart CPAI as well. Now you can reopen the BI console.
 

Philip Gonzales

Getting comfortable
Joined
Sep 20, 2017
Messages
697
Reaction score
551
The stop/start does work. but you have to allow at least 30-45 seconds before you can hit the start button...give or take :)
I just stopped it, waited a minute, got distracted... A few minutes later I got a pushover alert for a cat on our cars. Lol. Meh, I suppose I could set the service to manual just to test this but seems I don't need to use the buttons anyhow lol.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
I just stopped it, waited a minute, got distracted... A few minutes later I got a pushover alert for a cat on our cars. Lol. Meh, I suppose I could set the service to manual just to test this but seems I don't need to use the buttons anyhow lol.
If BI tries to do a detection and the AI server does not respond BI will try to restart the service, if you look through the log you will see the failure and restart.
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
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?
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
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?
For me Yolo is used by default, no need to copy the custom model.
Leave custom models blank and ensure Default Object Detection is set.

1664343595057.png1664343650039.png1664343457000.png
 

spammenotinoz

Getting comfortable
Joined
Apr 4, 2019
Messages
345
Reaction score
274
Location
Sydney
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
 

wepee

Getting the hang of it
Joined
Jul 16, 2016
Messages
248
Reaction score
57
To improve accuracy you can make the below change to the modulesettings.json. Also you should uncheck Use main stream if available, having it check does not improve accuracy it only slows down the detection.

View attachment 141052
View attachment 141051
View attachment 141053
@MikeLud1, even though I shut down CodeProject.AI services running in the background, I cannot overwrite the edited modulesettings.json file, why?
Not to worry, I found the solution, I need to open up Notepad as administrator, and search the file: modulesettings.json file within notepad,
edit the file, save it. No problem. Thanks anyway.:)
 

Attachments

Last edited:

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
@MikeLud1, even though I shut down CodeProject.AI services running in the background, I cannot overwrite the edited modulesettings.json file, why?
The file does not allow edit unless you change the file ownership.
The simple solution is: Copy the file to your desktop, edit it and then Copy over the original file. Alternatively I'm guessing (haven't tried) taking ownership of the file will also work.
 

wepee

Getting the hang of it
Joined
Jul 16, 2016
Messages
248
Reaction score
57
The file does not allow edit unless you change the file ownership.
The simple solution is: Copy the file to your desktop, edit it and then Copy over the original file. Alternatively I'm guessing (haven't tried) taking ownership of the file will also work.
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. :)
 
Top