In order to deal with related images and non related images effectively in content based image retrieval (CBIR),a method of greedy learning based on optimum path forest classification(OPF),named as GL OPF,was proposed.Firstly,feature vectors of query images and the images in database were extracted by Gabor wavelet transform.Then,the relevance feedback of images was obtained by GL OPF active learning,generating training set of tags.Finally,prototype sets of relevance and unrelated were formed by further evaluation of OPF classifier of mark sets,and the most relevant query images would return after every iteration.The effectiveness of proposed method was verified by experiments on the three image databases Caltch101,Corel and Pascal.The experimental results showed that in eight iterations,the query precision of GL OPF rises more than that of other three methods.In addition,the running and query time of GL OPF is almost the same as that of OPF.