Skip to content

Instantly share code, notes, and snippets.

@J3698
Created September 7, 2021 16:39
Show Gist options
  • Save J3698/8139e8b8b1bf8a1fee6f9f4dcbdee031 to your computer and use it in GitHub Desktop.
Save J3698/8139e8b8b1bf8a1fee6f9f4dcbdee031 to your computer and use it in GitHub Desktop.
Set up pipeline for simple model OAK-1
def setup_pipeline():
pipeline = depthai.Pipeline()
cam_rgb = pipeline.createColorCamera()
cam_rgb.setPreviewSize(256, 256)
cam_rgb.setInterleaved(False)
detection_nn = pipeline.createNeuralNetwork()
detection_nn.setBlobPath("./exports/test_openvino_2021.4_5shave.blob")
cam_rgb.preview.link(detection_nn.input)
xout_nn = pipeline.createXLinkOut()
xout_nn.setStreamName("nn")
detection_nn.out.link(xout_nn.input)
return pipeline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment