Skip to main content

rs2_net

Function rs2_net 

Source
pub fn rs2_net(
    magnitude: &[f64],
    grid: &Grid,
    model_onnx: &[u8],
    params: &Rs2NetParams,
    progress: impl FnMut(usize, usize),
) -> Result<Vec<u8>, OnnxError>
Expand description

Rodent brain mask via RS2-Net.

  • magnitude — magnitude image, column-major (nx, ny, nz).
  • model_onnx — bytes of the exported rs2-net.onnx (see crate::models).
  • progress(done, total) — called after each network evaluation.

Returns a binary mask (0/1) on the input grid.