diff --git a/postprocessing.py b/postprocessing.py index 40933ce27ee149321dc8899bbf82e0a60f23d621..970f1cde85c050fdd8ca7c5d45bec4030fb317c1 100644 --- a/postprocessing.py +++ b/postprocessing.py @@ -7,7 +7,7 @@ import math from scipy.ndimage.measurements import label from scipy.ndimage.morphology import binary_dilation, binary_fill_holes -from utils import getChannelSmootingConvLayer +# from utils import getChannelSmootingConvLayer structure = np.zeros((3, 3), dtype=np.int) @@ -85,9 +85,9 @@ def postprocessPredictionAndGT(prediction, GT, device, predictionsmoothing, hole 2.network output prediction (w/o postprocessing) """ ################# PREDICTION SMOOTHING ################ - if predictionsmoothing: - smoothingKernel = getChannelSmootingConvLayer(8).to(device) - prediction = smoothingKernel(prediction) + #if predictionsmoothing: + # smoothingKernel = getChannelSmootingConvLayer(8).to(device) + # prediction = smoothingKernel(prediction) # labelMap contains following labels: 0/1/2/3/4/5/6/7 => Background/tubuli/glom_full/glom_tuft/veins/artery_full/artery_lumen/border labelMap = torch.argmax(prediction, dim=1).squeeze(0).to("cpu").numpy() # Label 0/1/2/3/4/5/6/7: Background/tubuli/glom_full/glom_tuft/veins/artery_full/artery_lumen/border