|
Overlap(j,i) = sum(TempProposal & TempGTInst) / sum(TempProposal | TempGTInst); |
The code computes the intersection over union (IoU) between the ground-truth mask and the predicted mask.
There are two severe issues in the above line.
-
Both TempProposal and TempGTInst are matrices (2D tensors), sum(TempProposal & TempGTInst) and sum( TempProposal | TempGTInst) are vectors (1D tensors), which represent the intersection and union of each column of segmentation images. In Matlab, if we use the operation / to connect 2 vectors (let's say vector a divided by vector b), it will output a scalar r, such that |a - b * r| is minimal. However, r is used as IoU by mistake. I didn't see any relation between r and IoU and I check several r values during evaluation, none of them is equals to the correct IoU values.
-
When debugging this line, I found that Intersection eliminates those ignored pixels but Union does not.
WSIS_BBTP/matlab/EvalVOCInstSeg.m
Line 75 in 03cb87b
The code computes the intersection over union (IoU) between the ground-truth mask and the predicted mask.
There are two severe issues in the above line.
Both
TempProposalandTempGTInstare matrices (2D tensors),sum(TempProposal & TempGTInst)andsum( TempProposal | TempGTInst)are vectors (1D tensors), which represent the intersection and union of each column of segmentation images. In Matlab, if we use the operation/to connect 2 vectors (let's say vector a divided by vector b), it will output a scalar r, such that|a - b * r|is minimal. However,ris used as IoU by mistake. I didn't see any relation between r and IoU and I check severalrvalues during evaluation, none of them is equals to the correct IoU values.When debugging this line, I found that Intersection eliminates those ignored pixels but Union does not.