MCPcopy Create free account
hub / github.com/HiLab-git/SSL4MIS / compute_sdf

Function compute_sdf

code/utils/util.py:205–236  ·  view source on GitHub ↗

compute the signed distance map of binary mask input: segmentation, shape = (batch_size, x, y, z) output: the Signed Distance Map (SDM) sdf(x) = 0; x in segmentation boundary -inf|x-y|; x in segmentation +inf|x-y|; x out of segmentation normalize sdf to

(img_gt, out_shape)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected