Disclosed herein are systems and methods for analyzing biological specimen images. The system may include, for example, a superpixel generator configured to obtain a biological specimen image and group pixels of the biological specimen image into a plurality of superpixels; a feature extractor configured to extract, from each superpixel in the plurality of superpixels, a feature vector comprising a plurality of image features; a clustering engine configured to assign the plurality of superpixels to a predefined number of clusters, each cluster being characterized by a centroid vector of feature vectors of superpixels assigned to the cluster; and a storage interface configured to store, for each superpixel in the plurality of superpixels, clustering information identifying the one cluster to which the superpixel is assigned. The system may also include a graph engine configured construct a graph based on the stored information, and use the graph to perform a graph-based image processing task.
In some aspects, the system may also include a graph engine configured to obtain the clustering information stored by the storage interface; based at least on the clustering information, construct a graph comprising a plurality of nodes, wherein adjacent nodes correspond to adjacent superpixels in the biological specimen image and are connected by a weighted edge, wherein the weighted edge has a weight corresponding to a distance between clusters to which the adjacent superpixels belong; and use the graph to perform a graph-based image processing task. In some aspects, the graph-based image processing task can be a segmentation operation that groups the plurality of superpixels into a plurality of segments.