(prediction)
| 248 | |
| 249 | |
| 250 | def 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 |
nothing calls this directly
no outgoing calls
no test coverage detected