This review shows the capabilities of artificial intelligence in the analysis of digital images in the field of medicine using convolutional neural networks of deep learning. A new generation of artificial intelligence systems is described with an explanation of decision-making algorithms to the user — explainable artificial intelligence (XAI). The taxonomy of the methods of explanation and the description of the methods themselves are given. The substantiation of the need to use explainable artificial intelligence in classification tasks is given on the example of ophthalmic diseases. The study of the components of deep learning methods used in the reviewed works (neural network architecture, accuracy, characteristics of data sets) and explainable artificial intelligence (methods of explanation, criteria for the accuracy of explanation). As an example, the problem of recognizing two of the most commonly diagnosed eye diseases: diabetic retinopathy and glaucoma by artificial neural networks is considered.