Abstract:As a research direction of computer vision, image similarity comparison has a wide range of applications, such as face recognition, person re-identification, and target tracking. However, the summary and induction of image similarity algorithms are relatively few, and there are challenges in applying them to actual industrial production. This study summarizes the principle and performance of traditional image processing algorithms and deep learning image processing algorithms in image similarity comparison, aiming to select the best algorithm for the scene of drug image similarity comparison. Among the traditional image processing algorithms, the ORB algorithm performs best on the test set, with an accuracy of 93.09%. In the deep learning algorithm, the study adopts an improved Siamese network structure, invents a label generation method, sets a specific data augmentation strategy, and adds a feature surface classification network to improve the training efficiency and accuracy. The final test results show that the improved Siamese network performs best and can achieve an accuracy of 98.56% and an inference speed of 27.80 times/s. In summary, the improved Siamese network algorithm is more suitable for the fast comparison of drug images and is expected to be widely used in the future pharmaceutical industry.