In this study, we investigate an unsupervised learning algorithm for the segmentation of remote sensing images in which the optimum number of clusters is automatically estimated, and the clustering quality is checked. The computational load is also reduced as compared to a single stage algorithm. The algorithm has two stages. At the first stage of the algorithm, the self-organizing map was used to obtain a large number of prototype clusters. At the second stage, these prototype clusters were further clustered with the K-means clustering algorithm to obtain the final clusters. A clustering validity checking method, Davies-Bouldin validity checking index, was used in the second stage of the algorithm to estimate the optimal number of clusters in the data set.