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/

CrazyAsYou

Getting comfortable
Joined
Mar 28, 2018
Messages
246
Reaction score
262
Location
England, Near Sheffield
Try the attached, I made some changes
I can confirm that the small tweaks to process.py allows CUDA to work using a GTX 1650 :)

if cuda and "GeForce GTX 16" in torch.cuda.get_device_name():
self.half = False
 

toastie

Getting comfortable
Joined
Sep 30, 2018
Messages
254
Reaction score
82
Location
UK
I wasn't really expecting the replacement of process.py would get CP AI working here with my Quadro T600 GPU, as it seems to be with those having a GTX 16XX GPU, and this proved to be so.
Apart from seeing a lot of "Nothing found" in the log files in BI Status, and in the logs in Program Files>CodeProject>AI> nothing shows up that I interpret as being of significance.

Mike, the CP Dashboard with this latest software, how do I get to display the choice of running Code Project in CPU mode or GPU mode?
In BI Global Settings>AI I am using AI server on 127.0.0.1 and in the next box port 5000. Should it be any different than port 5000. I see other posts suggesting a different port is being used.

Bi here with 8 cameras CPU is between 6% to 7%, RAM 700.9M, GPU 15%
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
I wasn't really expecting the replacement of process.py would get CP AI working here with my Quadro T600 GPU, as it seems to be with those having a GTX 16XX GPU, and this proved to be so.
Apart from seeing a lot of "Nothing found" in the log files in BI Status, and in the logs in Program Files>CodeProject>AI> nothing shows up that I interpret as being of significance.

Mike, the CP Dashboard with this latest software, how do I get to display the choice of running Code Project in CPU mode or GPU mode?
In BI Global Settings>AI I am using AI server on 127.0.0.1 and in the next box port 5000. Should it be any different than port 5000. I see other posts suggesting a different port is being used.

Bi here with 8 cameras CPU is between 6% to 7%, RAM 700.9M, GPU 15%
Run the attached script and post the results. I think it is the same issue as the GTX 16XX GPU and should be able to fix it.
Port 5000 for now works but the correct port should be 32168
To disable the GPU open up the dashboard and click on the ... next to the module. If you do not see the dashboard like the below screenshot do a Ctrl+F5 to refresh the page.

1664040523617.png
 

Attachments

toastie

Getting comfortable
Joined
Sep 30, 2018
Messages
254
Reaction score
82
Location
UK
Thanks Mike but here not really any progress. I'm on the same process.py file that you last posted.
I changed the port to 32186 but still getting the same results, Detect Scene yes, otherwise no predictions otherwise, or "Nothing found" despite lots of green ticks in BI Status log AI.. Compared with you I have all green bars enabled except Object Detection (NET). Background Remover is green and CPU, all the others GPU(CUDA). I have 196 events in YOLO. It keeps going up and up as I write this reply, 202 now, 248 now.
Why don't I have any framing of objects that AI is processing. Perhaps it's not getting through to the engine?

My hardware info I did post before but it's attached here again.
Night time here and not the best time to be doing tests as there's less activity around the property.

On the cameras' AI should I select main stream if available? They currently are not.
To confirm box: nothing
To cancel: banana.
Custom models: ipcam-combined mostly, some cameras have ip-general.
Mark as vehicle: car,truck,bus,vehicle.

In Global Settings AI Default Object Selection remains de-seleted.
 

Attachments

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
Thanks Mike but here not really any progress. I'm on the same process.py file that you last posted.
I changed the port to 32186 but still getting the same results, Detect Scene yes, otherwise no predictions otherwise, or "Nothing found" despite lots of green ticks in BI Status log AI.. Compared with you I have all green bars enabled except Object Detection (NET). Background Remover is green and CPU, all the others GPU(CUDA). I have 196 events in YOLO. It keeps going up and up as I write this reply, 202 now, 248 now.
Why don't I have any framing of objects that AI is processing. Perhaps it's not getting through to the engine?

My hardware info I did post before but it's attached here again.
Night time here and not the best time to be doing tests as there's less activity around the property.

On the cameras' AI should I select main stream if available? They currently are not.
To confirm box: nothing
To cancel: banana.
Custom models: ipcam-combined mostly, some cameras have ip-general.
Mark as vehicle: car,truck,bus,vehicle.

In Global Settings AI Default Object Selection remains de-seleted.
You need to add some of the desired objects (person, car, truck, etc..) into the "To Confirm:" box for each camera.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
Thanks Mike but here not really any progress. I'm on the same process.py file that you last posted.
I changed the port to 32186 but still getting the same results, Detect Scene yes, otherwise no predictions otherwise, or "Nothing found" despite lots of green ticks in BI Status log AI.. Compared with you I have all green bars enabled except Object Detection (NET). Background Remover is green and CPU, all the others GPU(CUDA). I have 196 events in YOLO. It keeps going up and up as I write this reply, 202 now, 248 now.
Why don't I have any framing of objects that AI is processing. Perhaps it's not getting through to the engine?

My hardware info I did post before but it's attached here again.
Night time here and not the best time to be doing tests as there's less activity around the property.

On the cameras' AI should I select main stream if available? They currently are not.
To confirm box: nothing
To cancel: banana.
Custom models: ipcam-combined mostly, some cameras have ip-general.
Mark as vehicle: car,truck,bus,vehicle.

In Global Settings AI Default Object Selection remains de-seleted.

Follow the instructions in the above post using the attached. This should make CUDA work for you
 

Attachments

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
370
Reaction score
485
Location
USA
Not to contradict any of the true experts here, but my experience has been that it is far more important to add items into the "To confirm:" box than the "Mark as vehicle:" box. In fact, my understanding of the latter is that it only comes into play at all if these AI detections are being passed along to one of the paid/third-party companies that do further refinements (LPR, etc...).
 

Philip Gonzales

Getting comfortable
Joined
Sep 20, 2017
Messages
697
Reaction score
551
You guys are a lot more patient than me, I'm glad you are there testing all this, and I'm sure CodeProject really appreciates you, meanwhile I'm gonna wait this out for awhile.
Contrary to the issues with GPU functionality the CPU side of things is solid and working well.
Coming from Deepstack to SenseAI and having a 1650 Super, I literally just ran the installer for Sense AI 1.6.0.0 followed by replacing the process.py file as Mike instructed. I didn't even uninstall Deepstack. It just worked after that.

Unsure if I should have ran the cuDNN script or not, but I believe I did this manually as part of the Deepstack install. Everything seems to be working so I hope I am good on that front.

Most of my detection times were under 100ms and some even under 50ms today, so seems working well to me.

That being said, I know nothing about custom models (or models in general). In fact I have some questions about this if anyone cares to explain the basics? Or point me where it may have been explained already? I have two main questions in this regard.

1. I saw someone using some delivery model to get alerted when a delivery vehicle is detected. How would I go about setting this up? Will it effect what I am currently confirming on? Like if I figure out how to add this model, is the default model still used so I can continue to get alerted on person, car, etc?

2. What is the recommended model to help with headlights at night. That's pretty much the only issue I've had with AI in the past. I have the portion in front of my house zoned off but any lights cause the AI detection to start long before the vehicle is actually in frame. Maybe about 30 seconds before more or less. Maybe this is not something that can be made better but figured I would ask.

Currently what my To confirm looks like. Then I use the Required AI objects from the On Alert action to filter down to only send me a pushover alert for people, dog, or cat... And then all confirmed alerts get sent to a secondary email address in case I want to thumb through them later without firing up UI3.

Screenshot_20220924-202406.png

Any tips or tricks are much appreciated. Sorry for writing a book but had these questions queuing up in my mind from following the thread.
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
740
Reaction score
693
1. I saw someone using some delivery model to get alerted when a delivery vehicle is detected. How would I go about setting this up? Will it effect what I am currently confirming on? Like if I figure out how to add this model, is the default model still used so I can continue to get alerted on person, car, etc?
You can clone the camera and then setup the delivery model accordingly on the cloned camera. The custom model can be found here.
 

Philip Gonzales

Getting comfortable
Joined
Sep 20, 2017
Messages
697
Reaction score
551
You can clone the camera and then setup the delivery model accordingly on the cloned camera. The custom model can be found here.
Thanks, I'll give it a try. I also just realized my real-time images: 999 value is likely not working due to not having anything in the To cancel: box. Added giraffe and I think that may be the ticket to my 2nd question.
 

CrazyAsYou

Getting comfortable
Joined
Mar 28, 2018
Messages
246
Reaction score
262
Location
England, Near Sheffield
If I'm only using ipcam-general.pt assume the setting "MODEL_SIZE": "Small", / small, medium, large, x-large has no effect but the "RESOLUTION": "Medium", / low, medium, high will have?

Also is it possible to complete disable the default model from loading in the new version, I only need custom ipcam-general.pt
 

Dave Lonsdale

Pulling my weight
Joined
Dec 3, 2015
Messages
456
Reaction score
195
Location
Congleton Edge, UK

Follow the instructions in the above post using the attached. This should make CUDA work for you
Bingo Mike - I’ve just replaced the process.py file and AI is working! Thanks a bunch! AI had been down for ages.

I had already installed the latest CP version and so far as I know I’m still using my T600 for the AI. I will now be able to experiment with the various object detection files - ipcam-whatever and the yolo5 family etc. At the moment the registry path is edited to ObjectDetectionYolo\custom-models.
 

toastie

Getting comfortable
Joined
Sep 30, 2018
Messages
254
Reaction score
82
Location
UK
I'm busy with other things so just a short post to say THANKS to you Mike. Code Project AI is working when I open a browser. So it's working with my Quadro T600 GPU, using the test photos, squares are drawn around objects and display the confidence % levels.

However it's not yet working with BI, still "Nothing found". However I'm not sure what I should have in the AI camera settings. Do I need to do another regedit, and therefore what should then be showing in Global settings>AI in the greyed out "Use custom model folder:"?

It's all getting rather exciting.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,141
Reaction score
4,118
Location
Brooklyn, NY
Bingo Mike - I’ve just replaced the process.py file and AI is working! Thanks a bunch! AI had been down for ages.

I had already installed the latest CP version and so far as I know I’m still using my T600 for the AI. I will now be able to experiment with the various object detection files - ipcam-whatever and the yolo5 family etc. At the moment the registry path is edited to ObjectDetectionYolo\custom-models.
Great news, I will have the CP team add the fix the next release.
 
Top