Hi folks,
In short, the following config, as per the docs, does not work for a trained model:
from depthai_sdk import OakCamera
import depthai
# Download & deploy a model from Roboflow Universe
# https://universe.roboflow.com
with OakCamera() as oak:
color = oak.create_camera('color')
model_config = {
'source': 'roboflow', # Specify that we are downloading the model from Roboflow
'model':'rv-tnidz/1',
'key':'XXXXXXXXXXXXX' # FAKE Private API key, replace with your own!
}
nn = oak.create_nn(model_config, color)
oak.visualize(nn, fps=True)
oak.start(blocking=True)
The error goes like:
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://storage.googleapis.com/roboflow-platform-train/SWp6WDRWlxbk0xGiG4YMrQMRhEC2/b5CVHGA4lkLQGxEFlwXB/1/roboflow.zip?XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The project name and version are correct. If they wouldn’t be, the error would be, for example:
Exception: {'message': 'Unsupported get request. Version with ID "rv-tnidz/2" does not exist or cannot be loaded due to missing permissions.', 'status': 404, 'type': 'GraphMethodException', 'hint': 'You can find the API docs at https://docs.roboflow.com'}
The API key is also correct. If it wouldn’t be, the error would be:
Exception: {'message': 'This API key does not exist (or has been revoked).', 'status': 401, 'type': 'OAuthException', 'hint': 'You may retrieve your API key via the Roboflow Dashboard. Go to Account > Roboflow Keys to retrieve yours.', 'key': 'sdasddsdasdadasd'}
The device is also correctly connected and can run other apps as well:
❯ python run.py
C:\Users\Andrei\anaconda3\envs\dai\lib\site-packages\depthai_sdk\oak_camera.py:220: UsbWarning: Device connected in USB2 mode! This might cause some issues. In such case, please try using a (different) USB3 cable, or force USB2 mode 'with OakCamera(usb_speed='usb2') as oak:'
warnings.warn("Device connected in USB2 mode! This might cause some issues. "
Any ideas would be constructive! Or if anyone from the community or roboflow team happens to have a workflow that’s more manual, like downloading the model blob and loading it in via the depthai API and not the SDK, that would also be a great thing to have =)
My device is an OAK-D Lite, but I suspect this should not matter much
Thanks a lot