Algorithm 1.
Preprocess |
Generate (n,m) patches with stride s |
Calculate the respective ground-truth probabilities |
Train |
Initialize weights and bias |
For i=1: N_epochs, do |
Forward pass, predict |
L1 Loss: |
Backpropagate, |
Update weights with Adadelta optimizer: |
End for |
Save model and weights |
Test |
Load model and weights |
Pad image: |
Slice image to p,q subimages, |
Generate (n,m) patches with stride 4 |
Predict the probability of each pixel |
Combine the predictions to form a gradient mask |
Upscale the mask by factor of 4 |
Post-process |
Threshold the mask |
Smooth the mask edges with quadratic Bezier curve, |