|
IF YOU ARE HAVING A PROBLEM
- Take a look at the logs in
C:\Program Files\CodeProject\AI\logs and see if there's anything in there that screams 'something broke'.
- Check the FAQs in the CodeProject.AI Server documentation
- Make sure you've tested the server using the Explorer (blue link, top middle of the dashboard) to ensure it's a server issue rather than something else such as Blue Iris or another app using CodeProject.AI server.
- If there's no obvious answer, then copy and paste into a message the contents of the System Info tab, describe what you are doing, and what you see, and what you would expect.
Always include a copy and paste from the System Info tab of the dashboard. It gives us a ton of info on your setup. If an individual module is failing, click the 'Info' button to the right of the module's name in the status list and copy and paste that info too.
How to reinstall a module
Option 1. Go to the install modules tab on the dashboard and try re-installing the package. Make sure you have enough disk space and a reliable internet connection.
Option 2: (Option 1 with a vengeance): If that fails, head to the module's folder ([app root]\modules\module-id), open a terminal in admin mode, and run ..\..\setup . This will force a manual reinstall using the install script.
Docker: In Docker you will need to open a terminal into the docker container. You can do this using Docker Desktop, or Visual Studio Code with the Docker remote extension, or on the command using using docker attach . Then do a cd /app/modules/module-id where module-id is the id of the module you need to resinstall. Next, run sudo bash ../../setup.sh --verbosity info to force a manual reinstall of that module. (Set verbosity as quiet, info or loud to get less or more info)
cheers
Chris Maunder
modified 18-Feb-24 15:48pm.
|
|
|
|
|
If you are a Blue Iris user and you are using custom models, then you would notice that the option, in Blue Iris, to set the custom model location is greyed out. This is because Blue Iris does not currently make changes to CodeProject.AI Server's settings. It can be done by manually starting CodeProject.AI with command line parameters (not a great solution), or editing the module settings files (a little messy), or setting system-wide environment variables (way easier). For version 1.6 we added an API to allow any app to change our settings programmatically, and we take care of stopping/restarting things and persisting the changes.
So: Blue Iris doesn't currently change CodeProject.AI Server's settings, so it doesn't provide you a way to change the custom model folder location from within Blue Iris.
Blue Iris will still use the contents of this folder to determine the calls it makes. If you don't specify a model to use in the Custom Models textbox, then Blue Iris will use all models in the custom models folder that it knows about.
Here we've specified a specific model to use. The Blue Iris help file explains more about how this works, including inclusive and exclusive filters on the models it finds.
CodeProject.AI Server doesn't know about Blue Iris' folder, so it can't tell what models it may be expected to use, nor can it tell Blue Iris about what models CodeProject.AI server has available. Our API allows Blue Iris to get a list of the AI models installed with CodeProject.AI Server, and also to set the folder where these models reside. But Blue Iris doesn't, yet, use that API.
So we do a hack.
At install time we sniff the registry to find where Blue Iris thinks the custom models should be. We then make empty copies of the models that we have, and copy them into that folder. If the folder doesn't exist (eg you were using C:\Program Files\CodeProject\AI\AnalysisLayer\CustomObjectDetection\assets , which no longer exists) then we create that folder, and then copy over the empty files.
When Blue Iris looks in that folder to decide what custom calls it can make, it sees the models, notes their names, and uses those names in the calls. CodeProject.AI Server has those models, so when the calls come through we can process them.
Blue Iris doesn't use the models. It uses the list of model names.
If you have your own models in the Blue Iris folder
You will need to copy them to the CodeProject.AI server's custom model folder (by default this is C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\custom-models )
If you've modified the registry and have your own custom models
If you were using a folder in C:\Program Files\CodeProject\AI\AnalysisLayer\CustomObjectDetection\ (which no longer existed after the upgrade, but was recreated by our hack) you'll need to re-copy your custom model into that folder.
The simplest solutions are:
- Modify the registry (Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Perspective Software\Blue Iris\Options\AI, key 'deepstack_custompath') so Blue Iris looks in
C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\custom-models for custom models, and copy your models into there.
or
- Modify
C:\Program Files\CodeProject\AI\AnalysisLayer\ObjectDetectionYolo\modulesettings.json file and set CUSTOM_MODELS_DIR to be whatever Blue Iris thinks the custom model folder is.
cheers
Chris Maunder
|
|
|
|
|
Hi,
Following upgrade to CPAI 2.6.5 on Ubuntu I have seen the Coral module crash several times, with the UI showing "Lost Contact" with the module and the following log messages:
09:02:11:Response rec'd from Object Detection (Coral) command 'detect' (...ee25ac) [''] took 21ms
09:03:17:objectdetection_coral_adapter.py: WARNING:root:Queue stalled; refreshing interpreters.
09:03:18:objectdetection_coral_adapter.py: WARNING:root:Queue stalled; refreshing interpreters.
09:04:13:objectdetection_coral_adapter.py: WARNING:root:Queue stalled; refreshing interpreters.
09:04:15:objectdetection_coral_adapter.py: WARNING:root:Queue stalled; refreshing interpreters.
09:04:17:objectdetection_coral_adapter.py: WARNING:root:Queue stalled; refreshing interpreters.
09:04:17:objectdetection_coral_adapter.py: WARNING:root:Pipe thread didn't join!
and again a few hours later:
11:48:52:Response rec'd from Object Detection (Coral) command 'detect' (...f1837e) [''] took 19ms
11:50:22:objectdetection_coral_adapter.py: WARNING:root:Queue stalled; refreshing interpreters.
11:51:22:objectdetection_coral_adapter.py: WARNING:root:Pipe thread didn't join!
I have a second instance that is still on 2.6.2 which has not exhibited this behaviour, so assume this to be an issue with the new code.
modified yesterday.
|
|
|
|
|
Thanks very much for your report. Could you please share your System Info tab from your CodeProject.AI Server dashboard?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
sure..
Server version: 2.6.5
System: Linux
Operating System: Linux (Ubuntu 22.04)
CPUs: Intel(R) Xeon(R) CPU E3-1268L v3 @ 2.30GHz (Intel)
4 CPUs x 1 core. 1 logical processors (x64)
System RAM: 2 GiB
Platform: Linux
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.19
.NET SDK: 7.0.119
Default Python: 3.10.12
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
VMware SVGA II Adapter:
Driver Version
Video Processor
System GPU info:
GPU 3D Usage 0%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
and from the other system thats not exhibiting the same behaviour:
Server version: 2.6.2
System: Linux
Operating System: Linux (Ubuntu 22.04)
CPUs: Intel(R) Xeon(R) CPU E3-1268L v3 @ 2.30GHz (Intel)
4 CPUs x 1 core. 1 logical processors (x64)
System RAM: 2 GiB
Platform: Linux
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.19
.NET SDK: 7.0.119
Default Python: 3.10.12
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
VMware SVGA II Adapter:
Driver Version
Video Processor
System GPU info:
GPU 3D Usage 0%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|
Cool project. Thank you.
I've deployed it in an LXC under Proxmox, and another LXC with the full development project. FWIW I also have it running on an RPI 5 with NVME drive and a Coral TPU deployed to docker with the dockge interface.
I've successfully run the "Optical Character Recognition" against images of road signs and of a technical manual in .pdf form. Works very well.
For grins I ran the OCR against an image of my terrible cursive handwriting. Of three paragraphs it got two thirds of the Date correct as I had written it as "month d, yyyy" The remainder of the sample was gibberish.
In my investegations I've come across, among others;
* Transkribus[^]
* Pen2text.com
Pen2text blew me away in the ease to making a simple test on that same sample of my, horribly illegible, handwriting. It missed two words that frankly looked like a leaky pen.
At any rate for either of these projects I feel I'd have to hire legal representation to understand the ownership and use of the OCR'ed sources and results.
I'd sure appreciate any tips on open source, self hosted, trainable OCR software suitable for a collection of perhaps fifty cursive multipage letters written in the same hand six or more decades ago. Once processed the text would be fed to a model to allow for chat of that subject matter.
Bonus points for pointers to open source archival platforms to organize the letters, that has an api so that I could correlate the OCRed text to the collection of images. Why reinvent that, archiving, wheel so to speak.
Thanks for listening by way or your reading.
Jeff
KF7CRU @jhalbrecht
|
|
|
|
|
Since upgrading to 2.6.5 I get AI not responding and no detections. I have to enable the service to start with Blue Iris after every reboot. Also changing from enable GPU or disabling GPU doesn't seem to change anything. I am using an Intel CPU with integrated GPU and used to be able to select enable GPU. Also the Codeproject AI status does not indicate Direct ML even after several detections. I am using Yolo.Net. Please advise? Everything I mentioned seemed to work fine with 2.6.2.
|
|
|
|
|
Thanks very much for your report. Could you please share your System Info tab from your CodeProject.AI Server dashboard?
One thing, I recommend going to Blue Iris main AI settings and unchecking auto stop/start.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Here it is
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz (Intel)
1 CPU x 4 cores. 8 logical processors (x64)
GPU (Primary): Intel(R) HD Graphics 530 (1,024 MiB) (Intel Corporation)
Driver: 31.0.101.2111
System RAM: 16 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.20
.NET SDK: Not found
Default Python: Not found
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
Intel(R) HD Graphics 530:
Driver Version 31.0.101.2111
Video Processor Intel(R) HD Graphics Family
System GPU info:
GPU 3D Usage 0%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|
I unchecked Start/Stop in Blue Iris. Restarted Blue Iris PC. I have to manually start Codeproject in Codeproject Dashboard but at least I now see Direct ML after I do this. Only problem is that Custom Models are not displaying in AI Main settings. If I hit the three dots, I get the Refresh AI to display models. Looks like the custom models are not loading for some reason. How would I refresh AI? Please advise?
|
|
|
|
|
Hi,
Since the install of the latest version of CP on my Blue Iris server, I get the message "Alert Cancelled AI not responding".
Consequently I do not get any notification on my phone when someone triggers a camera because there is no analysis done.
I reinstalled CP, no success.
Any suggestion on whatto do next?
I am on Windows 10
Thanks,
Michel.
|
|
|
|
|
It works now
I uninstalled CP, then I used the software Everything from Voidtools to find every single file left that had CodeProject in it's name and deleted them all, then reinstalled CP and restarted the server and it works as it should.
Thanks
|
|
|
|
|
Issue exists only with newer CPAI builds, occurs several times a day on different hardware (Intel with Tesla P4 vs Ryzen with RTX3090)
19:00:49:Object Detection (YOLOv5 6.2): [RuntimeError] : Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYOLOv5-6.2\detect.py", line 141, in do_detection
det = detector(img, size=640)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\yolov5\models\common.py", line 705, in forward
y = self.model(x, augment=augment) # forward
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\yolov5\models\common.py", line 515, in forward
y = self.model(im, augment=augment, visualize=visualize) if augment or visualize else self.model(im)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Lib\site-packages\yolov5\models\yolo.py", line 209, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Lib\site-packages\yolov5\models\yolo.py", line 121, in _forward_once
x = m(x) # run
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\Lib\site-packages\yolov5\models\yolo.py", line 74, in forward
xy = (xy * 2 + self.grid[i]) * self.stride[i] # xy
RuntimeError: The size of tensor a (48) must match the size of tensor b (60) at non-singleton dimension 2
|
|
|
|
|
Thanks very much for your report. Could you please share your System Info tab from your CodeProject.AI Server dashboard?
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 10.0.17763)
CPUs: Intel(R) Xeon(R) CPU E5-2699A v4 @ 2.40GHz (Intel)
1 CPU x 11 cores. 22 logical processors (x64)
GPU (Primary): Tesla P4 (8 GiB) (NVIDIA)
Driver: 538.67, CUDA: 12.2.140 (up to: 12.2), Compute: 6.1, cuDNN: 8.5
System RAM: 64 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.10
.NET SDK: Not found
Default Python: Not found
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
Microsoft Hyper-V Video:
Driver Version 10.0.17763.2145
Video Processor
NVIDIA Tesla P4:
Driver Version 31.0.15.3867
Video Processor Tesla P4
System GPU info:
GPU 3D Usage 8%
GPU RAM Usage 6.4 GiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
===================================================================
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: AMD Ryzen 9 7950X 16-Core Processor (AMD)
1 CPU x 16 cores. 32 logical processors (x64)
GPU (Primary): NVIDIA GeForce RTX 3090 (24 GiB) (NVIDIA)
Driver: 555.85, CUDA: 12.5.40 (up to: 12.5), Compute: 8.6, cuDNN: 8.5
System RAM: 64 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 8.0.1
.NET SDK: 8.0.101
Default Python: 3.10.6
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
NVIDIA GeForce RTX 3090:
Driver Version 32.0.15.5585
Video Processor NVIDIA GeForce RTX 3090
System GPU info:
GPU 3D Usage 9%
GPU RAM Usage 2.1 GiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|
Are you able to replicate this issue with any specific image? My guess is there's something with the image itself that's unexpected for the YOLO processor.
Another option is to switch to the .NET YOLO module, or the YOLOv8 module and see if that helps.
cheers
Chris Maunder
|
|
|
|
|
Wrong number of channels in the image? (Greyscale?)
|
|
|
|
|
Hello,
Since Raspberry just announced their new "Raspberry Pi AI Kit" ( https://www.raspberrypi.com/products/ai-kit/[^] ) what would the possibility of getting a Hailo AI module natively added to CP.AI? I'm currently using a dual edge Coral TPU on my Pi5 but it has it's limitations
|
|
|
|
|
Yeah I saw that - $70 for some serious power is pretty awesome.
The Hailo stack seems straightforward (though their site leaves something to be desired). Without access to the hardware we can't do anything here, but I'm sure it would be a very straightforward exercise for someone to adapt any of the existing object detection modules to use the Hailo models and TensorRT. The segmentation example, for instance, seems super simple.
cheers
Chris Maunder
|
|
|
|
|
I'm actually getting one in the next few days and can help with anyway possible to get it up and running Just let me know
|
|
|
|
|
This looks very interesting; like the Coral TPU, but more modern. Google's lack of Coral support over the past few years has been concerning to me about the future of the platform. It won't take too many more years for Coral to no longer be competitive. I see it runs YOLOv5m at 640x640 at 218 FPS on their benchmarks page. (I just benchmarked YOLOv8m 640x640 model running at 2.8 FPS on Coral. If you reduce the size to 352x608 it runs 5.3 FPS, which is about as fast as you can get it to go on the Coral.)
I'm definitely interested in how well it works and how well my Coral TPU learnings/code port to it. What model did you order & where did you find it for $70? This is the only M.2 I see actually immediately available (and I don't see _any_ PCIe cards available):
https://eshop.aaeon.com/ai-edge-computing-hailo-8-m2-2280-module.html[^]
I see that they sell a $170 'starter kit' which looks effectively the same as the above card, but I'd need to fill in my work details, which I'm less comfortable with.
Order Hailo-8 Starter Kit | Hailo AI Processing Technology[^]
|
|
|
|
|
I ordered the kit from PiShop at Raspberry Pi AI Kit - PiShop.us[^] . It stated a preorder but shipped last week and will be arriving tomorrow. I'm not sure why it's listed as $85 when other sites like Canakit have it for the actual $70 (Raspberry Pi AI Kit for Pi 5[^] ) . I hope that it will eventually be sold as a standalone chip instead of having to get the hat with it as well, but my guess is that Raspberry purchased them en masse at a discount and is reselling them at the lower price
|
|
|
|
|
I wonder if I can just buy that kit for $70 and then throw out the M.2 HAT. Weirdly, that may be the most cost-effective way for me to get my hands on one.
|
|
|
|
|
|
System specs below. I borrowed my sons video cards (2060 and 1080) to experiment and watched the system log times in BI, the ms remained unchanged. Last time I did this the response times all dropped under 100ms.
I did not get a screen cap but when the AI starts I get the use CUDA = True.
Is it possible the AI is using the Intel integrated graphics on the CPU instead of the 1050ti??
Server version: 2.6.5
System: Windows
Operating System: Windows (Microsoft Windows 10.0.19045)
CPUs: Intel(R) Core(TM) i7-8086K CPU @ 4.00GHz (Intel)
1 CPU x 6 cores. 12 logical processors (x64)
GPU (Primary): NVIDIA GeForce GTX 1050 Ti (4 GiB) (NVIDIA)
Driver: 555.85, CUDA: 11.8.89 (up to: 12.5), Compute: 6.1, cuDNN: 8.5
System RAM: 16 GiB
Platform: Windows
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 7.0.15
.NET SDK: 7.0.405
Default Python: Not found
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
Intel(R) UHD Graphics 630:
Driver Version 31.0.101.2111
Video Processor Intel(R) UHD Graphics Family
NVIDIA GeForce GTX 1050 Ti:
Driver Version 32.0.15.5585
Video Processor NVIDIA GeForce GTX 1050 Ti
System GPU info:
GPU 3D Usage 34%
GPU RAM Usage 3.9 GiB
Global Environment variables:
CPAI_APPROOTPATH = <root>
CPAI_PORT = 32168
|
|
|
|
|