Hi all,
I'm working with the Deepness plugin in QGIS and trying to run the model. However, I get the following error:
--- Logging error ---
Traceback (most recent call last):
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor.py", line 134, in run
self._processing_result = self._run()
^^^^^^^^^^^
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor_detection.py", line 50, in _run
bounding_boxes_in_tile_batched = self._process_tile(tile_img_batched, tile_params_batched)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor_detection.py", line 271, in _process_tile
bounding_boxes_batched: List[Detection] = self.model.process(tile_img)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\models\model_base.py", line 388, in process
res = self.postprocessing(model_output)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\models\detector.py", line 214, in postprocessing
boxes, conf, classes = self._postprocessing_YOLO_v5_v7_DEFAULT(model_output[0][i])
~~~~~~~~~~~~~~~^^^
IndexError: index 1 is out of bounds for axis 0 with size 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\PROGRA1\QGIS341.1\apps\Python312\Lib\logging_init_.py", line 1163, in emit
stream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write'
Call stack:
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor.py", line 136, in run
logging.exception("Error occurred in MapProcessor:")
Message: 'Error occurred in MapProcessor:'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\PROGRA1\QGIS341.1\apps\Python312\Lib\logging_init_.py", line 1163, in emit
stream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write'
Call stack:
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor.py", line 155, in finished
self.finished_signal.emit(self._processing_result)
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\deepness.py", line 295, in _map_processor_finished
logging.error(msg)
Message: 'Error! Processing error: "Unhandled exception occurred. See Python Console for details"!'
Arguments: ()
I'm using:
import platform
import os
print("Operating System:", platform.system(), platform.release())
Operating System: Windows 11
print("Architecture:", platform.architecture())
Architecture: ('64bit', 'WindowsPE')
C:\Windows\System32>python3 -m pip install opencv-python-headless onnxruntime-gpu
Requirement already satisfied: opencv-python-headless in c:\users\zgram\appdata\roaming\python\python312\site-packages (4.12.0.88)
Requirement already satisfied: onnxruntime-gpu in c:\progra1\qgis341.1\apps\python312\lib\site-packages (1.22.0)
Requirement already satisfied: numpy<2.3.0,>=2 in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from opencv-python-headless) (2.2.6)
Requirement already satisfied: coloredlogs in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (15.0.1)
Requirement already satisfied: flatbuffers in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (25.2.10)
Requirement already satisfied: packaging in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (24.0)
Requirement already satisfied: protobuf in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (6.31.1)
Requirement already satisfied: sympy in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (1.14.0)
Requirement already satisfied: humanfriendly>=9.1 in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from coloredlogs->onnxruntime-gpu) (10.0)
Requirement already satisfied: pyreadline3 in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime-gpu) (3.5.4)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\progra1\qgis341.1\apps\python312\lib\site-packages (from sympy->onnxruntime-gpu) (1.3.0)
C:\Windows\System32>
Any ideas on what might be causing this or how to debug it?
Best regards,
Hi all,
I'm working with the Deepness plugin in QGIS and trying to run the model. However, I get the following error:
--- Logging error ---
Traceback (most recent call last):
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor.py", line 134, in run
self._processing_result = self._run()
^^^^^^^^^^^
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor_detection.py", line 50, in _run
bounding_boxes_in_tile_batched = self._process_tile(tile_img_batched, tile_params_batched)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor_detection.py", line 271, in _process_tile
bounding_boxes_batched: List[Detection] = self.model.process(tile_img)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\models\model_base.py", line 388, in process
res = self.postprocessing(model_output)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\models\detector.py", line 214, in postprocessing
boxes, conf, classes = self._postprocessing_YOLO_v5_v7_DEFAULT(model_output[0][i])
~~~~~~~~~~~~~~~^^^
IndexError: index 1 is out of bounds for axis 0 with size 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\PROGRA
1\QGIS341.1\apps\Python312\Lib\logging_init_.py", line 1163, in emitstream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write'
Call stack:
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor.py", line 136, in run
logging.exception("Error occurred in MapProcessor:")
Message: 'Error occurred in MapProcessor:'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\PROGRA
1\QGIS341.1\apps\Python312\Lib\logging_init_.py", line 1163, in emitstream.write(msg + self.terminator)
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write'
Call stack:
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\processing\map_processor\map_processor.py", line 155, in finished
self.finished_signal.emit(self._processing_result)
File "C:\Users/zgram/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\deepness.py", line 295, in _map_processor_finished
logging.error(msg)
Message: 'Error! Processing error: "Unhandled exception occurred. See Python Console for details"!'
Arguments: ()
I'm using:
C:\Windows\System32>python3 -m pip install opencv-python-headless onnxruntime-gpu
Requirement already satisfied: opencv-python-headless in c:\users\zgram\appdata\roaming\python\python312\site-packages (4.12.0.88)
Requirement already satisfied: onnxruntime-gpu in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (1.22.0)Requirement already satisfied: numpy<2.3.0,>=2 in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from opencv-python-headless) (2.2.6)Requirement already satisfied: coloredlogs in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (15.0.1)Requirement already satisfied: flatbuffers in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (25.2.10)Requirement already satisfied: packaging in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (24.0)Requirement already satisfied: protobuf in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (6.31.1)Requirement already satisfied: sympy in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from onnxruntime-gpu) (1.14.0)Requirement already satisfied: humanfriendly>=9.1 in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from coloredlogs->onnxruntime-gpu) (10.0)Requirement already satisfied: pyreadline3 in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime-gpu) (3.5.4)Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\progra
1\qgis341.1\apps\python312\lib\site-packages (from sympy->onnxruntime-gpu) (1.3.0)C:\Windows\System32>
Any ideas on what might be causing this or how to debug it?
Best regards,