speedinghzl / pytorch-segmentation-toolbox

PyTorch Implementations for DeeplabV3 and PSPNet
MIT License
772 stars 167 forks source link

Fixed predict_sliding not computing correctly #55

Open ironcadiz opened 4 years ago

ironcadiz commented 4 years ago

This PR fixes the predict_sliding function of evaluate.py not giving correct values.

Currently instead of adding the full batch of obtained probabilities, it only adds the ones from the first image. This does not throw and error since numpy casts the dimensions on addition, resulting on the predictions for the first image being stored in place of the rest. This results in a very low MIoU whenever the script is run with batch_size > world_size