# Semantic Decomposition and Anomaly Detection of Tympan Membrane Endoscopic Images
## 6 Discussion  
Middle ear diseases are a disorder that may lead to potentially catastrophic side effects, including hearing loss and vestibular dysfunction [1]. They are particularly common in children and have been determined to have a relapse rate of over 80% [2]. Although the early detection and treatment of middle ear problems are essential, the average diagnostic accuracy of pediatricians and otolaryngologists in primary care is less than 70% [3]. Middle ear diseases are usually diagnosed by otoscopy; therefore, medical image processing, such as tympanic membrane endoscopy, is necessary for clinical analysis and data exploration [23]. The implementation of AI technology may be justifiable because such data are highly complex and may be difficult to visually interpret and diagnose from a single image [24]. In this study, we performed semantic decomposition to efficiently apply complicated tympanic membrane endoscopic images to the model. First, AHE was applied to maintain only structural information in the middle ear, except RGB values. Then, Canny edge detection was used to verify that only the edge of the affected region remained. The model learned structural information in the middle ear, information about the damaged edge, and original RGB data. The model then generated an abnormality score and applied the K-NN method to detect anomalies with an accuracy of 94.5%. As a result of checking the misclassified images, most of the misclassified cases were classified as abnormal despite normal tympanic membranes. For example, the misclassified cases were congested or not clean surface tympanic membranes, as shown in Figure 12.  
We also performed comparisons with supervised learning models to validate our method. First, we adopted GoogLeNet as a supervised learning model for comparison. GoogLeNet trained four classes: normal tympanic membrane, the perforation of the tympanic membrane, retraction of the tympanic membrane, and cholesteatoma. The optimizer used Adam, the cross-entropy function utilized the loss function, and the learning rate was learned as \(1\times 10^{-4}\). The validation accuracy was 90% in epoch 25. To verify the purpose of our study, we used test data that the model did not learn. The data used in the test did not train at both supervised and unsupervised learning models to verify the purpose of our study. The test images were not perforation, re-traction, and  
Figure 12: Example of misclassified images. cholesteatoma. It was difficult to diagnose specific diseases from the images but they were certainly abnormal. The algorithm proposed in this paper classified all 103 abnormal tympanic mem-brane images as abnormal. However, the supervised learning model classified 25 tym-panic membrane images as normal. As shown in Table 1, the performance of the un-supervised learning model was higher for all indicators. Because the supervised learning model is hard to apply outside of the training area, on the other hand, our unsupervised-based method detected abnormal tympanic membranes with higher accuracy than supervised learning models, even though only normal tympanic membrane was learned. Comparisons with supervised learning models on the same data demonstrate that our method can diagnose more anomalies. In addition, to verify the semantic decomposition approaches, we performed comparison experiments. The experiments use unsupervised learning models identically and apply preprocessing methods differently. When using only original data without AHE and Canny edge detection, abnormal tympanic membranes were detected with an accuracy of about 2-3% lower than our method. Furthermore, we conducted an experiment that applied Sobel edge detection instead of Canny edge detection and the other preprocessing method was the same as ours. Images with original data and AHE and images with Sobel edge detection instead of Canny edge detection were shown to be 2-3% less accurate than our method. In learning VAE, Canny edge detection had a 25% lesser loss rate than Sobel edge detection.