(output, absolute, smoothing=None, self_filter=False, twice_filter=False)
| 440 | return mask |
| 441 | |
| 442 | def process_output(output, absolute, smoothing=None, self_filter=False, twice_filter=False): |
| 443 | output = torch.cat(output, dim=0) |
| 444 | output = output.sum(0) / output.shape[0] |
| 445 | if not absolute: |
| 446 | output = (output - output.min()) / (output.max() - output.min() + 1e-8) |
| 447 | mask = output[:, :] |
| 448 | if smoothing is not None: |
| 449 | mask = apply_smoothing_and_filter(mask, smoothing, self_filter, twice_filter) |
| 450 | return mask |
| 451 | |
| 452 | def calculate_IoU(mask1, mask2, smooth=1): |
| 453 | mask1 = mask1.view(-1) |
nothing calls this directly
no outgoing calls
no test coverage detected