CodeProject.AI Version 2.5

Use a USB-ethernet adaptor for the internet NIC - cheaper than a VLAN switch and opens up a PCIe slot.
This is very common now with all the popular thin laptops out there that no longer have RJ-45 Ports too...
 
Thanks for the advice of the USB / ethernet adapter.

So for the Dell SFF the slot the GPU would go into is only PCIe x1 and not x16 so wouldn't be taking advantage of the GPU to full capacity. I looked at an HP EliteDesk that I keep meaning to migrate to but the length of the card has to be less than 7 inches. :banghead: I'll keep looking / debating new build.

In the meantime...

CPAI seems to run MUCH better on Linux (so far). Only problem there is if I reboot the machine the CPAI service is offline when the PC comes back up. In other words, after rebooting if I go to the Dashboard () it says "Offline". I'm not that familiar with Linux but the instructions said it will install the server running under systemd.

It also said:
To manually start the service, run the command

bash /usr/bin/codeproject.ai-server/start.sh

I think the instructions are old because there was no file there. I did find a file under:

bash /usr/bin/codeproject.ai-server-2.6.5/start.sh

That started the server. However, if close that terminal or reboot I am back to it being Offline. Any ideas? Again, I'm not that familiar with Linux so may be a simple issue that a newb like me doesn't know.

Also, if I don't use sudo I get an error about access to the installconfig.json is denied. Since using sudo solved that I guess that worked.


1723050875659.png

1723051036807.png

This is running in a VM and couldn't copy and past so took the screen shots.

Thanks
 
  • Like
Reactions: David L
Thanks for the advice of the USB / ethernet adapter.

So for the Dell SFF the slot the GPU would go into is only PCIe x1 and not x16 so wouldn't be taking advantage of the GPU to full capacity. I looked at an HP EliteDesk that I keep meaning to migrate to but the length of the card has to be less than 7 inches. :banghead: I'll keep looking / debating new build.

In the meantime...

CPAI seems to run MUCH better on Linux (so far). Only problem there is if I reboot the machine the CPAI service is offline when the PC comes back up. In other words, after rebooting if I go to the Dashboard () it says "Offline". I'm not that familiar with Linux but the instructions said it will install the server running under systemd.

It also said:
To manually start the service, run the command

bash /usr/bin/codeproject.ai-server/start.sh

I think the instructions are old because there was no file there. I did find a file under:

bash /usr/bin/codeproject.ai-server-2.6.5/start.sh

That started the server. However, if close that terminal or reboot I am back to it being Offline. Any ideas? Again, I'm not that familiar with Linux so may be a simple issue that a newb like me doesn't know.

Also, if I don't use sudo I get an error about access to the installconfig.json is denied. Since using sudo solved that I guess that worked.




This is running in a VM and couldn't copy and past so took the screen shots.

Thanks
So not running MUCH better in Linux. Getting the same problem in windows which is reverting to CPU after a while. Would still like to learn how to add CPAI as a service at startup though.
 
  • Like
Reactions: David L
So for the Dell SFF the slot the GPU would go into is only PCIe x1 and not x16 so wouldn't be taking advantage of the GPU to full capacity. I looked at an HP EliteDesk that I keep meaning to migrate to but the length of the card has to be less than 7 inches. :banghead: I'll keep looking / debating new build.

I am using a 16x to 8x PCIE adapter to fit the Tesla card on my motherboard. I didn't want to try to cut a through slot in the pci slot end.
1723062593922.png

I had to drill 2 holes for the back plate since the card scooted over from that. I think you can get away with using a 16x to 1x adapter for AI related things though again you have to account for the extra offset from the mobo using a riser card.
1723062730794.png
 
  • Like
Reactions: David L
I have a SFF (small form factor) PC that an only take low profile (half-height) PCIE cards. Can anyone recommend a low power GPU that would fit and still be suitable for CPAI? Currently just need for Object Detection and probably LPR in the near future.

I already have Coral TPUs (PCIe single and duals) right now but CPAI is not mature enough for them yet (IMO) and can't keep spending time troubleshooting/upkeeping. Also,there still isn't support for custom models with TPU and no LPR. Sad because I bought a few TPUs with high hopes when CPAI version 2.5.1 was running good but only single TPU.

I used a GTX 730 with great success for just a couple camera's using the YOLOv5.Net model. The other thing to keep in mind is the SFF PC's have a very limited power supply so actively cooled cards will likely not work.

 
You could also use a PCIe extension cable that will run an extra 5-10" and then hang the GPU outside of the case. The cable extensions work well at PCIe 3.0 speeds, but start to throw errors at 4.0 speeds. You may also need to investigate additional power supply if that's something you're interested in hacking together.

Right now I have a 70 watt A2000 that is SFF-compatible, but is worth 3x my SFF machine itself. I'd like to upgrade because I'm running the A2000 in a thread ripper workstation and have plenty of space, so I could be talked into parting ways with it.
 
Last edited:
I appreciate all the feedback and learned some good stuff. Unfortunately, I am trying to keep this low power as well, hence the Coral TPU in the first place. I saw the GTX 730 and a couple of others that might fit the bill but weren't on Mike L's list of GPU for LPR. Oops, I think I went on a tangent in this thread. :rolleyes: sorry.

If power wasn't an issue I'd move everything over to an older PC I built a few years back that's been sitting offline. I'll have to power it up and do some power consumption comparisons.
 
  • Like
Reactions: David L
I appreciate all the feedback and learned some good stuff. Unfortunately, I am trying to keep this low power as well, hence the Coral TPU in the first place. I saw the GTX 730 and a couple of others that might fit the bill but weren't on Mike L's list of GPU for LPR. Oops, I think I went on a tangent in this thread. :rolleyes: sorry.

If power wasn't an issue I'd move everything over to an older PC I built a few years back that's been sitting offline. I'll have to power it up and do some power consumption comparisons.

What gen is your computer and how many cameras are you running CodeProject on? Maybe you can get by with just the CPU version?
 
  • Like
Reactions: David L
Current PC is a Dell 7060 SFF (i5-8500, 16 GB DDR4). I currently have 24 cameras but not all using AI (I have to go back and check which are using but at least half). I also just bought 6 more that I need to install and add. One was to test LPR which is why I posted the original question. I also have an HP EliteDesk (i7-8700, 16 GB DDR4) I want to migrate to but haven't had the chance. I forget the PC I built but I think it was an i9-9700, 32 GB DDR4. I built it so mid tower with plenty of room and larger power supply if I really need to but I don't think it was efficient.

I ran on the CPU last year with less cameras and would pin the CPU. I have overlap in cameras (especially the front) so when there is motion it can trigger 2-4 cameras at once. The small model size isn't that accurate for some of my situations and found the medium to be the best accuracy and still good response times. Large wasn't much more accurate so not worth the extra processing time. That was all just object detection and no LPR. The LPR camera I just bought has been working well in captures so want to use it. I am going to move it to second location to test opposite side. If that works I'll buy a second camera and have 2 LPR.

If I have time I'll try the CPU again and see if it's more efficient now since it's been a year and CPAI was still in it's infancy back then.

Some cameras don't have people detection so can't use camera AI with ONVIF. The ones that do are usually pretty good but do miss sometimes where the CPAI catches (and sometimes vice versa) so I like to have the redundancy. I'm plan on replacing them eventually over time as budget allows but won't be this year.

What I REALLY need to do is upgrade my UPS which is the biggest pain point and only getting worse as I add more. If I could just win a lottery. :lol:
 
Current PC is a Dell 7060 SFF (i5-8500, 16 GB DDR4). I currently have 24 cameras but not all using AI (I have to go back and check which are using but at least half). I also just bought 6 more that I need to install and add. One was to test LPR which is why I posted the original question. I also have an HP EliteDesk (i7-8700, 16 GB DDR4) I want to migrate to but haven't had the chance. I forget the PC I built but I think it was an i9-9700, 32 GB DDR4. I built it so mid tower with plenty of room and larger power supply if I really need to but I don't think it was efficient.

I ran on the CPU last year with less cameras and would pin the CPU. I have overlap in cameras (especially the front) so when there is motion it can trigger 2-4 cameras at once. The small model size isn't that accurate for some of my situations and found the medium to be the best accuracy and still good response times. Large wasn't much more accurate so not worth the extra processing time. That was all just object detection and no LPR. The LPR camera I just bought has been working well in captures so want to use it. I am going to move it to second location to test opposite side. If that works I'll buy a second camera and have 2 LPR.

If I have time I'll try the CPU again and see if it's more efficient now since it's been a year and CPAI was still in it's infancy back then.

Some cameras don't have people detection so can't use camera AI with ONVIF. The ones that do are usually pretty good but do miss sometimes where the CPAI catches (and sometimes vice versa) so I like to have the redundancy. I'm plan on replacing them eventually over time as budget allows but won't be this year.

What I REALLY need to do is upgrade my UPS which is the biggest pain point and only getting worse as I add more. If I could just win a lottery. :lol:

Do you have to run CodeProject on that many cameras? Do any of the cameras have AI and using that would be sufficient for your needs?

Do you need the orange box around every object? While some of that third party stuff is cool like tagging was it a dog or a bear, I don't need all that fancy stuff. If my camera triggers BI to tag an alert for human or vehicle and BI can accomplish what I need by way of a text or email or push or whatever, that is sufficient for my needs. I just want to be alerted if a person or vehicle is on my property and the camera AI does a fine job with that.

However, I do run BI AI on a few cameras so that it knocks out headlight shine so that the alert image includes the vehicle. The camera AI will trigger for a car, but the alert image was always just the headlights. I also run the ANPR AI module on a few LPR cams.

That has allowed me to run more cameras than you on an older CPU with just CPU.
 
  • Like
Reactions: AlwaysSomething
Do you have to run CodeProject on that many cameras? Do any of the cameras have AI and using that would be sufficient for your needs?

Do you need the orange box around every object? While some of that third party stuff is cool like tagging was it a dog or a bear, I don't need all that fancy stuff. If my camera triggers BI to tag an alert for human or vehicle and BI can accomplish what I need by way of a text or email or push or whatever, that is sufficient for my needs. I just want to be alerted if a person or vehicle is on my property and the camera AI does a fine job with that.

However, I do run BI AI on a few cameras so that it knocks out headlight shine so that the alert image includes the vehicle. The camera AI will trigger for a car, but the alert image was always just the headlights. I also run the ANPR AI module on a few LPR cams.

That has allowed me to run more cameras than you on an older CPU with just CPU.
I'm not sure what you mean about orange boxes. From CPAI perspective I haven't changed anything, it's all OOB. I know it's open source and there are configs that people mess with but I've left it all alone. Only thing I change is the model and model size from the Dashboard. That's it. And that was because I spent days/weeks testing to get the best accuracy for my cameras and coverage.

As far as BI, I followed almost all the recommendations I've read here on this site. Direct to disk, sub streams, no overlays, set zones so not detecting trees moving, I do not highlight motion, etc.. I do have Detect static objects turned off where I can. I need it turned on for a few cameras since there can be parked cars in the driveway and street that would trigger false alarms if I didn't have it turned on. I also save the .dat files for a few cameras because I'm trying to improve the accuracy of some cameras. That's not probably the complete list but you get the point.

I don't have any other software on this box except BI and CPAI so no tagging things. I think we're similar in that I don't need fancy just functional. Obviously that is to a degree thought right? I mean we are trying to get fancy and use AI. ;) But joking aside I'm old school just want the basics and don't care about bells and whistles.

Since it's been a year since I ran on CPU I will give that a shot again when I have a chance. I don't have much time right now plus I have more cameras to install. LOL When I do, I'll also revisit the different models since I think they have added some and maybe improved.

I will also be moving to using Proxmox and VM going forward so that I can have a better way of backups and keeping a stable version. I actually started that last night on the HP EliteDesk. Backups was one area I did not do a good job on. I kept the files but not "true" backups so when reverting it didn't always work. Honestly, everything worked relatively well for a while. A few hiccups here and there but nothing worth me posting on here or CPAI site. :)

I honestly think many of my problems are Windows. I've turned off updates and only allow internet access when updating CPAI (since it needs the internet to pull the files) but I swear every time I allow it to connect it seems like it's running updates anyway (I never trust Microshady). With Proxmox I am also looking at separating CPAI from BI and also running CPAI on Linux. The overhead for an extra VM doesn't seem much but then I can truly keep them separate and keep Windows (BI) off the internet and still allow CPAI internet access when doing upgrades.

Anyway, I typed enough.

Thanks for the input.
 
I'm not sure what you mean about orange boxes. From CPAI perspective I haven't changed anything, it's all OOB. I know it's open source and there are configs that people mess with but I've left it all alone. Only thing I change is the model and model size from the Dashboard. That's it. And that was because I spent days/weeks testing to get the best accuracy for my cameras and coverage.

As far as BI, I followed almost all the recommendations I've read here on this site. Direct to disk, sub streams, no overlays, set zones so not detecting trees moving, I do not highlight motion, etc.. I do have Detect static objects turned off where I can. I need it turned on for a few cameras since there can be parked cars in the driveway and street that would trigger false alarms if I didn't have it turned on. I also save the .dat files for a few cameras because I'm trying to improve the accuracy of some cameras. That's not probably the complete list but you get the point.

I don't have any other software on this box except BI and CPAI so no tagging things. I think we're similar in that I don't need fancy just functional. Obviously that is to a degree thought right? I mean we are trying to get fancy and use AI. ;) But joking aside I'm old school just want the basics and don't care about bells and whistles.

Since it's been a year since I ran on CPU I will give that a shot again when I have a chance. I don't have much time right now plus I have more cameras to install. LOL When I do, I'll also revisit the different models since I think they have added some and maybe improved.

I will also be moving to using Proxmox and VM going forward so that I can have a better way of backups and keeping a stable version. I actually started that last night on the HP EliteDesk. Backups was one area I did not do a good job on. I kept the files but not "true" backups so when reverting it didn't always work. Honestly, everything worked relatively well for a while. A few hiccups here and there but nothing worth me posting on here or CPAI site. :)

I honestly think many of my problems are Windows. I've turned off updates and only allow internet access when updating CPAI (since it needs the internet to pull the files) but I swear every time I allow it to connect it seems like it's running updates anyway (I never trust Microshady). With Proxmox I am also looking at separating CPAI from BI and also running CPAI on Linux. The overhead for an extra VM doesn't seem much but then I can truly keep them separate and keep Windows (BI) off the internet and still allow CPAI internet access when doing upgrades.

Anyway, I typed enough.

Thanks for the input.

By the orange boxes, I mean if you burn in the AI analysis:

1723131012318.png


But if you have cameras with AI, you may find that the camera AI has got so good that doing CodeProject is kinda overkill and adds more complexity, time delay, and potential for issues.

Whether to use camera AI or BI AI is obviously up to you, but of course, the AI in the camera may be more than sufficient for your needs without needing BI AI. Do you need the orange box around every object? Do you want to identify animals or logos? Or is just human or vehicle sufficient.

The camera AI is useful to many people, but BI has way more motion setting granularity than the cameras, and some people need that additional detail, especially if wanting AI for more than a car or person. For folks that want AI and alerts on animals or specifically a UPS truck then they need the additional AI.

There isn't really a best practice because every field of view is different and use case and needs are different.

To many here, BI motion without AI is more than adequate for what they do.

To many here, camera AI is more than adequate for what they do.

To many here, using the BI AI adds additional functionality that the above alone can not do.

It comes down to testing with each field of view and which one gives you the most consistent results.


As I mentioned, while some of that third party stuff is cool like tagging was it a dog or a bear, I don't need all that fancy stuff. If my camera triggers BI to tag an alert for human or vehicle and BI can accomplish what I need by way of a text or email or push or whatever, that is sufficient for my needs. I just want to be alerted if a person or vehicle is on my property and the camera AI does a fine job with that.

However, I do run BI AI on a few cameras so that it knocks out headlight shine so that the alert image includes the vehicle. The camera AI will trigger for a car, but the alert image was always just the headlights. I also run the ANPR AI module.

The true test....I have found the AI of the cameras to work even in a freakin blizzard....imagine how much the CPU/GPU would be maxing out sending all the snow pictures for analysis to CodeProject LOL. My non-AI cams in BI were triggering all night. This picture was ran through AI (without the IVS or red lines on it) and it failed to recognize a person in the picture, but the camera AI did. This pic says it all and the video had the red box over it even in complete white out on the screen:

1679354257954.png



See this thread on how using just Dahua AI (or other camera AI) may be sufficient for your needs:

Who uses Dahua AI capable cameras? Reliable AI for triggering events? Pro's/con's?
 
Yeah I've seen you share that pic in many posts and am always amazed. :)

To be clear CPAI has been working decent for me with Coral TPU for Object Detection since beginning of the year when I got the TPU. A few hiccups/bugs when I did upgrades but I only upgraded 2-3 times and it was for fixes and not features. In fact that was why I doubled down and bought a Dual TPU afterwards. Like I said CPAI 2.5.1 was actually running great for Object Detection but not taking advantage of multiple TPUs (which was the ONLY reason I upgraded afterwards).

Back to the GPU. The only reason I asked about the GPU was for ALPR and not Object Detection. I thought I needed a GPU to use the ALPR in CPAI. Based on the following post it sounded like not only did I need a GPU but there was a minimum GPU that was needed for ALPR.


Since I thought I needed a GPU, that is why I asked about one here before I added the module. In other words, I thought the GPU was a prerequisite for ALPR.

On a side note, I should have put the question in that that thread. I was typing in a couple threads at once and crossed them. :(

So back to ALPR.

If you are are saying you are using CPU for ALPR in CPAI then I will definitely give that a shot before purchasing a GPU. I just bought one B521R-Z12E-S2 to test if I could get a good enough image before installing the module and I'm getting a good image. Next step was to add the ALPR module and see how that goes. Since you told me you are using older CPU for the module I will give it a shot.

TLDR - I thought the GPU was a prerequisite to use CPAI ALPR.

Thank you for the information. Sorry for any confusion.
 
Yeah I've seen you share that pic in many posts and am always amazed. :)

To be clear CPAI has been working decent for me with Coral TPU for Object Detection since beginning of the year when I got the TPU. A few hiccups/bugs when I did upgrades but I only upgraded 2-3 times and it was for fixes and not features. In fact that was why I doubled down and bought a Dual TPU afterwards. Like I said CPAI 2.5.1 was actually running great for Object Detection but not taking advantage of multiple TPUs (which was the ONLY reason I upgraded afterwards).

Back to the GPU. The only reason I asked about the GPU was for ALPR and not Object Detection. I thought I needed a GPU to use the ALPR in CPAI. Based on the following post it sounded like not only did I need a GPU but there was a minimum GPU that was needed for ALPR.


Since I thought I needed a GPU, that is why I asked about one here before I added the module. In other words, I thought the GPU was a prerequisite for ALPR.

On a side note, I should have put the question in that that thread. I was typing in a couple threads at once and crossed them. :(

So back to ALPR.

If you are are saying you are using CPU for ALPR in CPAI then I will definitely give that a shot before purchasing a GPU. I just bought one B521R-Z12E-S2 to test if I could get a good enough image before installing the module and I'm getting a good image. Next step was to add the ALPR module and see how that goes. Since you told me you are using older CPU for the module I will give it a shot.

TLDR - I thought the GPU was a prerequisite to use CPAI ALPR.

Thank you for the information. Sorry for any confusion.

I do not have a GPU in my computer and am running the CPAI ALPR module just fine on the CPU version. Less than 500ms which is more than fast enough for my needs.
 
Good stuff, let me know if you need anything and let me know your results!
Downgraded to 2.2.2 and also downgraded numpy to 1.23.0 and I can finally back up and running smoothly again!!! You the man!!! :headbang:

Wish I could get the models working correctly. It's finding boats and airplanes somewhere on my property. I wouldn't mind if I actually had them. :lol:
 
I do not have a GPU in my computer and am running the CPAI ALPR module just fine on the CPU version. Less than 500ms which is more than fast enough for my needs.
I tried CPU for ALPR and was getting between 300-1500ms before it CPAI crashed on me again. Good to know it's possible. :thumb: FYI - The slower times were when multiple cam were triggering.

Since CPAI kept crashing I had to focus on that. I finally got CPAI stable as you can see in the post above. I am not touching this box anymore. I need a break from this. LOL Also, all testing will be on VM's moving forward. LOL

Thanks again.
 
So has anyone else here tried to download CPAI 2.8.0 pre-release for Windows and get a virus warning using W11 Defender? I always like to hear someone else has tried it first :)

409.jpg
 
Maybe MS wants you to use CoPilot Ai instead of CPAI...
 
  • Haha
Reactions: Tinman