A feature amount calculation unit 61 calculates a feature amount corresponding to a pattern of a lesion by analyzing an inspection image. A probability calculation unit calculates a first existence probability which is a probability of the pattern of a lesion existing within the inspection image, using a calculation expression. The calculation expression is created in advance by a statistical method on the basis of a relationship between the feature amount and the presence or absence of the pattern of a lesion within an image for learning which is visually determined by a person. A similarity calculation unit calculates a similarity between the inspection image and a case image on the basis of the first existence probability and a second existence probability which is a probability of the pattern of a lesion existing within the case image which is calculated by the statistical method similarly to the first existence probability.