CodeProject.AI Version 2.0

It would be interesting to see some benchmarks with different systems, running two instances

Because if with one instance it takes 100ms and with two takes 200ms, you have gained nothing...
 
It would be interesting to see some benchmarks with different systems, running two instances

Because if with one instance it takes 100ms and with two takes 200ms, you have gained nothing...
I was thinking of using different ports/instances for different cameras, as if you have multiple cams triggering at the same time they currently all rely on the one instance.
I wonder if he's got something in mind with the greyed out instance field
 
I'd like to see Coral TPU vs CPU alone plus I'd like to see some improvements to it's tuning as I gather it's not particuarly quick atm with CPAI yet with the amount of TFLOPS it has, you'd expect to see a big improvement. We also need to see it integrated to windows as I understand its on Linux only for CPAI.
 
I'd like to see Coral TPU vs CPU alone plus I'd like to see some improvements to it's tuning as I gather it's not particuarly quick atm with CPAI yet with the amount of TFLOPS it has, you'd expect to see a big improvement. We also need to see it integrated to windows as I understand its on Linux only for CPAI.
It also depends on what number format it uses. NNs with multiple layers eat the binary precision. Also models must be re-quantized for each alternative format to give any result. So the TPU may be quick and low power on INT8 and FP16 but may not be able to supply the required precision. The precision will be worse anyway after re-quantization to lower word length. Desktop CPUs have a big advantage from high word length FP formats.
 
  • Wow
Reactions: CCTVCam and Nunofya
I see that there is a Instances Box for Codeproject in BI.
Can we have more than 1 running like with could with deepstack?
Mine is greyed out.

How can we enable more than one with a different port? If possible?

Thanks


chatgpt told me this? Was easier with deepstack, just entered 2 port numbers.
You could always Clone your Camera...Just be sure and check off your Clone master and uncheck any Cloned CAMs
1687997212297.png

I have a Clone of this CAM to capture Delivery Vehicles:
1687997352823.png1687997409345.png

When Done right you will see no Bitrate from your Cloned CAM:
1687997680319.png
 
  • Like
Reactions: Pentagano
You could always Clone your Camera...Just be sure and check off your Clone master and uncheck any Cloned CAMs
View attachment 166481

I have a Clone of this CAM to capture Delivery Vehicles:
View attachment 166482View attachment 166483

When Done right you will see no Bitrate from your Cloned CAM:

View attachment 166484
Thanks yes that is one option. I do have one cloned at the moment. I see you have mainstream ticked. Does this make any difference apart from increasing the inference speed? I always understood subs should be used for ai.
 
  • Like
Reactions: David L
Thanks yes that is one option. I do have one cloned at the moment. I see you have mainstream ticked. Does this make any difference apart from increasing the inference speed? I always understood subs should be used for ai.
I am sure it would speed up things by using Substreams but I get around 70ms on a 970 4gig card which presently works for me. If I add more CAMs I will probably look at Subs.
1687998322442.png
 
Same card as mine gtx970?
Good to know. Thanks
Mike has us all beat with his 4090... :cool:


I have a 3080 for my Gaming, I will not give it up for AI :)
 
Last edited:
  • Haha
Reactions: Pentagano
Mike has us all beat with his 4090... :cool:


I have a 3080 for my Gaming, I will not give it up for AI :)
Ah yes I remember we talked about our cards David. Fast for its age.
Didn't see your name on my phone. Extra large fonts for my bad eye sight so doesn't always render everything in 1 view
 
  • Like
Reactions: David L
  • Like
Reactions: David L
  • Like
Reactions: Pentagano
I added DoNotCancel and put 999 in the + real=time images. trigger time is set at 10 seconds with 250ms snapshots so that is fine I believe. Still tweaking.

Love the .dat file for the analysis in the BI window!! really useful info.
Added main streams and ticked the box -The gtz970 still works them fast.
 
I added DoNotCancel and put 999 in the + real=time images. trigger time is set at 10 seconds with 250ms snapshots so that is fine I believe. Still tweaking.

Love the .dat file for the analysis in the BI window!! really useful info.
Added main streams and ticked the box -The gtz970 still works them fast.
Using main stream does not get you anymore accuracy it just slows down the detection because the AI models are trained at a resolution of 640 x 640 and before the image goes through the detection the image needs to be resized to be no greater then a resolution of 640 x 640. The higher the resolution the longer it takes to do this resizing.
 
Using main stream does not get you anymore accuracy it just slows down the detection because the AI models are trained at a resolution of 640 x 640 and before the image goes through the detection the image needs to be resized to be no greater then a resolution of 640 x 640. The higher the resolution the longer it takes to do this resizing.
OK good to know thanks.
Even though the Blueiris manual mentions that ticking this maan stream option may give you better results.
The tech behind the detection process doesn't quite align with his statement there then.
Why is this option even on Blueiris if it does not make any difference?

What is the optimum number of pixels for detection? I believe this would depend on the camera. Looking at my snapshots in Alerts
Sub: 768x432 74KB approx (High definition box ticked)
Main: 1920x1080 177KB approx
 
Last edited:
Using main stream does not get you anymore accuracy it just slows down the detection because the AI models are trained at a resolution of 640 x 640 and before the image goes through the detection the image needs to be resized to be no greater then a resolution of 640 x 640. The higher the resolution the longer it takes to do this resizing.


That's interesting and throws up a flaw in the system. Many set sub streams at much higher resolutions than 640 x 640 these days because they use BVR recording as well a triggered recording.

eg. I run my sub stream at full hd ie 1920 x 1080 and 4,000kbs because my sub stream is recorded as BVR not just observed. The main is at 4k and 16,800kbs.
 
That's interesting and throws up a flaw in the system. Many set sub streams at much higher resolutions than 640 x 640 these days because they use BVR recording as well a triggered recording.

eg. I run my sub stream at full hd ie 1920 x 1080 and 4,000kbs because my sub stream is recorded as BVR not just observed. The main is at 4k and 16,800kbs.
Doesn't that defeat the purpose of the substream?
Same specs as the default main.
Basically you are modifying the sub to the same specs as the main
 
Doesn't that defeat the purpose of the substream?
Same specs as the default main.
Basically you are modifying the sub to the same specs as the main

The specs are not the same as the main:

My Sub: Full HD (1920 x 1080) @ 4,000 kbs.

My Main: 4K (3840 x 2160) @ 16,800 kbs.

The sub is 1/4 the main in both resolution and bit rate.

4,000KBS would be low btw for a 4K camera anyway as a baseline. I'm sure most would recommend around 10,000kbs @ 4k. 16,800 is high and probably could be dropped a little, but I'm trying to extract the maximum quality as even with those bit rates and recordings, I can get around a month from a 4tb hard drive and that includes the sub being recorded BVR so 24/7 continuously on both cameras. Maybe not for everyone, but for someone with only a few cameras (or a larger hard drive), not an issue.
 
  • Like
Reactions: Gyula614
The specs are not the same as the main:

My Sub: Full HD (1920 x 1080) @ 4,000 kbs.

My Main: 4K (3840 x 2160) @ 16,800 kbs.

The sub is 1/4 the main in both resolution and bit rate.

4,000KBS would be low btw for a 4K camera anyway as a baseline. I'm sure most would recommend around 10,000kbs @ 4k. 16,800 is high and probably could be dropped a little, but I'm trying to extract the maximum quality as even with those bit rates and recordings, I can get around a month from a 4tb hard drive and that includes the sub being recorded BVR so 24/7 continuously on both cameras. Maybe not for everyone, but for someone with only a few cameras (or a larger hard drive), not an issue.
Your sub is more than my main
Same resolution but higher bitrate

Unticking the high definition box reduces the size to about 15kb

Will try with this for a few days
 
Last edited:
  • Like
Reactions: CCTVCam