Evaluation Dataset | AvgErr | Bad1.0 |
---|---|---|
Middlebury | 1.15 | 8.25 |
ETH3D | 0.13 | 0.98 |
Platform | Model Variant | Throughput (FP16) [infs/sec] | Throughput (Quant) [infs/sec] |
---|---|---|---|
RVC2* | iter2_120x160 | 3.18 | non compatible |
RVC2* | iter2_240x320 | 1.44 | non compatible |
RVC4** | iter5_240x320 | non compatible | 27.93 |
RVC4** | iter4_360x640 | non compatible | 8.92 |
pip install depthai
pip install depthai-nodes
import depthai as dai
from depthai_nodes.ml.messages import Map2D
from depthai_nodes.parser_generator import ParserGenerator
# Get the model from the HubAI
model_description = dai.NNModelDescription(
"luxonis/crestereo:iter2-320x240", platform="RVC2"
)
archivePath = dai.getModelFromZoo(model_description)
nn_archive = dai.NNArchive(archivePath)
# Get the inputs shape
inputs = nn_archive.getConfig().model.inputs
inputs_shapes = [input.shape[2:][::-1] for input in inputs]
with dai.Pipeline() as pipeline:
# Set up cameras
left = pipeline.create(dai.node.MonoCamera)
left.setFps(2)
left.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
left.setBoardSocket(dai.CameraBoardSocket.CAM_B)
right = pipeline.create(dai.node.MonoCamera)
right.setFps(2)
right.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
right.setBoardSocket(dai.CameraBoardSocket.CAM_C)
network = pipeline.create(dai.node.NeuralNetwork)
network.setFromModelZoo(model_description, useCached=True)
manip_left = pipeline.create(dai.node.ImageManip)
manip_left.initialConfig.setResize(inputs_shapes[0][0], inputs_shapes[0][1])
manip_left.initialConfig.setFrameType(dai.ImgFrame.Type.BGR888p)
manip_right = pipeline.create(dai.node.ImageManip)
manip_right.initialConfig.setResize(inputs_shapes[1][0], inputs_shapes[1][1])
manip_right.initialConfig.setFrameType(dai.ImgFrame.Type.BGR888p)
# Set up the parser
parsers = pipeline.create(ParserGenerator).build(nn_archive)
parser = parsers[0]
# Linking
left.out.link(manip_left.inputImage)
right.out.link(manip_right.inputImage)
manip_left.out.link(network.inputs["left"])
manip_right.out.link(network.inputs["right"])
network.out.link(parser.input)
# Set up queues
parser_queue = parser.out.createOutputQueue()
pipeline.start()
while pipeline.isRunning():
parser_output: Map2D = parser_queue.get()
output_map = parser_output.map
An advanced method for stereo matching based on a cascaded recurrent stereo matching network. | |
License | Apache 2.0 Commercial use |
Downloads | 598 |
Tasks | Depth Estimation |
Model Types | ONNX |
Name | Version | Available For | Created At | Deploy |
---|---|---|---|---|
RVC4 | 7 months ago | |||
RVC4 | 7 months ago | |||
RVC2 | 7 months ago | |||
RVC2 | 7 months ago |