**Require:** *X*: CT volume, shape = D × H × W |

**Require:** *x*_{i} = *X*(*L*_{i}), (*i*=1, .… ,*k*): CT voxel patch |

**Require:** *y*_{i} = *M*(*x*_{i}): *y*_{i} is the output of the last layer (softmax activation function) of the model *M*, *y*_{i} has 1 more dimension than *x*_{i}, and this dimension has 3 channels. Each channel refers to the probability of the corresponding voxel belonging to background or bone or nerve, respectively. |

1) **Initialize: ***Y* ← 0 |

2) **For x**_{i} ∈ *X*,(*i* = 1, … ,*k*) **do** |

3) Y(L_{i},:) + = *y*_{i} |

4) **End for** |

5) *S* ← arg max(Y, axis = −1) (find the channel with the largest value in the last dimension) |

6) **Return** *S* (the automatic mask) |