pub fn hd_bet_memory_bytes(grid: &Grid, params: &HdBetParams, heap: Heap) -> u64Expand description
Peak heap of hd_bet on a scan on grid, in bytes, natively or in a wasm32 heap.
The network at hd_bet_network_input (crate::models::ModelSpec::peak_bytes) plus what
the step allocates around it: the 1 mm volume, the padded volume with its two-channel logit
and weight accumulators, and the window’s buffers (Gaussian, input, prediction, the copy handed
to the network). The cropping and resampling before and after the network are counted too,
but never set the peak at the resolutions HD-BET is used at. The magnitude passed in and the
weight file’s bytes are the caller’s and are not included. Like hd_bet_network_input, it
takes the non-zero bounding box to be the whole field of view.
Within 0.5–1.5 % above the measured native peak of the whole step, whole-volume and sliding
window, at 1 mm, 1.5 mm, 2 mm, 0.6 mm and 0.8×0.8×3 mm (see the crate::models docs,
“Memory”).