Hi Leo
I confirm you that I installed the version roboflowoak==0.0.11, but it generated the following error
Traceback (most recent call last):
File “C:\Users\ingca\AppData\Local\Programs\Python\Python311\Lib\site-packages\roboflowoak_init_.py”, line 72, in init
self.dai_pipe = DepthAIPipeline(
^^^^^^^^^^^^^^^^
File “C:\Users\ingca\AppData\Local\Programs\Python\Python311\Lib\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\ingca\AppData\Local\Programs\Python\Python311\Lib\site-packages\roboflowoak_init_.py”, line 104, in init
self.dai_pipe = DepthAIPipeline(
^^^^^^^^^^^^^^^^
File “C:\Users\ingca\AppData\Local\Programs\Python\Python311\Lib\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\ingca\OneDrive\Documentos\Proyecto\Proyecto.py”, line 8, in
rf = RoboflowOak(model=“trabajo-de-grado-final”, confidence=0.05,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\ingca\AppData\Local\Programs\Python\Python311\Lib\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?
- this is the code I’m running
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=“trabajo-de-grado-final”, confidence=0.05,
overlap=0.5, version=“2”,
api_key=“aDBlDcA4YIxszVDvS6WH”, rgb=True, depth=False,
device=None, device_name=None, blocking=True)
while True:
t0 = time.time()
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
# To access specific values within “predictions” use:
# p.json()[a] for p in predictions
# set “a” to the index you are attempting to access
# Example: accessing the “y”-value:
# p.json()[‘y’] for p in predictions
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