In some aspects, the clustering engine can be further configured to precalculate distances between each two clusters in the predefined number of clusters; the storage interface can be further configured to store the precalculated distances; and the graph engine can be further configured to obtain the precalculated distances stored by the storage interface, and to construct the graph based on the precalculated distances.
In some aspects, the storage interface can be further configured to store centroid vectors of the predefined number of clusters; and the graph engine can be further configured to obtain the centroid vectors, to calculate distances between each two clusters in the predefined number of clusters based on the centroid vectors, and to construct the graph based on the calculated distances.
In some aspects, the system may also include a user-interface module configured to collect from a user at least one annotation identifying a plurality of same-segment superpixels in the biological specimen image. In some aspects, the clustering engine can be further configured to determine, based on the at least one annotation, a set of feature weights associated with the plurality of image features. In some aspects, the clustering engine can be configured to assign the plurality of superpixels to the predefined number of clusters based at least on the determined set of feature weights.