# Evaluation
This competition is evaluated on the intersection over union (IoU). The IoU of a predicted set of object pixels and a set of true object pixels is calculated as:

𝐼𝑜𝑈(𝐴,𝐵)=(𝐴∩𝐵)/(𝐴∪𝐵).

# Submission File
In order to reduce the submission file size, our metric uses run-length encoding on the pixel values. Instead of submitting an exhaustive list of indices for your segmentation, you will submit pairs of values that contain a start position and a run length. E.g. '1 3' implies starting at pixel 1 and running a total of 3 pixels (1,2,3).

The competition format requires a space delimited list of pairs. For example, '1 3 10 5' implies pixels 1,2,3,10,11,12,13,14 are to be included in the mask. The pixels are one-indexed and numbered from top to bottom, then left to right: 1 is pixel (1,1), 2 is pixel (2,1), etc.

The metric checks that the pairs are sorted, positive, and the decoded pixel values are not duplicated. It also checks that no two predicted masks for the same image are overlapping.

### We give the code for producing the run-length encoding [here](https://www.kaggle.com/guoxiaoqing/notebook72657674b4).

##### The example of submitted csv file can be found [here](https://www.kaggle.com/c/ee4211-seg/data), and the test csv should be similar to `SegTrain.csv'.