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

[BUG] NNET callbacks without visualizer enabled don't work in 1.10.0 #1024

Open
zrezke opened this issue May 18, 2023 · 0 comments
Open

[BUG] NNET callbacks without visualizer enabled don't work in 1.10.0 #1024

zrezke opened this issue May 18, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@zrezke
Copy link
Contributor

zrezke commented May 18, 2023

Depthai Sdk 1.10.0 crashes when trying to use callbacks on nnets without the visualizer enabled.

MRE

from depthai_sdk import OakCamera

with OakCamera() as oak:
    color = oak.create_camera("color")
    nnet = oak.create_nn("yolov8n_coco_640x352", color)
    oak.callback(nnet, lambda frame: print(frame))
    oak.start(blocking=True)

Traceback

Traceback (most recent call last):
  File "/home/filipjeretina/Documents/dev/depthai-sdk-experiments/nnet_cb.py", line 9, in <module>
    oak.start(blocking=True)
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_camera.py", line 353, in start
    self.poll()
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_camera.py", line 381, in poll
    self._oak.check_sync()
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_device.py", line 44, in check_sync
    sync.check_queue(block=False)  # Don't block!
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_outputs/xout/xout_base.py", line 91, in check_queue
    self.on_callback(packet)
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_outputs/xout/xout_nn.py", line 102, in on_callback
    self._visualizer.frame_shape = self._frame_shape
AttributeError: 'NoneType' object has no attribute 'frame_shape'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant