In this paper, we propose a method for texture image labeling that works with a small number of training images. Our method is based on a tree of shapes and histogram features computed on the tree structure. Labeling results could be obtained by simply classifying the histogram features of all nodes in a tree of shapes. However, it is difficult to obtain satisfactory results, because features of smaller nodes are not sufficiently discriminative. Consequently, our method selects optimal discriminative subtrees for image labeling. We model an objective function that includes the parameters of a classifier and a set of thresholds for each training image to be used to select optimal subtrees. Then, labeling is performed by mapping the classification results of selected subtrees into corresponding blobs in the image. Experimental results with synthetic and real data sets that we created for evaluation show that the proposed method performs qualitatively and quantitatively much better than the existing methods.