Image segmentation based on the machine-learning classifiers