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] Unable to deploy Roboflow model to Oak-D Pro #1160

Open
avitus opened this issue Mar 19, 2024 · 4 comments
Open

[BUG] Unable to deploy Roboflow model to Oak-D Pro #1160

avitus opened this issue Mar 19, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@avitus
Copy link

avitus commented Mar 19, 2024

[==================================================]
Done
USB Speed: UsbSpeed.HIGH
None CAM_A_video 0
None 7_disparity 0
[19443010B1359D2E00] [0.1] [138.381] [VideoEncoder(1)] [critical] Out of memory while creating pool for 'bitstream' frames. Number of frames: 4 each with size: 3170304B
[19443010B1359D2E00] [0.1] [138.443] [VideoEncoder(8)] [critical] Out of memory while creating pool for 'bitstream' frames. Number of frames: 4 each with size: 444928B
[19443010B1359D2E00] [0.1] [143.021] [DetectionNetwork(10)] [critical] Fatal error in openvino 'universal'. Likely because the model was compiled for different openvino version. If you want to select an explicit openvino version use: setOpenVINOVersion while creating pipeline. If error persists please report to developers. Log: 'Convolution' '265' 'CMX memory is not enough!'.
[19443010B1359D2E00] [0.1] [146.491] [system] [critical] Fatal error. Please report to developers. Log: 'Fatal error on MSS CPU: trap: 00, address: 00000000' '0'
[2024-03-18 20:31:44] INFO [root.close:456] Closing OAK camera

@avitus avitus added the bug Something isn't working label Mar 19, 2024
@avitus avitus changed the title [BUG] Unable to deploy Roboflow model to Oak Pro D [BUG] Unable to deploy Roboflow model to Oak-D Pro Mar 20, 2024
@Erol444
Copy link
Member

Erol444 commented Apr 1, 2024

Hi @avitus ,
Could you share the minimal repro example together with the model, so we can try to repro?

@avitus
Copy link
Author

avitus commented Apr 16, 2024

Sorry for the slow reply. Here's the code

from depthai_sdk import OakCamera, RecordType
from depthai_sdk.trigger_action.actions.record_action import RecordAction
from depthai_sdk.trigger_action.triggers.detection_trigger import DetectionTrigger
from roboflow import Roboflow

rf = Roboflow(api_key="xxx")

workspaceId = 'avitus'
projectId = 'family-id'
rf_project = rf.workspace(workspaceId).project(projectId)

with OakCamera() as oak:

    color = oak.create_camera('color', resolution='128p', fps=3, encode='H264')

    model_config = {
        'source': 'roboflow', 
        'model':'family-id/4',  
        'key':'xxx' # Roboflow API key
    }

    nn = oak.create_nn(model_config, color)

    trigger = DetectionTrigger(input=nn, min_detections={'Portobello': 1}, cooldown=60)

    action = RecordAction(inputs=[color], 
                          dir_path='./vitus_recordings/',
                          duration_before_trigger=1, 
                          duration_after_trigger=6)

    oak.trigger_action(trigger=trigger, action=action)
    oak.visualize(color)
    oak.start(blocking=True)

@avitus
Copy link
Author

avitus commented Apr 16, 2024

Is there a way I can get you the API key?

@Erol444
Copy link
Member

Erol444 commented Apr 17, 2024

Hi @avitus ,
You could send the API key to [email protected] and I can take a look at it. But from error message it's likely because the model is too large (Log: 'Convolution' '265' 'CMX memory is not enough!'.), in which case I can't do much.

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

2 participants