|
Incase anyone else is running into this issue, after uninstalling and installing 2.1.8 I let the default modules download and install. Unfortunately none of them would start or started with errors. After doing some digging in the errors, I found that each module was trying to find files that did not exists. For instance, Object Detection (YOLOv5 6.2) kept complaining that python was not installed. Found out that the module installed with the it in Program Files\CodeProject\AI\runtimes\bin\window\python37\python37. To fix this I had to copy the files from the lower python37 directory up 1 level. Following that I had to uninstall the module, restart the service, and then reinstall the module. Unfortunately that still produced PIL errors, so I moved on to troubleshooting why I could not get YOLOv5 .NET working. It too had problems with files in directories it could not find. In this instance I had to move files in the Program Files\CodeProject\QI\modules\ObejectDetectionNet\ObjectDetectionNet-DirectML-1.4 folder up 1 level and also the files from Program Files\CodeProject\QI\modules\ObejectDetectionNet\assets\ObjectDetectionNet-DirectML-1.4 up one level. Once this was completed I could restart the YOLOv5 .NET module and it is working just fine.
I decided to stick with YOLOv5 .NET since I am currently running in a VMWare VM and don't have a GPU. I will eventually be moving to a dedicated system once I add several more cameras.
|
|
|
|
|
Which version of Windows?
cheers
Chris Maunder
|
|
|
|
|
I am currently running on Windows Server 2016 standard.
Thanks,
Rick Moody
|
|
|
|
|
My install is failing as well, modules say they have installed but systemlog is throwing missing file errors during installation.
Windows 10.
|
|
|
|
|
Please try reinstalling that module. It would most likely be because of a timeout in the installation.
cheers
Chris Maunder
|
|
|
|
|
I have multiple times and have never had it work yet, but I'll give it another go, thanks.
|
|
|
|
|
22:02:29:ObjectDetectionYolo: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
22:02:29:ObjectDetectionYolo: botocore 1.29.133 requires urllib3<1.27,>=1.25.4, but you have urllib3 2.0.2 which is incompatible.
22:02:29:ObjectDetectionYolo: google-auth 2.18.0 requires urllib3<2.0, but you have urllib3 2.0.2 which is incompatible.
22:02:30:ObjectDetectionYolo: Installing Packages into Virtual Environment...Success
|
|
|
|
|
We don't support this version of Windows, but we have a fix in an upcoming version that should address this. It comes down to us using `tar` to unpack things, and falling back to powershell. The powershell extract is wrong, which we've fixed, so the 'non-windows-10' fall back should work again.
I'll see if we can get an update out in the next day or so
cheers
Chris Maunder
|
|
|
|
|
Thanks Chris, much appreciated. It worked in pre 2.x versions. I think I was running 1.6 on the same system without issues getting the modules installed. Only problem I was running into on the old version was the old python YOLO would chew up tons of memory and cause the server to crash. I should have been using the .Net version whole time since I did not have a graphics card to do the analytics.
|
|
|
|
|
If you're not sure where the package is installed, you can open a command prompt and type pip show 'package-name'. This will show you the installation location of the package.
|
|
|
|
|
We've fixed this in a new release due out today.
cheers
Chris Maunder
|
|
|
|
|
I was able to get the Docker image running on my Raspberry Pi 4 with TFLite and a Coral USB device. I am running version 2.1.8-Beta. I prefer to manage my containers via Docker Compose. I created my compose file (below) during the first run of the container, everything works perfectly.
However if the container is restarted for any reason, the TFLite module no longer starts correctly. I am seeing the following errors logged:
22:47:27:objectdetection_tflite_adapter.py: Exception ignored in:
22:47:27:objectdetection_tflite_adapter.py: Traceback (most recent call last):
22:47:27:objectdetection_tflite_adapter.py: File "/app/modules/ObjectDetectionTFLite/bin/linux/python39/venv/lib/python3.9/site-packages/tflite_runtime/interpreter.py", line 124, in __del__
22:47:27:objectdetection_tflite_adapter.py: if self._library is not None:
22:47:27:objectdetection_tflite_adapter.py: AttributeError: 'Delegate' object has no attribute '_library'
22:47:27:objectdetection_tflite_adapter.py: Exception ignored in:
22:47:27:objectdetection_tflite_adapter.py: Traceback (most recent call last):
22:47:27:objectdetection_tflite_adapter.py: File "/app/modules/ObjectDetectionTFLite/bin/linux/python39/venv/lib/python3.9/site-packages/tflite_runtime/interpreter.py", line 124, in __del__
22:47:27:objectdetection_tflite_adapter.py: if self._library is not None:
22:47:27:objectdetection_tflite_adapter.py: AttributeError: 'Delegate' object has no attribute '_library'
** Docker Compose File **
version: '3.9'
services:
code-project-ai:
container_name: code-project-ai
privileged: true
restart: unless-stopped
image: codeproject/ai-server:arm64
devices:
- /dev/bus/usb:/dev/bus/usb
volumes:
- ./ai:/etc/codeproject/ai
- ./modules:/app/modules
ports:
- '32168:32168'
Just a guess, but it seems like some required data is not being persisted? Can anyone please point me in the right direction?
|
|
|
|
|
That all looks good (my previous post said use privileged and don't forget /dev/bus/usb:/dev/bus/us but you already do that).
No idea unfortunately
cheers
Chris Maunder
|
|
|
|
|
Any suggestions to pull more logging or test anything else? I already had the logging slider to the debug setting.
|
|
|
|
|
So just to clarify the first report: When you start it, it's all good. When it's restarted it fails?
cheers
Chris Maunder
|
|
|
|
|
Yes Chris, that's exactly correct.
|
|
|
|
|
Hi- I tried to install 2.16 but got stuck so I went back to 2.08. (I was too lazy to follow Chris M's detailed instructions from the sticky.) Is 2.18 more plug and play? Thanks!
|
|
|
|
|
You hurt me, man. You hurt me deep.
Just uninstall 2.0.8, then install 2.1.8 (not 2.1.6). Easy peasy.
cheers
Chris Maunder
|
|
|
|
|
I tried it again with 2.19-same problem as before. I think my GPU (Quadro K2200) is ok.
17:01:27:Started Object Detection (YOLOv5 6.2) module
17:01:28:detect_adapter.py: Traceback (most recent call last):
17:01:28:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo\detect_adapter.py", line 20, in
17:01:28:detect_adapter.py: from detect import init_detect, do_detection
17:01:28:detect_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo\detect.py", line 9, in
17:01:28:detect_adapter.py: from yolov5.models.common import DetectMultiBackend, AutoShape
17:01:28:detect_adapter.py: ModuleNotFoundError: No module named 'yolov5'
|
|
|
|
|
Is there an install.log file in the C:\Program Files\CodeProject\AI\modules\ObjectDetectionYolo folder you can share?
cheers
Chris Maunder
|
|
|
|
|
Installing CodeProject.AI Analysis Module
========================================================================
CodeProject.AI Installer
========================================================================
CUDA Present...True
Allowing GPU Support: Yes
Allowing CUDA Support: Yes
General CodeProject.AI setup
Creating Directories...Done
Installing module ObjectDetectionYolo
Installing python37 in C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37
Checking for python37 download...Present
Creating Virtual Environment...Python 3.7 Already present
Enabling our Virtual Environment...Done
Confirming we have Python 3.7...present
Ensuring Python package manager (pip) is installed...Done
Ensuring Python package manager (pip) is up to date...Done
Choosing Python packages from requirements.windows.cuda.txt
ERROR: Exception:
Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 169, in exc_logging_wrapper
status = run_func(*args)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\cli\req_command.py", line 248, in wrapper
return func(self, options, args)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\commands\install.py", line 378, in run
reqs, check_supported_wheels=not options.target_dir
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 93, in resolve
collected.requirements, max_rounds=limit_how_complex_resolution_can_be
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
return bool(self._sequence)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
return any(self)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 211, in _make_candidate_from_link
version=version,
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 299, in __init__
version=version,
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
self.dist = self._prepare()
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 304, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 516, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 593, in _prepare_linked_requirement
hashes,
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 170, in unpack_url
hashes=hashes,
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 107, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\network\download.py", line 134, in __call__
resp = _http_get_download(self._session, link)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\network\download.py", line 117, in _http_get_download
resp = session.get(target_url, headers=HEADERS, stream=True)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_internal\network\session.py", line 517, in request
return super().request(method, url, *args, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 57, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 584, in send
return self.build_response(request, resp)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 84, in build_response
request, response
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\cachecontrol\controller.py", line 410, in update_cached_response
cached_response = self.serializer.loads(request, self.cache.get(cache_url))
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\cachecontrol\serialize.py", line 95, in loads
return getattr(self, "_loads_v{}".format(ver))(request, data, body_file)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\cachecontrol\serialize.py", line 186, in _loads_v4
cached = msgpack.loads(data, raw=False)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 125, in unpackb
ret = unpacker._unpack()
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 590, in _unpack
ret[key] = self._unpack(EX_CONSTRUCT)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 590, in _unpack
ret[key] = self._unpack(EX_CONSTRUCT)
File "C:\Program Files\CodeProject\AI\runtimes\bin\windows\python37\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 603, in _unpack
return bytes(obj)
MemoryError
Installing Packages into Virtual Environment...Success
Ensuring Python package manager (pip) is installed...Done
Ensuring Python package manager (pip) is up to date...Done
Choosing Python packages from requirements.txt
Installing Packages into Virtual Environment...Success
Downloading Standard YOLO models...Expanding...Done.
Downloading Custom YOLO models...Expanding...Done.
Module setup complete
Installer exited with code 0
|
|
|
|
|
Do you want it in another format?
|
|
|
|
|
Did you want me to send this somehow? I posted it on this thread earlier but maybe you wanted it a different way.
|
|
|
|
|
I am using the .net module now- it is kind of working but it is running my GPU at 100% all the time. I sure would like to get back to the 6.2 module if possible. Thanks!
|
|
|
|
|
i've tried to setup nvr agent with codeproject.al. i'm wondering if there is a log file that will tell me if a request was made to codeproject to detect an object, at a certain time and what was codeproject response. object = true or maybe object = false. sorry, really really newbie.
|
|
|
|
|