5d273e0093fdd8fa063819274dfb2ed56d198d3e,robosat/metrics.py,MeanIoU,add,#MeanIoU#,22

Before Change



        confusion = predicted / actual

        matrix = np.array(
            [
                [
                    torch.sum(torch.isnan(confusion)).item(),
                    torch.sum(confusion == float("inf")).item(),
                ],
                [torch.sum(confusion == 0).item(), torch.sum(confusion == 1).item()],
            ]
        )

        if self.confusion_matrix is None:
            self.confusion_matrix = matrix
        else:
            self.confusion_matrix += matrix

After Change



        confusion = predicted / actual

        tn = torch.sum(torch.isnan(confusion)).item()
        fn = torch.sum(confusion == float("inf")).item()
        fp = torch.sum(confusion == 0).item()
        tp = torch.sum(confusion == 1).item()

        matrix = np.array([[tn, fn], [fp, tp]])

        if self.confusion_matrix is None:
            self.confusion_matrix = matrix
        else:
            self.confusion_matrix += matrix
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 18

Instances


Project Name: mapbox/robosat
Commit Name: 5d273e0093fdd8fa063819274dfb2ed56d198d3e
Time: 2018-10-02
Author: o@courtin.co
File Name: robosat/metrics.py
Class Name: MeanIoU
Method Name: add


Project Name: mapbox/robosat
Commit Name: e2c849fc70c258b3e09a302866ddd038589876af
Time: 2018-10-02
Author: o@courtin.co
File Name: robosat/metrics.py
Class Name: MeanIoU
Method Name: add


Project Name: mapbox/robosat
Commit Name: b8f55323541eae6bbdaf348932b4eaa67320c432
Time: 2018-09-12
Author: o@courtin.co
File Name: robosat/metrics.py
Class Name: MeanIoU
Method Name: add