Skip to content
Snippets Groups Projects
Commit 47d202ba authored by Nassim Bouteldja's avatar Nassim Bouteldja
Browse files

Update postprocessing.py

parent c01c699f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment