MCPcopy Create free account
hub / github.com/AiEson/CrossMatch / post_processing

Function post_processing

LA/code/dataloaders/utils.py:250–261  ·  view source on GitHub ↗
(prediction)

Source from the content-addressed store, hash-verified

248
249
250def post_processing(prediction):
251 prediction = nd.binary_fill_holes(prediction)
252 label_cc, num_cc = measure.label(prediction, return_num=True)
253 total_cc = np.sum(prediction)
254 measure.regionprops(label_cc)
255 for cc in range(1, num_cc + 1):
256 single_cc = label_cc == cc
257 single_vol = np.sum(single_cc)
258 if single_vol / total_cc < 0.2:
259 prediction[single_cc] = 0
260
261 return prediction

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected