As shown in Figure REF , we firstly employ the PSPNet [1]} as the backbone and remove its last softmax activation function to extract features. The semantic head, which combines a single convolution layer and a softmax activation function, will input those features and output a \(C \times H \times W\)  semantic segmentation probability map where \(C\)  means the total categories number. The affinity head that consists of a single convolution layer and a sigmoid activation function will output a \(N \times H \times W\)  affinity map, where \(N\)  is the neighbor number of affinity kernel. Affinity kernel [2]} defines a set of neighboring pixels that needs to generate affinity information. Examples of affinity kernels can be found in Figure REF . Each channel of the affinity map represents a probability of whether the neighbor pixel and the current one belong to the same instance.
