Studies carried out by researchers show that data growth can be exploited in such a way that the use of deep learning algorithms allow predictions with a high level of precision based on the data, which is why the latest studies are focused on the use of convolutional neural networks as the optimal algorithm for image classification. The present research work has focused on making the diagnosis of a disease that affects the cornea called keratoconus through the use of deep learning algorithms to detect patterns that will later be used to carry out preventive detections. The algorithm used to perform the classifications has been convolutional neural networks as well as image preprocessing to remove noise that can limit neural network learning, resulting in more than 1900 classified images out of a total of >2000 images distributed between normal eyes and those with keratoconus, which is equivalent to 92%.

1. Introduction

Artificial intelligence (AI) is associated with simulating human reasoning through machines that are programmed to think and imitate their actions, which is associated with learning and problem solving to achieve a specific objective with the best opportunity that presents itself [1]. It is a branch of artificial intelligence that seeks to develop techniques or algorithms, which allow a system or machine to learn patterns from the data provided to predict future behaviour [2]. Machine learning (ML) has two main areas to predict events based on data: supervised learning and unsupervised learning. The basis for each of the previously mentioned areas starts from human intervention, such as supervised learning, where human intervention can make predictions [3]. In contrast, in unsupervised learning, there is no human intervention for predictions [2, 3]. Deep learning (DL) is a subfield of machine learning that seeks to use algorithms that mimic the brain’s functioning, which would allow machines to become intelligent [4]. Shanthi et al. (2021) explain that keratoconus is an atypical disease that affects the cornea, thinning its thickness and deforming it into a cone shape, thus generating a gradual decrease in vision, blurred or distorted vision. The causes of this disease have not yet been identified, so there are several factors. [58] indicate that the computerized corneal topographer and video kera to scope have been the most used methods for detecting keratoconus. They also mention the various treatments to control the progression of this disease and, in extreme cases, eliminate it.

The purpose of this research work is to promote the knowledge of deep learning, which uses artificial neural networks to perform text processing, image, object, and voice recognition; the particularity of the application of these systems is that the algorithm that is used learns by itself, thus simulating the decisions made by human beings, which is why the more data there is, the higher the precision. The main topic of the research work is focused on making diagnoses using deep learning to analyze the images generated by the corneal topographer OPD-Scan III. The main objective of this study is to design and analyze a computer solution through the application of deep learning on topographic images to improve the precision of the diagnosis of keratoconus in the teaching hospital, Baghdad, Iraq. This work is limited to the specialist’s availability for data collection because sensitive data will be treated in the research work—the number of images generated by the OPD-Scan III corneal topographer. Deep learning research work related to the health sector is scarce, so it is an emerging technology. Based on the Fundamental Methodology for Data Science, the deep learning application will be developed until the evaluation stage of the proposed model since the implementation analysis will not be carried out in the teaching hospital (BTH), Baghdad, Iraq.

2. Materials and Methodology

2.1. Methodology

The research work is a quantitate work to study the variables for their subsequent analysis; a correlational scope will be considered because it will analyze how the proposal of “deep learning application on topographic images” (independent variable) will behave on the “precision of the diagnosis of keratoconus” (dependent variable). Similarly, the Fundamental Methodology for Data Science will be used since it will provide strategies to solve data science problems in technology, data, or approaches in an agnostic way [9].

Paradigm. The paradigm is positivist. It pursues the rigorous verification of general propositions (hypotheses) through empirical observation and experiment in wide-ranging samples and from a quantitative approach to verify and perfect laws related to education. Its purpose is to verify and control the phenomena.

Focus. The focus of the research work is quantitative. It uses data collection to test hypotheses based on the numerical measurement and statistical analysis, to establish behavioural guidelines and test theories.

2.2. Variables

Independent. Application of deep learning on topographic images because it is the phenomenon that will condition the result of the dependent variable through actions that will be carried out to comply with what is proposed in the research work.

Dependent. Accuracy of the diagnosis of keratoconus because it is the phenomenon that will be affected by the actions of the independent variable.

2.2.1. Population and Sample

Population. This research focuses on the number of topographic images that the BTH has, where 456 images were identified, which are distributed in 228 healthy eyes and 228 with keratoconus.

Sample. The sample will be intentional since the entire population is needed to obtain better results in the analysis of the images.

Analysis Unit. The unit of analysis of the present research work will be the topographic images since the diagnoses of keratoconus will be carried out from them.

2.2.2. Analysis Method

Continuing with the use of the Fundamental Methodology for Data Science [10, 11], the modelling stage is where the data sets defined in the previous stage will be used. That is why this research work will propose five designs with different neural network architectures as well as the dimension that each image will have to validate which of them will provide the highest level of precision concerning learning and testing of the neural network, the designs proposed for this research work are the following (Table 1).

2.3. Instruments and Techniques
2.3.1. Instruments

The instruments are related to the tools that will be used to make the diagnosis of keratoconus; therefore, in this research work, the tools to be used are as follows: (i)Keras: it is a high-level neural network library designed under the rapid development approach, where it automatically detects the availability of a GPU and tries to use it; otherwise, it uses the CPU to continue with the correct operation; this library supports both network convolutional and recurrent [4](ii)OpenCV: it is an open-source library that supports real-time computer vision applications and improves the computer’s performance concerning its perception of images (OpenCV, s. F.)(iii)Python: it is a programming language oriented to object-oriented programming, which allows rapid development of web or server applications due to the simplicity of its syntax (Python, s. F.)(iv)Jupyter Notebook: it is an open-source web application that allows you to compile code from different programming languages; within the same work document or book, you can integrate texts, images, or graphics shared by different means (Jupyter Notebook, s. F.)

2.3.2. Techniques

In the present investigation, the techniques to be used are associated with the interpretation of the images through the program that will be implemented as well as the generation of more images because the number of images is small, and this may affect the learning of the convolutional neural network, the libraries that will allow applying the aforementioned are the following: (i)Keras: one of the various functionalities that will be used in this library is the one that allows generating a great variety of images with different filters from an image as a sample, so the size of the sample can be increased substantially(ii)OpenCL: it will interpret the images through the pixels and the intensity of each one of them. The pixel values range from 0 to 255, and the channel that presents the image will significantly influence the program

2.4. Procedures

Fundamental Methodology for Data Science provides strategies divided into ten stages, adapted from Fundamental Methodology for Data Science [12]. The first step of the methodology is understanding the business, which seeks to define what the problem is and how it can be solved. The next stage is the analytical approach, which seeks to adapt the solution using machine learning techniques. One of the techniques that will be used is convolutional neural networks, which is part of deep learning, part of machine learning, to perform keratoconus detection with a high level of precision and early detection.

The data requirements define what type of data is necessary for the solution, including multimedia files and flat files. The type of data needed for the deep learning solution is images, so the files generated by the OPD-Scan III equipment are needed. The data collection stage is focused on obtaining the necessary data for the algorithm; on the other hand, in the data understanding stage, techniques are used to evaluate the quality of the data, so if errors are found in the data collected, they can return to the previous stage mentioned. In the stages mentioned earlier, a Python program was developed that allows the necessary information to be extracted from what was obtained by the OPD-Scan III equipment since the equipment generated multiple reports in a single file. The files exported from the specialized equipment contain multiple reports, so only those that contain “EY” in the name were considered since within that file are the necessary images. When executing the file extraction, it generates a new folder where the images to be used in the research work will be stored. The next process was to list the cases of healthy eyes and those with keratoconus for another process to be in charge of distributing and classifying images to the respective category. The next stage is that of data preparation, in which it is sought to perform image treatments with the objective that the most valuable sections can be used, as well as the definition of the data set to be used in the modelling stage. In this way, the techniques mentioned in the previous sections were implemented to generate various cases since the sample is small. Therefore, a process will be carried out to increase the number of images. As a first step, the program must obtain the path of the folder where the images are located since the OpenCV (Figure 1) library needs it to interpret it as a matrix of by , referring to the width and height, respectively, of the image.

Next, the Keras library was used to increase the data, where a random rotation of 45 degrees was carried out as well as the horizontal rotation of the image. By making use of the data augmentation technique, it generated a significant increase resulting in a total of 6609 images that will be distributed in 3 data sets so that the algorithm can learn correctly, which are as follows: (i)Training: set of data that will be used to learn the proposed model(ii)Validation: data set that will be used to validate what the model has learned based on the training data set, thus making the model learn to classify incorrectly(iii)Tests: data set that will be used to evaluate the performance of the model in order to validate whether it has been classified correctly or not based on the data provided

The distribution of the training and validation categories is part of a single group of data since the number of images they count is too high to make a manual adjustment, so the distribution of 70% and 30%, respectively, has been made. While the test data set is independent, the number of images for each data set to be used in the convolutional neural network is as follows: in this way, by having a more significant number of images to process, a comparison will be made of convolutional neural network designs to measure image classification performance and accuracy. When generating images, the images were preprocessed using the OpenCV library, since it allows applying filters to reduce noise or segments of the image that are not useful, which leads to causing the model not to obtain a good performance; the filters to apply are the following: (i)Gaussian blur: this allows you to apply a blur to the image in order to reduce noise so that a later process can continue with the treatment(ii)Edge detection: this allows you to identify the edges of the image in order only to treat the most significant parts

The images are processed in their original size since they are subsequently resized according to the input parameter of the designs.

3. Results

3.1. Current Situation

In the Baghdad Teaching Hospital, Iraq, the specialized equipment OPD-Scan III is used to identify different diseases, one of them being keratoconus through the corneal topographer functionality that the team has; the procedure to identify the disease consists of measuring the thickness of the cornea. The main reason why this procedure is chosen is that keratoconus degrades the thickness, so it tends to deform into a cone shape. One of the peculiarities of the OPD-Scan III equipment is that it allows identifying the most significant parts of the rings and regions where deformities occur, resulting in a value expressed as a percentage value that must exceed the minimum threshold of 70% to consider that the eye presents keratoconus.

3.2. Development of the Proposal

This research work is aimed at carrying out a correct classification of keratoconus disease that leads to an early detection based on the history of patients who present the disease to carry out treatments in an initial stage. That is why various designs have been proposed executed in Amazon Elastic Compute Cloud (EC2). This platform provides computational resources in the cloud, allowing the implementation to be carried out more efficiently than its computer.

The characteristics acquired in EC2 are sufficient to carry out the processing of the images according to the dimension established for each design in Table 1. Using a GPU instead of a CPU makes a significant difference in terms of learning execution time. Validation and testing of the proposed designs because a GPU allows multiple tasks to be carried out simultaneously. At the same time, a CPU handles the tasks sequentially, and this can generate that a model that runs in 2 hours using a GPU becomes in 20 hours on a CPU. Due to the scalability it offers regarding the construction of the virtual machine that one needs, the characteristics of the acquired virtual machine.

To configure the virtual machine purchased from Amazon EC2, the following components must first be configured: (i)Key Pair. Component that generates a public key hosted on Amazon Web Service and a private key that will allow communication to the virtual machine through the SSH protocol(ii)Security Group. Component that allows or denies access to the virtual machine performs the work of a virtual firewall

Once the components have been configured, give read-only permission to the generated private key using the “chmod 400” command.

Only if the private key has read permissions can the SSH connection to the virtual machine be made. The exposure of remote port 8888 through port 8888 of the machine where the connection was made is because the Jupyter Notebook application will be used to compile Python code. The default port the application uses to run is 8888. This is followed by the execution of the “source activate tensorflow_p36” command, which installs the base configurations provided by Amazon EC2. An outstanding feature of the base installations that were previously made is the use of “tmux,” which is a program that allows multiple virtual sessions through a single terminal, resulting in the ability to activate Jupyter Notebook, view consumption from the GPU, and run Linux-related or Python-related commands. After running the Jupyter Notebook application, a URL is generated with an access code, which allows access to the application that was exposed locally when starting the SSH connection. We proceed to load the file where the Python code will be executed as well as the compressed file that contains the previously generated images. To complete the environment configuration, the following libraries must be installed through the terminal or Jupyter Notebook in order not to generate errors due to dependency failures. On this occasion, Jupyter Notebook was used for the installation, which requests a reboot of the Kernel, which is responsible for executing the codes by the user.

The workflow of this research work can be represented in Figure 2.

Table 1 will present the results obtained from the models when validating the test data as well as the execution time.

Based on the results presented, it is evident that the convolutional neural network algorithm has correctly classified the images due to the adequate use of layers in the design of architecture, thus achieving a result of 92.04% when performing the classification of healthy eyes and those suffering from keratoconus; one of the most significant parts of the results presented is the execution time, which in design 1 is not. It has been affected during the total of defined periods, thus achieving differentiation from the results of the other designs. Regarding the use of the Fundamental Methodology for Data Science, the result obtained refers to the evaluation stage where the test data set is used to validate the performance of the proposed model, in this case being design 1, the one that met the expected approach.

The architecture of design 1 will be presented graphically to visualize the processing through each implemented layer and the size associated with each of them. As can be seen, the decrease in size is carried out progressively when the “maximum grouping” layer is executed, in the same way in the use of the “totally connected layer,” which are in the final part of the architecture since they allow to connect all the neurons and result in a new neuron, where the classification that is being carried out will be indicated. The last layers related to “totally connect” are not shown in Figure 3 because they are in charge of classifying them based on the neurons assigned to them. Understanding how image processing is done will present the result of design 1 with test images.

Design 1 made the correct classification of 1908 images out of a total of 2073; the detail of each number of eyes with keratoconus and normal is detailed in Table 2.

Next, the confusion matrix will be made to evaluate the implemented algorithm (Figure 4).

Based on what is presented in Table 2, the following statements are disclosed: (i)(ii)(iii)(iv)

Knowing the combinations generated by the confusion matrix, the algorithm metrics will be generated: (i)Accuracy value here calculated as 92.04% indicates the number of correct classifications made

The value generated in this metric is the same obtained in Table 3. (i)The sensitivity value of 90.56% indicates the number of true positives that the algorithm has classified(ii)F1 score of 91.29% indicates the overall value obtained for sensitivity and accuracy shown in Figure 4

In relation to the problem presented on the diagnosis of keratoconus applying deep learning, firstly, in conjunction with the expert, healthy eyes and those suffering from keratoconus were identified to obtain 100% of cases correctly classified. Subsequently, it seeks to achieve that the evaluations of the proposed solution are carried out. In this way, the established acceptance criteria can be met, which was 90% of cases correctly classified.

The results are presented in Table 2, and the indicators serve as support to reject the general null hypothesis because it is shown that the application of deep learning classifies correctly and with a high level of precision the cases of keratoconus as well as overcome the proposed acceptance criteria threshold.

The last stages of the Fundamental Methodology for Data Science, implementation and feedback, are associated with starting up the production environment and compiling the results obtained from the model to reinforce learning. These two stages have not been contemplated in the present research work; however, it could be implemented in a future work, where you could choose to expose the model through an API to be consumed by web applications or mobile devices with the purpose of that the user can provide comments on whether the classification has been correct or not.

4. Discussion

Implemented has been a convolutional neural network for the classification of X-ray images, stating that the use of this algorithm can perform the classification of images correctly, resulting in acceptable values, but that can be improved if more images were obtained. In the same way, in this present research work, techniques were used to increase the number of images and obtain high values in the classification of the various proposed models; for this reason, I agree with Thivagar et al. [12] if a large number of images are necessary to process in the world.

In the research work by Kuo et al. [1], it is indicated that the learning transfer method is used to perform a pretraining of the neural network, which leads to better results and also the use of hyperparameters that can improve neural network performance, based on the results obtained in this research [1, 1317] on the use of hyperparameters that allow the algorithm to make the necessary adjustments to improve performance and even precision.

Accardo and Pensiero [16] explain that the proper use of filters can improve the neural network’s performance during the training phase since there is a case of suffering from overfitting or overfitting, which limits learning and can generate results with a value low. I agree with Accardo’s correct use of filters in a neural network since it can limit learning. In the present research work, the dropout layer was used to avoid overfitting during training learning.

According to Cao et al. [17], who performed image classification tests using various algorithms to validate performance, one of them being the -nearest neighbor algorithm applied to computed tomography scans, resulting in low precision and handwritten digits, where a high percentage was obtained; based on this, Seeböck emphasizes the proper use of the algorithms as well as the hyperparameters to be used. For this reason, in the present research work, a comparative analysis of the algorithms was carried out to choose the one that best suited the need to classify images, which is why Seeböck is in agreement with what was indicated.

5. Conclusions

The proposed objectives, as well as the results obtained, allowed us to reach the following conclusions: (i)The use of convolutional neural networks allowed validating the correct classification of eyes that present keratoconus, which can be seen in Table 2, where 940 of 1038 images have been correctly classified. In this way, it can be concluded that the diagnosis of keratoconus using deep learning or deep learning has been satisfactory, managing to comply with what is proposed in the present research work(ii)Based on the research works presented in the theoretical framework as well as in state of the art, it can be concluded that the preferred algorithm to perform a classification of images is that of convolutional neural networks; in the same way, in the present research work, it was carried out a comparative analysis of the algorithms to be used, resulting in the application of the convolutional neural network algorithm(iii)It is concluded that the designs presented in the research work have generated mixed results, of which design one was built taking into account the mitigation of overfitting as well as a correct preprocessing that allowed the algorithm to continue learning without being stopped during the defined times(iv)Based on the results obtained, it has been shown that the execution time of design 1 presents a longer time compared to the other designs since the learning process has not stopped by maintaining constant improvement in the value of the activation function of the validation data set

Data Availability

The data underlying the results presented in the study are available within the manuscript.

Conflicts of Interest

The authors declare that they have no conflicts of interest regarding the publication of this paper.