The invention discloses a rock image retrieval method which comprises: acquiring image data in real time, and inputting the image data into a trained deep learning network model to obtain a retrievalresult graph. The training process of the deep learning network model comprises: constructing a rock image data set by utilizing collected image data; inputting the data set into a network, and enabling the network to actively convert feature mapping in space after the data set is processed by a space transfer module; and inputting the processed data into a multi-granularity network, calculating atotal loss function and an mAP value of the model, and after multiple calculations, when the loss function tends to be stable and the mAP value reaches a peak value, completing training of the deep learning network model. The situation that only representation is used for classifying the rock images is avoided, meanwhile, the fine-grained characteristics of the rock images are extracted more accurately, and the retrieval accuracy of the rock images can be improved under the conditions that sundries are shielded, the number of samples is small, the quality is low, and information is lost.