Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectDetectionCoral cannot start , has Numpy error #118

Open
1 task
ingus16 opened this issue Jun 24, 2024 · 2 comments
Open
1 task

ObjectDetectionCoral cannot start , has Numpy error #118

ingus16 opened this issue Jun 24, 2024 · 2 comments

Comments

@ingus16
Copy link

ingus16 commented Jun 24, 2024

Area of Concern

  • Server module wont start ObjectDetectionCoral
    Describe the bug

I have USB-C version of Coral TPU
Tried to install coral module in the Code project AI , received error as per screenshot.
Tried on the docker environment , has same issue.
When start module then this error appears.

Expected behavior
Installed and can be started without errors

Screenshots
image

Your System (please complete the following information):

  • CodeProject.AI Server version: 2.6.5
  • OS: Windows
  • System 16Gb
  • GPU Intel Iris 530
  • GPU RAM 1GB
@beginnersguide
Copy link

Area of Concern

  • [ X ] Server module: Object Detection (Coral) 2.3.1

Describe the bug

08:06:56:ObjectDetectionCoral: A module that was compiled using NumPy 1.x cannot be run in
08:06:56:ObjectDetectionCoral: NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
08:06:56:ObjectDetectionCoral: versions of NumPy, modules must be compiled with NumPy 2.0.
08:06:56:ObjectDetectionCoral: Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
08:06:56:ObjectDetectionCoral: If you are a user of the module, the easiest solution will be to
08:06:56:ObjectDetectionCoral: downgrade to 'numpy<2' or try to upgrade the affected module.
08:06:56:ObjectDetectionCoral: We expect that some modules will need time to support NumPy 2.
08:06:56:ObjectDetectionCoral: Traceback (most recent call last):  File "/app/modules/ObjectDetectionCoral/objectdetection_coral_adapter.py", line 229, in 
08:06:56:ObjectDetectionCoral:     CoralObjectDetector_adapter().start_loop()
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/bin/linux/python39/venv/lib/python3.9/site-packages/codeproject_ai_sdk/module_runner.py", line 278, in start_loop
08:06:56:ObjectDetectionCoral:     self.initialise()
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/objectdetection_coral_adapter.py", line 54, in initialise
08:06:56:ObjectDetectionCoral:     import objectdetection_coral_multitpu as odcm
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/objectdetection_coral_multitpu.py", line 51, in 
08:06:56:ObjectDetectionCoral:     from tpu_runner import TPURunner, INTERPRETER_LIFESPAN_SECONDS
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/tpu_runner.py", line 33, in 
08:06:56:ObjectDetectionCoral:     from pycoral.utils import edgetpu
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/bin/linux/python39/venv/lib/python3.9/site-packages/pycoral/utils/edgetpu.py", line 24, in 
08:06:56:ObjectDetectionCoral:     from pycoral.pybind._pywrap_coral import GetRuntimeVersion as get_runtime_version
08:06:56:ObjectDetectionCoral: AttributeError: _ARRAY_API not found
08:06:56:ObjectDetectionCoral: Traceback (most recent call last):
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/objectdetection_coral_adapter.py", line 229, in 
08:06:56:ObjectDetectionCoral:     CoralObjectDetector_adapter().start_loop()
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/bin/linux/python39/venv/lib/python3.9/site-packages/codeproject_ai_sdk/module_runner.py", line 278, in start_loop
08:06:56:ObjectDetectionCoral:     self.initialise()
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/objectdetection_coral_adapter.py", line 54, in initialise
08:06:56:ObjectDetectionCoral:     import objectdetection_coral_multitpu as odcm
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/objectdetection_coral_multitpu.py", line 51, in 
08:06:56:ObjectDetectionCoral:     from tpu_runner import TPURunner, INTERPRETER_LIFESPAN_SECONDS
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/tpu_runner.py", line 33, in 
08:06:56:ObjectDetectionCoral:     from pycoral.utils import edgetpu
08:06:56:ObjectDetectionCoral:   File "/app/modules/ObjectDetectionCoral/bin/linux/python39/venv/lib/python3.9/site-packages/pycoral/utils/edgetpu.py", line 24, in 
08:06:56:ObjectDetectionCoral:     from pycoral.pybind._pywrap_coral import GetRuntimeVersion as get_runtime_version
08:06:56:ObjectDetectionCoral: SystemError: initialization of _pywrap_coral raised unreported exception
08:06:56:ObjectDetectionCoral: Self test: Self-test failed
08:06:56:ObjectDetectionCoral: Module setup time 00:01:10
08:06:56:ObjectDetectionCoral:                 Setup complete                                        
08:06:56:ObjectDetectionCoral: Total setup time 00:01:13

Your System (please complete the following information):

  • CodeProject.AI Server version: 2.6.5
  • OS: Ubuntu 22.04.3 LTS
  • RAM: 8GB
  • GPU: Intel(R) Core(TM) i3-9100T CPU @ 3.10GHz
  • GPU: Onboard Intel UHD Graphics 630
  • Google Coral TPU USB-Accelarator

@ingus16
Copy link
Author

ingus16 commented Jul 11, 2024

On Docker now works with 2.6.5
But windows not. Now has this error Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding

02:31:04:Preparing to install module 'ObjectDetectionCoral'
02:31:04:Downloading module 'ObjectDetectionCoral'
02:31:04:Installing module 'ObjectDetectionCoral'
02:31:05:ObjectDetectionCoral: Installing CodeProject.AI Analysis Module
02:31:05:ObjectDetectionCoral: ======================================================================
02:31:05:ObjectDetectionCoral: CodeProject.AI Installer
02:31:05:ObjectDetectionCoral: ======================================================================
02:31:05:ObjectDetectionCoral: 192.6Gb of 243Gb available on
02:31:05:ObjectDetectionCoral: General CodeProject.AI setup
02:31:05:ObjectDetectionCoral: Creating Directories...done
02:31:05:ObjectDetectionCoral: GPU support
02:31:05:ObjectDetectionCoral: CUDA Present...No
02:31:06:ObjectDetectionCoral: ROCm Present...No
02:31:06:ObjectDetectionCoral: Checking for .NET 7.0...Checking SDKs...Upgrading: .NET is 0
02:31:06:ObjectDetectionCoral: Current version is 0. Installing newer version.
02:31:06:ObjectDetectionCoral: 'winget' is not recognized as an internal or external command,
02:31:06:ObjectDetectionCoral: operable program or batch file.
02:31:08:ObjectDetectionCoral: Reading ObjectDetectionCoral settings.......done
02:31:08:ObjectDetectionCoral: Installing module Object Detection (Coral) 2.3.4
02:31:08:ObjectDetectionCoral: Installing Python 3.9
02:31:08:ObjectDetectionCoral: Python 3.9 is already installed
02:31:08:ObjectDetectionCoral: Python path configuration:
02:31:08:ObjectDetectionCoral: PYTHONHOME = (not set)
02:31:08:ObjectDetectionCoral: PYTHONPATH = (not set)
02:31:08:ObjectDetectionCoral: program name = 'C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\python.exe'
02:31:08:ObjectDetectionCoral: isolated = 0
02:31:08:ObjectDetectionCoral: environment = 1
02:31:08:ObjectDetectionCoral: user site = 1
02:31:08:ObjectDetectionCoral: import site = 1
02:31:08:ObjectDetectionCoral: sys._base_executable = 'C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\python.exe'
02:31:08:ObjectDetectionCoral: sys.base_prefix = ''
02:31:08:ObjectDetectionCoral: sys.base_exec_prefix = ''
02:31:08:ObjectDetectionCoral: sys.platlibdir = 'lib'
02:31:08:ObjectDetectionCoral: sys.executable = 'C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\python.exe'
02:31:08:ObjectDetectionCoral: sys.prefix = ''
02:31:08:ObjectDetectionCoral: sys.exec_prefix = ''
02:31:08:ObjectDetectionCoral: sys.path = [
02:31:08:ObjectDetectionCoral: 'C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39\python39.zip',
02:31:08:ObjectDetectionCoral: '.\DLLs',
02:31:08:ObjectDetectionCoral: '.\lib',
02:31:08:ObjectDetectionCoral: 'C:\Program Files\CodeProject\AI\runtimes\bin\windows\python39',
02:31:08:ObjectDetectionCoral: ]
02:31:08:ObjectDetectionCoral: Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
02:31:08:ObjectDetectionCoral: Python runtime state: core initialized
02:31:08:ObjectDetectionCoral: ModuleNotFoundError: No module named 'encodings'
02:31:08:ObjectDetectionCoral: Current thread 0x00001bd0 (most recent call first):
02:31:08:ObjectDetectionCoral:
02:31:08:ObjectDetectionCoral: Creating Virtual Environment (Local)...done
02:31:08:ObjectDetectionCoral: The system cannot find the path specified.
02:31:08:ObjectDetectionCoral: Confirming we have Python 3.9 in our virtual environment...
02:31:08:Module ObjectDetectionCoral installed successfully.
02:31:08:Module ObjectDetectionCoral not configured to AutoStart.
02:31:08:Installer exited with code 255
02:31:08:Call to run Install on module ObjectDetectionCoral has completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants