AI setup - clarity on general and camera's alert Custom models

Post Reply
dwhelan
Posts: 5
Joined: Mon Dec 18, 2023 9:07 am

AI setup - clarity on general and camera's alert Custom models

Post by dwhelan »

I'm noticing I must enable the 'Custom Models' in the general / AI tab, otherwise nothing gets detected via CodeProject AI. The problem is when I enable this, the custom models value pre-fills and I can't edit it. Then, when I do AI testing it comes back with all sorts of values I don't want. I only want Vehicle and Person, as setup on the Camera's Alert / AI setup screen. I've setup 'ipcam-general' on the Camera's Alert / AI setup screen because it looks like it detects fewer object, only the ones I care about.

Is there a way to reduce the size of the General / AI 'Custom Models' models list, to not include animals, and all these other models I don't want?

If I disable General / AI 'Custom Models' and only have 'ipcam-general' on the Camera's Alert / AI setup screen, nothing gets detected.

Thanks,

David
louyo
Posts: 161
Joined: Sat Apr 18, 2020 1:16 am

Re: AI setup - clarity on general and camera's alert Custom models

Post by louyo »

The list of models on the general AI page just tells AI what models are available, you keep them all. You select the model you want on the camera's AI page. ipcam-general has vehicles and persons. You can tell it what vehicles to look for. ipcam-combined has animals and such. There is a list somewhere on CPAI, Mike L. created all of those models. You can take some of the jpegs and use them directly on the CPAI Explorer to test.
dwhelan
Posts: 5
Joined: Mon Dec 18, 2023 9:07 am

Re: AI setup - clarity on general and camera's alert Custom models

Post by dwhelan »

Actually, I think I solved my issue by deleting all the models I don't want - and now BI and OPAI is super fast!

Try this:
1) Exit BI and stop its service. Stop OPAI service too
2) Delete out of C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo\custom-models folder the models you don't want. For me, I just leave the 'ipcam-general.pt'
3) Start OPAI service and BI service
4) Go back into BI and on the AI general tab you'll notice ONLY the ipcam-general.pt one is shown in custom models field (making sure to enable Custom Models)
5) For each of my cameras AI tab, enter 'ipcam-general.pt' in the Custom models field and in the 'To Confirm' field put 'person,vehicle'

Now, AI runs much faster and doesn't include ANY of the values I didn't want before.

Hope this helps others too,

David
User avatar
TimG
Posts: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: AI setup - clarity on general and camera's alert Custom models

Post by TimG »

I think you have come across an old problem, and one of the methods of sorting it. BI5 can use inclusion or exclusion lists. Waaat ?

The easiest way to see what you have running is to look at a DAT file. It will show how many models you have working on that camera. If you see "Objects", it is the default model, so you can turn that one off in general settings if you wish to use custom models. If you can see in the DAT file that you are running multiple custom models, you can prevent them on a per camera basis by adding :0 to the unwanted model in "Custom models". e.g. "alpr:0,ipcam-combined,faces" will stop alpr on that camera, and run "ipcam-combined" and "faces" models. My alpr camera has "faces:0,license-plate,alpr,PLATES" in "Custom models". Doing this will ensure you only have the models you want working on any camera, but means that ALL of the models are available if you decide to use them.

Note: You don't need the .pt for the model name in the "Custom model" row. That will probably break it :shock:
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
Post Reply