Building a Deep Learning Model to Detect Osteoporosis from Dental Panoramic X-Ray Image ()
1. Introduction
Osteoporosis is a systemic skeletal disease that develops when bone mineral density and bone mass decrease, making them fragile and more likely to break, or when the structure and strength of bone change. It develops slowly over several years and is often only diagnosed when a fall or sudden impact causes a bone to break (fracture). Symptoms of vertebral (spine) fracture include severe back pain and loss of height. According to the World Health Organization (WHO), osteoporosis is a major global health concern that can lead to increased morbidity, mortality and socio-economic burden. Osteoporosis is reported to cause more hospitalization than myocardial infarction, diabetes and breast cancer, in women above 45 years of age [1]. Approximately 50% of women and 20% of men will experience osteoporotic fractures in their lifetime [2]. According to the World Health Organization (WHO), measurement of BMD using DXA is considered as the gold standard method for the identification of osteoporosis [3].
Over a number of years, researchers have reported associations between osteoporosis or low bone mineral density and signs that can be detected on dental radiographs, particularly in the width of the inferior mandibular cortex and the texture of the trabecular bone [4] [5]. The goal of dental radiography is to obtain diagnostic information while keeping the exposure to the patient and dental staff at minimum levels. This is the principle for the “As Low As Reasonably Achievable” (ALARA) to reduce health risks from ionizing radiation [6]. The signs that can be found in radiographs that indicate osteoporosis are as follows: generalized osteopenia, more evident in the column, thinning of the bone cortical, and enhanced primary trabeculation associated with loss of secondary trabeculation [7]. The radiological sings for osteoporosis are radiolucency of the upper and lower jaws and reduced definition of the cortical bone associated with bone erosion (Figure 1).
![]()
Figure 1. Normal cortex—the endosteal margin of the cortex was even and sharp on both sides (A and B). C2: Mildly-to-moderately eroded cortex—The endosteal margin showed semilunar defects (lacunar resorption) or it appeared to form endosteal cortical residues (C and D). C3: severely eroded cortex—The cortical layer formed heavy endosteal cortical residues and it was clearly porous (E and F).
During the early stages of osteoporosis, the oblique line of the mandible presents more contrast, especially because the loss of the trabecular bone mass, leading to a more radiolucent mandible body, enhancing the contrast compared to the oblique line [8].
Deep learning is a type of machine learning that can process a wider range of data resources (images, for instance, in addition to text), requires even less human intervention, and can often produce more accurate results than traditional machine learning. Deep learning uses neural networks based on the ways neurons interact in the human brain to ingest data and process it through multiple iterations that learn increasingly complex features of the data. The neural network can then make determinations about the data, learn whether a determination is correct, and use what it has learned to make determinations about new data.
Developing a tool to assist dentists in identifying signs of osteoporosis for future patient care or aiding orthopedic physicians in taking actions upon diagnosing panoramic dental images. It can also facilitate individuals in recognizing indicators in their own dental panoramic images, promoting increased attention to their health or consulting a doctor to mitigate the progression of osteoporosis. This tool holds significant medical and economic importance, as doctors can diagnose osteoporosis from panoramic images, saving costs and time for patients.
2. Materials and Methods
The Python model utilizes several essential libraries for various tasks. NumPy facilitates numerical operations and efficient handling of data arrays. The OS module interacts with the operating system, aiding in file and directory manipulation. The Glob module searches for pathnames matching specified patterns. OpenCV and PIL assist in image processing tasks, such as resizing and manipulation. TensorFlow’s Keras module offers utilities for preparing images for deep learning models. Provided code snippets illustrate functions for renaming images to numerical formats, resizing images, and constructing a model with MobileNet architecture. MobileNet was chosen as the base architecture due to its lightweight design, efficiency, flexibility, and competitive performance. While ResNet and VGG were considered, their complexity and higher resource demands made them less suitable for the intended application, particularly in mobile and edge computing environments [9]. The decision to use MobileNet aligns with the goals of achieving fast inference times while maintaining an acceptable level of accuracy, making it an optimal choice for the project at hand. Early stopping is implemented during training to prevent overfitting, monitoring the model’s performance on a validation set to halt training if no improvement is observed after a set number of epochs. In addition, dropout regularization is employed in the model to enhance its robustness. Dropout randomly ignores a subset of the units in a layer by setting their weights to zero during training. Specifically, it sets to zero the output of each hidden neuron with a probability of 0.5. The neurons that are “dropped out” do not contribute to the forward pass and are excluded from backpropagation. This approach allows the neural network to sample different architectures with each input presentation, while all architectures share weights. Consequently, dropout reduces complex co-adaptations of neurons, forcing them to learn more robust features that are useful across various random subsets of other neurons. Training results shows duration, loss, and accuracy metrics for each epoch.
3. Dataset
The data were conducted on panoramic dental radiographs to evaluate the application of the AI technology in dental imaging. A panoramic radiograph is a panoramic scanning dental X-ray of the upper and lower jaws.
The subjects of this study were collected from three distinct sources, totaling 400 images:
1. Public Repositories: The first source includes public data repositories such as Kaggle (36 normal - 75 osteoporosis) and Figshare (47 normal - 23 osteoporosis), which collectively contributed 181 images to the dataset. These platforms host freely available data for research purposes. Due to the nature of these repositories, detailed demographic information, including gender, is not available for these images.
2. Private Dental Clinic: The second source involved data collected from Dr. Imad Barngkgei Private Dental Clinic, located in Damascus, Syria (ORCID: 0000-0002-4165-5818). This data was gathered with strict adherence to patient privacy protocols. A total of 218 images were obtained from this source, with patient ages ranging from 20 to 66 years. While the demographic details regarding gender are not disclosed, it is noted that the majority of patients were women.
3. University Study: The third source consisted of a master’s project conducted at the Faculty of Dentistry at Damascus University [10]. This subset included 29 dental X-ray images, comprising 11 normal images and 19 images from patients diagnosed with osteoporosis. All patients underwent panoramic dental X-rays and DXA scans for hip and lumbar spine measurements (L2 - L4). From this source, we can identify gender: 3 males and 27 females.
It is important to note that this particular subset of images was not included in the training process of the model. This exclusion ensures that the model’s performance evaluation remains unbiased and accurately reflects its ability to generalize to new, unseen data.
Due to the limitations in demographic data from the first two sources, it is not possible to provide a comprehensive breakdown of gender or age groups across the entire dataset. This lack of demographic detail is significant because osteoporosis varies considerably between genders and across different age groups. Therefore, while the dataset includes a diverse range of images, it may not be balanced in terms of these critical factors.
400 patients were involved in this project, the patients included male and female, aged from 20 to 66 years old. Extraction of features that can characterize the properties of bones of normal and osteoporotic people is an important step in the diagnosis of osteoporosis. Feature extraction may be broadly categorized as radiogrammetric measurement, bone density measurement and texture analysis Due to the difficulty in acquiring a substantial amount of data from patients who underwent both panoramic dental X-ray and DXA scan, the data were categorized using the Klemetti and Kolmakow method.
4. Classification of Dental Radiograph
One study established the relationship between dental areas and osteoporosis, using visual estimates from orthopantomogram and periapical X-ray photodensitometry [11].
Texture analysis trabecular bone characterization using texture analysis is extensively being investigated for the study of osteoporosis. Bone strength is influenced by the shape, size, orientation and connectivity of the trabeculae. Osteoporosis results in a reduction in cortical bone thickness, a decrease in the number of trabeculae, increased inter-trabecular distance and a loss of connectivity of trabecular network. Skeletal sites rich in trabecular bone content such as distal radius, tibia, lumbar vertebra, proximal femur, calcaneum, dental images, etc. are being analyzed.
Another classification of the mandible inferior cortical according to Klemetti and Kolmakow [12]. Klemetti Classification The mandibular cortical shape is classified into one of three groups according to the method of Klemetti et al, which considers qualitatively the endosteal margin of mandibular cortical (KLEMETTI et al, 1994): C1—the endosteal cortical margin is even and sharp on both sides, normal cortex; C2—the endosteal margin has semi-lunar defects (lacunar resorption) or endosteal cortical residues on one or both sides, mild to moderate cortex erosion; C3—the cortical layer forms heavy endosteal cortical residues and is clearly porous, severely eroded cortex (Figure 1).
In this project, the panoramic dental X-rays were classified according to the cortical bone mandibular in tow aspects according to classification of klemetti, the endosteal cortical margin and the reduction in cortical bone thickness.
After categorizing the panoramic images into normal and osteoporosis classes by a specialist, they were imported into a Jupyter notebook for further processing using Python. Employing computer vision techniques, supervised classification was performed.
5. Data Preprocessing
For consistency of image preprocessing, the images were resized to a uniform size of 224 × 224 pixels. Transform a set of Images that were taken and processed under varying condition into a set where each has the same brightness and contrast. To ensure patient privacy and streamline the management of the processed images, each image was renamed using a simple numerical system. This approach involved assigning a unique sequential number to each image. By using only numbers for the filenames, we eliminate any potential identification of patients while maintaining a neat and organized dataset. This method not only protects patient confidentiality but also facilitates easier retrieval and handling of images during analysis.
6. Basic Architecture
The model consists of five convolutional layers, with the initial layers handled by the base_model serving as the input processing. Additionally, there is one pooling layer, three dropout layers, two fully connected layers, and one output layer. A Rectified Linear Unit (ReLU) activation layer is positioned next to each convolutional layer. The fifth convolutional layer is connected to a Softmax classifier through a fully connected layer. The Softmax output provides the probabilities associated with normal or osteoporosis conditions. The model is compiled using the Adam optimizer with a learning rate of 0.0002, employing categorical cross entropy as the loss function and accuracy as the evaluation metric. Additionally, early stopping is implemented with a patience of 10 epochs to monitor validation loss and restore the best weights. The scikit-learn “train_test_split” function was employed to randomly partition the dataset into training, validation, and testing sets in a ratio of 50:25:25. The image dataset underwent the train-test approach, ensuring that the splitting process maintained accurate label percentages for the training, validation, and testing data. The training process spanned 100 epochs with a batch size of 32, utilizing the provided training and validation datasets.
7. Results
Figure 2 depicts a graph illustrating the accuracy throughout training and validation across epochs.
Figure 2. Plot code and displaying.
The model demonstrates an overall improvement in accuracy over the epochs. Fluctuations in validation accuracy suggest some sensitivity to the dataset or potential overfitting.
Table 1 shows the overall experimental results achieved by the proposed method on the proposed features using MobileNet classifier. In summary, the model demonstrates good performance with high precision, recall, and F1-score, resulting in an overall accuracy of 85%.
Table 1. Table of the result.
|
Precision |
Recall |
F1-score |
accuracy |
Normal |
0.87 |
0.87 |
0.87 |
0.85 |
Osteoporosis |
0.81 |
0.81 |
0.81 |
A separate set of data, which was not used during the model building process, was introduced to evaluate the performance of the model. This evaluation dataset consisted of dental panoramic X-ray images from patients who had undergone both DXA scan and dental panoramic radioghraph (DPR). The labeling of the evaluation dataset was based on the DXA scan results. Specifically, the dataset included 10 normal images and 19 osteoporosis images. The model was then tested on this evaluation dataset, and the results shows that the overall count of true incidences is 23 out of 29. Consequently, the accuracy is 79.3%, which is really close to the model evaluation.
8. Discussion
Although DPRs are commonly performed for the evaluation of dentition and adjacent structures of the jaw, some Clinical Assistant Diagnosis (CAD) systems based on DPRs have been suggested for screening systemic diseases, such as osteoporosis. The model training process involved the utilization of essential Python libraries such as NumPy, OS, and OpenCV for handling numerical operations, interacting with the operating system, and image processing, respectively. This facilitated efficient data manipulation and preparation for the subsequent steps in the deep learning pipeline. The model architecture was constructed with a Convolutional Neural Network (CNN) framework, leveraging the powerful MobileNet as the base model. This architecture incorporated multiple layers including convolutional layers, pooling layers, fully connected layers with a softmax layer for output prediction, and activation functions. The model is trained using the collected dataset, with data preprocessing techniques such as resizing and normalization applied to enhance performance. The model was trained for 29 epochs, revealing a dynamic learning process. The initial epochs demonstrated moderate accuracy, suggesting room for improvement. As training progressed, fluctuations in validation accuracy were observed, indicating potential sensitivity to the dataset or signs of overfitting. The model’s overall accuracy improved over time, reaching a commendable level. The training duration, indicated that each epoch took approximately 16 seconds, resulting in a total training time of 8 minutes.
This efficient training process was crucial for optimizing computational resources and achieving faster model convergence. The model’s performance is evaluated using metrics like precision, recall, and F1-score. These metrics collectively provide a comprehensive evaluation, as illustrated in Table 1, of the classifier’s performance for both individual classes and overall. Overall accuracy is 0.85, indicating that 85% of the predictions across both classes were correct. In the medical context, an accuracy exceeding 80% is deemed satisfactory. However, determining 80% as the sole target accuracy for considering a system useful is not a straightforward decision. To further assess the model’s generalization capability, a separate evaluation dataset, not used during the model building, was introduced. This dataset consisted of dental panoramic X-ray images from patients who had undergone both DXA scan and DBR. The model’s predictions on this dataset, revealed a high accuracy of 79.3%. This alignment between the evaluation dataset results and the model’s overall accuracy underscores the robustness and reliability of the model.
The outcome of the model demonstrates favorable results when applied to unseen data, confirming that the model accuracy stands at 85%, surpassing the threshold of 80%.
9. Conclusion
The project discusses the development of a deep learning model to detect osteoporosis from dental panoramic X-ray images. The project highlights the importance of early detection and treatment of osteoporosis and the potential of artificial intelligence (AI) and deep learning models in improving diagnostic accuracy. The findings contribute to the advancement of AI in healthcare. The project explains the working principles of convolutional neural networks (CNNs) in image processing and sequence prediction tasks. It uses precision, recall, F1-score and accuracy in the evaluation of the proposed deep learning model. The results section presents the performance evaluation of the CNN model using dental panoramic X-ray images. It also shows the experimental results achieved by the proposed method. The project also mentions the calculation of accuracy, sensitivity, and specificity scores for evaluating the model’s performance. In terms of the procedure, the project briefly describes the process of obtaining dental panoramic X-ray images and the positioning of the patient during the scan. It also mentions the signs observed in the dental panoramic X-ray images that indicate osteoporosis, such as thinning of the bone cortical and reduced definition of the cortical bone. For future research, future research is needed, using different deep CNN architectures, more validated and qualified labeled image dataset, the appropriate number of datasets, since the method has shown a great potential for assessing a large number of images.
Acknowledgments
A special acknowledgment goes to Mohamed Motasim AbdAlnasir Hamed for his exceptional assistance with the Python codes. His expertise and dedication significantly contributed to the successful implementation of the technical aspects of this research.
I extend my heartfelt gratitude to my brother, Dr. Imad Barngkgei, whose invaluable contributions played a pivotal role in the creation of this research. His support ranged from supplying crucial data to actively participating in the classification process. His expertise and dedication have been instrumental in shaping the trajectory and success of this endeavor
Additional Details
To access the code employed in this project, you can find it at the following link: https://drive.google.com/file/d/1Tkyv3mcbBFfeXX5nsArcojJGZkkZVJGh/view?usp=drivesdk.