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/

woolfman72

Getting the hang of it
Joined
Dec 28, 2015
Messages
152
Reaction score
73
I've set up CodeProject AI and have had fairly good success. I'm still struggling with nighttime detection though (I posted this on a separate thread and got some advice but still having issues).

Camera is IPC-T2431T-AS. It's pointed at my driveway. Quite simply I want it to alert when there's a vehicle, dog or person in the view, at all hours.

Daytime: Near-perfect performance.

Nighttime: everything gets wonky (on this one and another nearby one).

I've done a bunch of tweaking, and on the alert clips I can see the vehicles perfectly. Lots of contrast, very clear image, and the "Analyze with AI" shows confidence >90% on the playback. It's triggering via motion so at least it's recording, but it's not generating an alert.

Here is a screenshot and my settings. The only reason this alerted is because it picked up on Person, otherwise it would have ignored the video.

By the way, is ipcam-dark actually meant to detect objects better at night? Or is that mistaken thinking? Should I be using a different custom model? I started off with the built-in models and am trying the custom ones to see if they work better but they seem about the same.

View attachment 145929
View attachment 145930

View attachment 145933View attachment 145932
I've noticed the same issues. I have two computers running BI right now. One with DS and another with SAI. Both are rock solid during the day and at night Senseai is dropping the ball when i compare the alerts between the two. Also getting tags in my lpr yet the driveway cam isnt catching the cars drive by and this is an 180 degree 4k so no reason it should be missing anything as it has a whole shot of the street.
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
764
Reaction score
761
Don’t think so - how do I load that one? Don’t see it in the custom models.
You need to copy the yolov5l.pt file from the default folder (C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\assets) to your custom model folder.

Screen Shot 2022-11-18 at 6.40.32 AM.png
 
Last edited:

gwithers

Getting the hang of it
Joined
May 18, 2016
Messages
49
Reaction score
38
Just to reinforce what "Actran" mentioned, the ipcam-dark model ONLY has labels that start with capital letters and you should not get any confirmations when using lower case labels (I know I do not as DS/CPAi are case sensitive). It would makes sense that day time would be working with lower case labels as one would not normally set the custom model to ipcam-dark for day time use and the other models use lower case. Also remember there are individual AI settings for for Day and Night profiles and perhaps you have a different model selected for day use and that one would use lower case labels.

Or perhaps this is more of a push notification issue and less of a CPAi configuration issue (which admittedly I was focusing in on).
 

OfficerD00fy

Young grasshopper
Joined
Jun 22, 2018
Messages
97
Reaction score
16
Location
Australia
Struggling to find the sweetspot for night time. The cars headlights coming into view causes the senseai to scan photos with only the cars headlight in view thus missing the car. The issue is some cars drive very fast (detected by sense AI) and others very slow (headlight only scanned).
What settings should I modify? I've tried 100,200,500,750 ms and am constantly missing different cars at different points. No pre recording as well. I've set up the front house cameras with NO SUBSTREAM's to ensure they are working properly (5%-10% usage total on Ryzen 2600 + 1060GPU).
Can anyone provide advice on what I should change? Increase the photos taken to something like 30? and 250ms?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
26,035
Reaction score
50,902
Location
USA
Struggling to find the sweetspot for night time. The cars headlights coming into view causes the senseai to scan photos with only the cars headlight in view thus missing the car. The issue is some cars drive very fast (detected by sense AI) and others very slow (headlight only scanned).
What settings should I modify? I've tried 100,200,500,750 ms and am constantly missing different cars at different points. No pre recording as well. I've set up the front house cameras with NO SUBSTREAM's to ensure they are working properly (5%-10% usage total on Ryzen 2600 + 1060GPU).
Can anyone provide advice on what I should change? Increase the photos taken to something like 30? and 250ms?
Simple fix LOL.

Under AI for the camera, add more "+ real time images" and use the "To cancel" box and add in an item you wouldn't see so that it forces it to use all of the additional images. In my case it is a giraffe LOL.

The to cancel box forces it to run every image. Without it, it will do as you are seeing.
 

dockdoc

Young grasshopper
Joined
Dec 27, 2021
Messages
42
Reaction score
18
Location
Charlotte NC
Just to reinforce what "Actran" mentioned, the ipcam-dark model ONLY has labels that start with capital letters and you should not get any confirmations when using lower case labels (I know I do not as DS/CPAi are case sensitive). It would makes sense that day time would be working with lower case labels as one would not normally set the custom model to ipcam-dark for day time use and the other models use lower case.
I don't think that's accurate. The only model I have loaded is ipcam-dark (default models unchecked), and everything is lowercase and I'm still getting perfect daytime notifications.

Also remember there are individual AI settings for for Day and Night profiles and perhaps you have a different model selected for day use and that one would use lower case labels.
Same model being used for day and night. I only have my trigger profile scheduled to switch at 1am, otherwise it uses the same profile well into the night.[/QUOTE]

Or perhaps this is more of a push notification issue and less of a CPAi configuration issue (which admittedly I was focusing in on).
I think I've ruled that out since I am getting push notifications on this camera and others ( with the same configuration) but not consistently.[/QUOTE]

You need to copy the yolov5l.pt file from the default folder (C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\assets) to your custom model folder.
Thanks - I'll give this one a try and see how it goes.

I'm rapidly reaching the conclusion that the AI just doesn't work with this field of view at night, for whatever reason, especially with vehicles.
 

OfficerD00fy

Young grasshopper
Joined
Jun 22, 2018
Messages
97
Reaction score
16
Location
Australia
Simple fix LOL.

Under AI for the camera, add more "+ real time images" and use the "To cancel" box and add in an item you wouldn't see so that it forces it to use all of the additional images. In my case it is a giraffe LOL.

The to cancel box forces it to run every image. Without it, it will do as you are seeing.
Awesome I'll give that a try...

Are you talking about an LPR camera?
Nah not the LPR, LPR working fine at the moment.
 

OfficerD00fy

Young grasshopper
Joined
Jun 22, 2018
Messages
97
Reaction score
16
Location
Australia
Simple fix LOL.

Under AI for the camera, add more "+ real time images" and use the "To cancel" box and add in an item you wouldn't see so that it forces it to use all of the additional images. In my case it is a giraffe LOL.

The to cancel box forces it to run every image. Without it, it will do as you are seeing.
Would this work with the LPR too?
 

gwithers

Getting the hang of it
Joined
May 18, 2016
Messages
49
Reaction score
38
I can only confirm that in my setup, the labels are case sensitive in terms of BI specific functions, such as the "to confirm" based alert functionality. As I understand it, these labels used to confirm object detection and fire off an alert in BI is not actually the same thing as the CPAi inference testing and the results we can see in the BI AI debug window. For example, if I am running just the ipcam-dark model, I will get "nothing found" on alerts as seen in BI when I have "car" in "to confirm" but the AI debug window for that same clip shows it found a "Car" with enough confidence to satisfy my AI criteria in BI. This is expected behavior as far as I can tell as the BI alert label values and CPAi finding objects in a model are two independent things. As it is the BI portion that confirms it found a certain object (via the label) and fires off a notification based on that confirmation, it is that portion where the labels matter. CPAi doesn't care what BI is looking for in terms of objects (label) and when BI sends it images to process, it processes the images against all the labels in that model. This is why the ipcam-xxxx models are faster than the standard model (yolov5), because it has fewer objects it is looking for and inference times are lower because of that. This is my understanding of the process but others in this thread certain have a deeper understanding than I.
 
Last edited:

1fxman

Pulling my weight
Joined
Aug 29, 2018
Messages
273
Reaction score
143
Location
Oklahoma
Thanks. I also notice when I have the contrast at 20 in goes crazy. But when I increase it, oh about to 25, it stops triggering over and over. when I get back tomorrow i’ll uncheck the camera’s digital input. Thank you.
So, my CPAI is running. But last night it started snowing and man did it go crazy. The old day’s, before DSAI, cameras would do the same. With rain, snow, clouds, light change, shadows, etc. DeepStack stoped all of that, BAM, right of the bat. But this CPAI not so much. I got it to send less “nothing found” alerts but it still sends the occasional opossum, raccoon, cat, etc. All I want is people and vehicles. Maybe I need to figure out a little about the models and how to load them. Thanks.
 

gwithers

Getting the hang of it
Joined
May 18, 2016
Messages
49
Reaction score
38
So, my CPAI is running. But last night it started snowing and man did it go crazy. The old day’s, before DSAI, cameras would do the same. With rain, snow, clouds, light change, shadows, etc. DeepStack stoped all of that, BAM, right of the bat. But this CPAI not so much. I got it to send less “nothing found” alerts but it still sends the occasional opossum, raccoon, cat, etc. All I want is people and vehicles. Maybe I need to figure out a little about the models and how to load them. Thanks.
That is a problem I have run into as well, especially with cameras that turn on some inbuilt IR emitters at night. Aside from using remote IR emitters or cameras that can stay color in low light, I found manipulating the minimum time between alerts as a bulk way to limit the massive amounts of alerts that can be triggered by rain/snow. Then limiting the confirm labels to just the ones you want and adjusting confidence levels for the specific labels you want to get alerts for. Here is an example where you will only get alerts for a car and truck with 50% confidence or higher, and a person with 55% confidence or higher using the yolov5l model but the same applies to the ipcam-general model which would only look for the person and vehicle labels as that is all it contains (you would use the labels "person,vehicle" for that model).
1668789624244.png1668789719400.png
 

1fxman

Pulling my weight
Joined
Aug 29, 2018
Messages
273
Reaction score
143
Location
Oklahoma
That is a problem I have run into as well, especially with cameras that turn on some inbuilt IR emitters at night. Aside from using remote IR emitters or cameras that can stay color in low light, I found manipulating the minimum time between alerts as a bulk way to limit the massive amounts of alerts that can be triggered by rain/snow. Then limiting the confirm labels to just the ones you want and adjusting confidence levels for the specific labels you want to get alerts for. Here is an example where you will only get alerts for a car and truck with 50% confidence or higher, and a person with 55% confidence or higher using the yolov5l model but the same applies to the ipcam-general model which would only look for the person and vehicle labels as that is all it contains (you would use the labels "person,vehicle" for that model).
View attachment 145967View attachment 145968
Okay. I’ll try your suggestions. one thing that I did learn, after reading artIcal “how to setup CPAI”, is on how to work with the custom models. I do have all but one of my 13 cameras lit up at night with white light. So to limit problems with bugs & spiders. I’m going to go over this whole thread as to learn more on what I doing. Thanks.
 

toastie

Getting comfortable
Joined
Sep 30, 2018
Messages
255
Reaction score
82
Location
UK
CP in BI is here is mostly working well enough, my thanks to Mike and everyone else concerned.
I think though I could do even better if I tweak a few settings.
This evening a camera covering our back garden was triggered in BI by a passing fox, nothing though came through to my AI clips
I'm on ipcam-combined, min confidence 50% which I've now reduced to 40%. AI did see the fox but lower than my 50% setting, so I suppose that's why it didn't appear in Alert clips.

I'm on ipcam-combined with my Quadro T600 GPU, BI Status>AI reports n=109946 and t_ave=74ms.
What would be reasonable settings to set for each of my cameras Trigger>AI min confidence %, the number of real time images, and the analyze one each ms time?
Currently they are mostly all set at 50%, 10 images, and analyze time of 200ms.

I'm interested what's working well for you, min confidence, real time images, and analyze each one X ms?
 

Nunofya

Getting comfortable
Joined
Nov 8, 2021
Messages
356
Reaction score
275
Location
USA
Coming soon CodeProject.AI 2.0 release which provides a new installer and module story. My ALPR module will be in this release also an OCR module
Been watching and waiting to move from DS. Is this the release you recommend switching when this comes out?
 
Top