Using a OAK PoE, I am getting an inconsistent behaviour between using a NN or not.
Without NN
The following code works (opens a window with the video feed):
from depthai_sdk import OakCamera
with OakCamera('192.168.2.33') as oak:
color = oak.create_camera('color')
oak.visualize(color)
oak.start(blocking=True)
With NN
But this one does not (copied from the device-decoding example and simplified little bit):
with OakCamera('192.168.2.33') as oak:
color = oak.create_camera('color')
nn = oak.create_nn('best_nano.json', color, nn_type='yolo', spatial=True)
oak.visualize(nn, fps=True, scale=2/3)
oak.visualize(nn.out.passthrough, fps=True)
oak.start(blocking=True)
I am getting this error:
[2023-09-29 15:11:25] INFO [root.close:456] Closing OAK camera
Traceback (most recent call last):
File "/Users/x/Documents/depthai-experiments/gen2-yolo/device-decoding/main.py", line 12, in <module>
nn = oak.create_nn('best_nano.json', color, nn_type='yolo', spatial=True)
File "/Users/x/Library/Python/3.9/lib/python/site-packages/depthai_sdk/oak_camera.py", line 320, in create_nn
spatial = self.stereo()
File "/Users/x/Library/Python/3.9/lib/python/site-packages/depthai_sdk/oak_camera.py", line 353, in stereo
left = self.camera(source="left", resolution=resolution, fps=fps)
File "/Users/x/Library/Python/3.9/lib/python/site-packages/depthai_sdk/oak_camera.py", line 183, in camera
comp = CameraComponent(self.device,
File "/Users/x/Library/Python/3.9/lib/python/site-packages/depthai_sdk/components/camera_component.py", line 112, in __init__
raise Exception(f"No camera found on user-specified socket {source}")
Exception: No camera found on user-specified socket CameraBoardSocket.???
Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit