The number of clusters k values is often determined by people’s prior knowledge [10]. If the specified number of clusters is too large, the image will be split too small, and the time complexity is high, which affects the efficiency of the program running. On the contrary, if the number of clusters is too small, the target will be split incompletely or over-segmentation will appear. Therefore, selecting an appropriate number of clusters is very important for good image segmentation results.