Closed ToasterNerd closed 1 year ago
Hi @ToasterNerd , It looks like you have an older version of depthai installed. Could you try updating the library? Works with the latest version;
>>> import depthai as dai
>>> a = dai.ColorCameraProperties.SensorResolution.THE_800_P
>>> a
<SensorResolution.THE_800_P: 5>
>>> dai.__version__
'2.20.2.0'
Thanks, Erik
i tried to update the library from the requirements.txt:
opencv-python numpy depthai==2.16.0.0 blobconverter>=1.2.9
to: opencv-python numpy depthai==2.20.2.0 blobconverter>=1.2.9
then i install the requirements and when i run the main.py:
(dai_prueba) C:\MIS-COSAS\PROGRAMACION\PYTHON\IA\depthAI\probando-depthai\gen2-maskrcnn-resnet50-NOANDA>python main.py
Traceback (most recent call last):
File "C:\MIS-COSAS\PROGRAMACION\PYTHON\IA\depthAI\probando-depthai\gen2-maskrcnn-resnet50-NOANDA\main.py", line 8, in
i dont know what is this D:
i found a solution. The main.py has this import from depthai_sdk import PipelineManager, NNetManager, PreviewManager, Previews, FPSHandler, toTensorResult, frameNorm
but searching on the luxonis documentation i see that PipelineManager is import like this:
from depthai_sdk.managers ...
Then i did this: from depthai_sdk import from depthai_sdk.managers import
And works!
hi, i am trying to run the experiment but i get this error. I have installed requeriments and then python main.py and:
(dai_prueba) C:\MIS-COSAS\PROGRAMACION\PYTHON\IA\depthAI\probando-depthai\gen2-maskrcnn-resnet50-NOANDA>python main.py Traceback (most recent call last): File "C:\MIS-COSAS\PROGRAMACION\PYTHON\IA\depthAI\probando-depthai\gen2-maskrcnn-resnet50-NOANDA\main.py", line 8, in
from depthai_sdk import PipelineManager, NNetManager, PreviewManager, Previews, FPSHandler, toTensorResult, frameNorm
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk__init.py", line 1, in
from depthai_sdk.args_parser import ArgsParser
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk\args_parser.py", line 7, in
from depthai_sdk.components.parser import rgb_resolution, mono_resolution, parse_bool
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk\components__init__.py", line 2, in
from .camera_component import CameraComponent
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk\components\camera_component.py", line 3, in
from depthai_sdk.components.camera_helper import *
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk\components\camera_helper.py", line 34, in
ImageSensor('OV9782', ['800P', '720p', '400p'], 'color'),
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk\components\camera_helper.py", line 24, in init__
self.resolutions = [parse_resolution(self.type, resolution) for resolution in resolutions]
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk\components\camera_helper.py", line 24, in
self.resolutions = [parse_resolution(self.type, resolution) for resolution in resolutions]
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk\components\parser.py", line 55, in parse_resolution
return rgb_resolution(resolution)
File "C:\Users\yo_ju\anaconda3\envs\dai_prueba\lib\site-packages\depthai_sdk\components\parser.py", line 24, in rgb_resolution
return dai.ColorCameraProperties.SensorResolution.THE_800_P
AttributeError: type object 'depthai.SensorResolution' has no attribute 'THE_800_P'
i am using an oak-d-lite if this information can help.