A new method based on Relief algorithm was proposed to solve image identification problem. K neighbor Relief algorithm was used to choose the optimal feature subset of images. Minimum distance of template matching was used in image recognition. This method improved the selection of gray co-occurrence matrix. Experiments indicated that the current recognition probability can reach 90%, this algorithm not only resulted a substantial improvement in the feature selection, but also met the needs of practical engineering.