Computer Vision News - May 2020
3 Summary img ug 2 We can proceed by calculating a final prediction by taking themost frequent element in all predictions for each pixel. We can also estimate the uncertainty by calculating the pixel-wise entropy summing the contributions from each unique value in the predictions. We can note the difference between a single prediction for the last transformed image with the final “averaged” one overlaid on top of the original image. Finally, the uncertainty calculated throughout the samples on the right. all_preds = torch.from_numpy(all_preds).float() maxs, indices = torch.max(all_preds, 0 ) final_pred = maxs entropy = np.zeros((x,y)) for xx in range(x): for yy in range(y): unique_values,counts = torch.unique((all_preds[:,xx,yy]),dim= 0 ,sorted=True, return_counts=True) entropy[xx,yy] = -(counts*torch.log(counts.float())).sum() Repeating the same experiment for the dog image yields the result below, which could indicate that this is a more difficult test for the model.
Made with FlippingBook
RkJQdWJsaXNoZXIy NTc3NzU=