CodeProject 2.1.6 Alert cancelled [AI: not responding]

AlwaysSomething

Pulling my weight
Apr 24, 2023
175
146
US
I'm running a demo version of BI trying to see how well the AI works before purchasing a license. I read many articles and watched a couple of videos and followed them to a T and the CPAI never worked for me. This was one video I watched which was very helpful, direct, and to the point:

I almost never post a thread because I can usually find the answer but I've spent almost the entire weekend on this and most articles are older and referring to DeepStack. Also, most of them are what I already checked such as is the service running and webpage accessible.

I looked at the BI logs and I see the following error:

AI: Alert cancelled [AI: not responding]

I go to BI -> Serttings -> AI -> Open AI Dashboard and it opens the dashboard with no problem. Opens webpage (127.0.0.1:5000) for CodeProject. Server is online.

However, looking at the log in CPAI this is at the end:

09:14:34:
09:14:34:Started Object Detection (YOLOv5 6.2) module
09:14:36:Server: This is the latest version
09:14:38:detect_adapter.py: Traceback (most recent call last):
09:14:38:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo\detect_adapter.py", line 20, in
09:14:38:detect_adapter.py: from detect import init_detect, do_detection
09:14:38:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo\detect.py", line 9, in
09:14:38:detect_adapter.py: from yolov5.models.common import DetectMultiBackend, AutoShape
09:14:38:detect_adapter.py: ModuleNotFoundError: No module named 'yolov5'
09:14:38:detect_adapter.py: has exited
09:14:38:Module ObjectDetectionYolo has shutdown

I don't know if that is normal?

Underneath the log section in CPAI I have:

ObjectDetection(YOLOv5 6.2) Started CPU.

The Face Processing and YOLOv5.NET) are not enabled. I can take screenshots if needed.

My settings basically match those in the YouTube video I mentioned above. Nothing custom.

I'm having some other issues which may or may not be related like getting a camara to be full screen. I added BI to the Windows Defender exception list but every time I open it I get the stupid popup to allow the app to make changes to my device. (I hate Windows).

Any help would be greatly appreciated as I'm demoing this out before deciding to purchase or not. I hate Windows but this software was highly rated for the AI. Which is the only reason I'm trying this out.

Thanks in advance.
 
  • Like
Reactions: Hina Chow
I saw posts about that as well but I couldn't find a way to download previous versions of CPAI. This is a fresh install so that was default version.

FYI - BI is
Release 5.7.5.0 x64 (4/20/2023)
 
Thank Chris. Reverting to 2.0.8 worked to remove the errors as well as get the AI working.

Although it's working I'm not getting the exact results I expected. Some things trigger and some don't. I have to keep playing with the settings and figure them out.

I wish there was a way to take a clip and reprocess it after every tweak to get things dialed in.
 
  • Like
Reactions: Hina Chow
I found some pointers elsewhere on how to reprocess ... I didn't spend enough time on it to see how well it actually works.
The process, as I understood it, is to open a clip and then in the upper left of the player you will see the search magnifying glass, click that and the options seem self explanitory.
(part way down this thread: How to rebuild Alerts database after Regeneration - Page 2 - Blue Iris)

Again, I didn't spend enough time fiddling with it to say it works but hope it helps you.
 
I must admit when I tried the latest version of CP 2.1.6 on my test BI box (which was already running 2.0.8 and working fine) with a GT1080 card it just wouldn't work, I spent a lot of time trying to debug, just couldn't get it to work.
Uninstalling CP, CUDA drivers, NVIDA drivers deleting existing CP folders and reinstalling it all again no look. Even downgrading back to CP 2.0.8 caused issues whereby it would only work with YOLO.NET

I then formatted the box, reinstall Windows, CUDA drivers, CP 2.1.6 and BI and it all worked as expected! So basically installed everything as above but above didn't work but fresh install did. YMMV but that may be a solution for some.
 
Unfortunatly i had the same issue. Tried rolling back to the 2.0.8 version but no change. So i just removed it in total. See how it's like without the AI.
 
  • Like
Reactions: Lawnboy1
So i think i have solved my problem. I had a spiderweb blocking one of the camera's so i dived in the issue again because of the 600+ alerts :facepalm:
For me the issue was portnumber. Default AI setting in BI listening on ip 127.0.0.1 and port 82. After reading the help file that comes with the AI thingy it said the following:
Currently, you can use CodeProject.AI Server from port 5000, but in the future, this will be deprecated, so change the port to 32168 and make sure the checkbox for "Use AI server on IP/port" is checked. Then hit OK
So... i did the following, in the general settings tab of BI set the port to 32168
And do the same on each camera AI tab.
Works like a charm again.
Appearantly some update messed it all up. I have no idea which one but setting the ports again seemed to have fixed my issue.
 

Attachments

  • Screenshot 2023-10-18 07.09.25.png
    Screenshot 2023-10-18 07.09.25.png
    74.5 KB · Views: 154
  • Screenshot 2023-10-18 07.18.18.png
    Screenshot 2023-10-18 07.18.18.png
    78.5 KB · Views: 147
In solving your Code Project AI problem by switching port number 5000 to 32168, did you use CPAI v2.0.8, or were you able to install the latest CPAI version 2.2.4 and get it working with Blue Iris?
 
I installed CodeProject AI 2.2.4 with BI v 5.8.0.7. It appears that BI makes a request to detect, but nothing happens from an AI perspective and BI just records a clip as normal as if there is no AI at all.
 

Attachments

  • CodeProjectAI_2.2.4_Status.jpg
    CodeProjectAI_2.2.4_Status.jpg
    352.9 KB · Views: 38
I installed CodeProject AI 2.2.4 with BI v 5.8.0.7. It appears that BI makes a request to detect, but nothing happens from an AI perspective and BI just records a clip as normal as if there is no AI at all.
Looks like you have the same issue. In your screenshot the service URL is 32168. I believe that if you set the AI IP port to that same portnumber your AI will respond.
I also have the latest version running 2.2.4 beta.
 
  • Like
Reactions: Lawnboy1
I had the AI tab page set per your screenshot above and also set each camera to server override with the same port number in your screenshot above, but that was the result I got.
 

Attachments

  • CodeProjectAI_2.2.4_Status.jpg
    CodeProjectAI_2.2.4_Status.jpg
    352.9 KB · Views: 45
Looks like you have the same issue. In your screenshot the service URL is 32168. I believe that if you set the AI IP port to that same portnumber your AI will respond.
I also have the latest version running 2.2.4 beta.
I had the AI tab page set per your screenshot above and also set each camera to server override with the same port number in your screenshot above, but that was the result I got.
 
In solving your Code Project AI problem by switching port number 5000 to 32168, did you use CPAI v2.0.8, or were you able to install the latest CPAI version 2.2.4 and get it working with Blue Iris?
/
And the settings tab in Blueiris itself have the right port numbers ? If so it should be working. Did you reboot the system ?
 
/
And the settings tab in Blueiris itself have the right port numbers ? If so it should be working. Did you reboot the system ?
Here are my screenshots using CPAI 2.2.4 Beta (Yes = After System Reboot).
 

Attachments

  • CodeProjectAI_2.2.4_BI_AI_Tab.jpg
    CodeProjectAI_2.2.4_BI_AI_Tab.jpg
    141.1 KB · Views: 79
  • CodeProjectAI_2.2.4_BI_Camera_Alert_AI_Tab.jpg
    CodeProjectAI_2.2.4_BI_Camera_Alert_AI_Tab.jpg
    139 KB · Views: 82
  • CodeProjectAI_2.2.4_Status.jpg
    CodeProjectAI_2.2.4_Status.jpg
    457.8 KB · Views: 67
What does you blueiris log say ?
It should look a bit like mine.
 

Attachments

  • Screenshot 2023-10-19 20.49.00.png
    Screenshot 2023-10-19 20.49.00.png
    119.7 KB · Views: 71
Last edited: