KlemenSkrlj And you'd link the output of this node to the dai.node.NeuralNetwork input.
Once you have this pinned down and working as expected you can potentially move this away from dai.node.HostNode and use dai.node.ScriptNode which will minimize the latency even more because there will be no device->host->device data transfer happening, the data will stay on the device side.
Okay so I converted to just FP16 and now I'm having some issues with the Neural Network node and I'm very unsure of what it wants from me because the error doesn't say anything related to which input is wrong and expected vs found type:
[1633257918] [192.168.1.124] [1772048869.060] [NeuralNetwork(18)] [error] Input image type is not supported.
[1633257918] [192.168.1.124] [1772048869.060] [NeuralNetwork(18)] [error] Node threw exception Error while preparing the input buffer.
As an aside, this is definitely and example of what I was saying here:
TheHiddenWaffle As far as I know such things are closed source and my most common way of debugging complex operations in DepthAI is to just stare at the source code for depthai-core, but that's less helpful when the on-device pipeline starts throwing errors
Current structure of my model per snpe-dlc-info:
--------------------------------------------------------------------------------
| Input Name | Dimensions | Type | Encoding Info |
--------------------------------------------------------------------------------
| rtm_input | 1,384,288,3 | Float_16 | No encoding info for this tensor |
| depth | 1,384,288,1 | Float_16 | No encoding info for this tensor |
| camera_K_inv | 1,2,2 | Float_16 | No encoding info for this tensor |
--------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
| Output Name | Dimensions | Type | Encoding Info |
---------------------------------------------------------------------------------------------
| dbg_px_coords | 1,133,2 | Float_16 | No encoding info for this tensor |
| dbg_torso_root_center_pred | 1,1,3 | Float_16 | No encoding info for this tensor |
| dbg_kp_pix_confidence | 1,133,2 | Float_16 | No encoding info for this tensor |
| dbg_z_prior | 1,133,1 | Float_16 | No encoding info for this tensor |
| dbg_kp_z_pred | 1,19 | Float_16 | No encoding info for this tensor |
| kps_xyz | 1,3,133 | Float_16 | No encoding info for this tensor |
---------------------------------------------------------------------------------------------
Current config.json:
{
"config_version": "1.0",
"model": {
"metadata": {
"name": "rtm_ada_fusion_fpdepth",
"path": "rtm_ada_fusion_fpdepth.dlc",
"precision": "float16"
},
"inputs": [
{
"name": "rtm_input",
"dtype": "float16",
"input_type": "image",
"shape": [
1,
384,
288,
3
],
"layout": "NHWC",
"preprocessing": {
"mean": [
0.0,
0.0,
0.0
],
"scale": [
1.0,
1.0,
1.0
],
"reverse_channels": false,
"interleaved_to_planar": true,
"dai_type": "BGRF16F16F16i"
}
},
{
"name": "depth",
"dtype": "float16",
"input_type": "image",
"shape": [
1,
384,
288,
1
],
"layout": "NHWC",
"preprocessing": {
"mean": [
0.0
],
"scale": [
1.0
],
"reverse_channels": false,
"interleaved_to_planar": true,
"dai_type": "GRAYF16"
}
},
{
"name": "camera_K_inv",
"dtype": "float16",
"input_type": "image",
"shape": [
1,
2,
2
],
"layout": "NCD",
"preprocessing": {
"mean": [
0.0
],
"scale": [
1.0
],
"reverse_channels": false,
"interleaved_to_planar": false,
"dai_type": "GRAYF16"
}
}
],
"outputs": [
{
"name": "kps_xyz",
"dtype": "float16",
"shape": [
1,
133,
3
],
"layout": "NCW"
},
{
"name": "dbg_torso_root_center_pred",
"dtype": "float16",
"shape": [
1,
1,
3
],
"layout": "NCH"
},
{
"name": "dbg_kp_pix_confidence",
"dtype": "float16",
"shape": [
1,
133,
2
],
"layout": "NCH"
},
{
"name": "dbg_kp_z_pred",
"dtype": "float16",
"shape": [
1,
19
],
"layout": "ND"
},
{
"name": "dbg_px_coords",
"dtype": "float16",
"shape": [
1,
133,
2
],
"layout": "NCD"
},
{
"name": "dbg_z_prior",
"dtype": "float16",
"shape": [
1,
133,
1
],
"layout": "NCD"
}
.........head stuff omitted for brevity
]
}
}
input image is being fed in as-is and preprocessing script is just extracting depth.getCvFrame(), converting to np.float16 and feeding both it and calibration into the node with type TensorInfo.DataType.FP16.
Any insight on what's causing the error? I tried a lot of variation on the json config params including modelling them off of Hub's config for yolov6 but at the end of the day I'm feeling pretty blind and a bit frustrated 🫠.