OS: Windows 11
Python version: 3.11
Roboflowoak version: 0.0.11
Device: Luxonis OAK-D Lite
Running script via DepthAI CLI.
Error Message:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\__init__.py", line 72, in __init__
self.dai_pipe = DepthAIPipeline(
^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\pipe.py", line 87, in __init__
self.cam_rgb.out.link(self.detection_nn.input)
^^^^^^^^^^^^^^^^
AttributeError: 'depthai.node.ColorCamera' object has no attribute 'out'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\__init__.py", line 104, in __init__
self.dai_pipe = DepthAIPipeline(
^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\pipe.py", line 87, in __init__
self.cam_rgb.out.link(self.detection_nn.input)
^^^^^^^^^^^^^^^^
AttributeError: 'depthai.node.ColorCamera' object has no attribute 'out'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\DepthAI\roboflow-projects\face-detection-mik1i\main.py", line 8, in <module>
rf = RoboflowOak(model="face-detection-mik1i", confidence=0.05, overlap=0.5,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\__init__.py", line 123, in __init__
raise Exception(
Exception: Failure while retrying load weights - does this model, version, api key exist? can you curl api.roboflow.com, and can your device download files from google cloud storage? have you hit your device limit?
Python code:
from roboflowoak import RoboflowOak
import cv2
import time
import numpy as np
if __name__ == '__main__':
# instantiating an object (rf) with the RoboflowOak module
rf = RoboflowOak(model="face-detection-mik1i", confidence=0.05, overlap=0.5,
version="15", api_key="LYXBAkDSueoU3ANtTQBC", rgb=True,
depth=True, device=None, blocking=True)
# Running our model and displaying the video output with detections
while True:
t0 = time.time()
# The rf.detect() function runs the model inference
result, frame, raw_frame, depth = rf.detect(visualize=True)
predictions = result["predictions"]
#{
# predictions:
# [ {
# x: (middle),
# y:(middle),
# width:
# height:
# depth: ###->
# confidence:
# class:
# mask: {
# ]
#}
#frame - frame after preprocs, with predictions
#raw_frame - original frame from your OAK
#depth - depth map for raw_frame, center-rectified to the center camera
# timing: for benchmarking purposes
t = time.time()-t0
print("INFERENCE TIME IN MS ", 1/t)
print("PREDICTIONS ", [p.json() for p in predictions])
# setting parameters for depth calculation
max_depth = np.amax(depth)
cv2.imshow("depth", depth/max_depth)
# displaying the video feed as successive frames
cv2.imshow("frame", frame)
# how to close the OAK inference window / stop inference: CTRL+q or CTRL+c
if cv2.waitKey(1) == ord('q'):
break
Solving the problem from other topics does not help.
I will be glad if you help me.