For the inference stage, we firstly take pixels as nodes and affinity map as edges to build an undirected sparse graph. The undirected sparse graph in Figure REF  shows an example of how a pixel node on the spoon should connect the other pixel nodes. Then, we apply the graph merge algorithm [1]} on the undirected sparse graph. The algorithm will merge nodes that have a positive affinity to each other into one supernode, by contrast, keep nodes independent if their affinity is negative. Pixels that merged to the same supernodes are regarded as belonging to the same instance. In this way, we obtain a class-agnostic instance map. A class assign module [1]} will take the class-agnostic instance map and the semantic segmentation result as input, then assign a class label with a confidence value to each instance.
<FIGURE>