Deep learning-driven diagnosis of humerus fractures from radiographic data
Description
Bone fractures are among the most frequently treated conditions in hospitals, arising from causes such as sports injuries, traffic accidents, and other trauma. X-ray imaging, computed tomography (CT), and, in more severe cases, magnetic resonance imaging (MRI) are the most commonly employed diagnostic methods. While these techniques offer high diagnostic accuracy, they are time-consuming due to the need for expert interpretation and the volume of cases requiring evaluation. This research aims to develop a machine learning-driven algorithm for the classification and diagnosis of humerus fractures, highlighting the potential of artificial intelligence in medical diagnostics. The proposed algorithm is based on Artificial Neural Networks (ANN) and trained using a dataset of X-ray images depicting both fractured and healthy bones. To optimize performance, the model was trained with rescaled input images, identifying the ideal resolution to preserve critical features necessary for accurate classification. The algorithm achieved over 90\% accuracy across different image scales, and its performance was validated using metrics such as confusion matrix, sensitivity, F1-score, and Matthews correlation coefficient (MCC), demonstrating its effectiveness as a diagnostic tool for fracture detection.
Files
Steps to reproduce
This document provides detailed instructions to reproduce the code and experiments related to the proposed study. Two datasets are provided: "original_data.zip": This dataset contains the original X-ray images (fractured and normal) and allows you to reproduce the full preprocessing and data augmentation pipeline. "final_dataset.zip": This dataset already contains the preprocessed and augmented images, ready to be used directly for training the Inception V3 neural network. If you wish to skip the preprocessing and augmentation steps, you can use this dataset directly. Please read this file carefully before starting the reproduction process. Part 1: Preprocessing Pipeline 1. Upload the file "original_data.zip" to your Google Drive. 2. Open the file "preprocessing_fractures.py" in Google Colab as a notebook. 3. This notebook will allow you to connect to your Google Drive, extract the "original_data.zip", and access the raw humerus fracture and normal X-ray images. 4. Before running the code, carefully adjust the file paths according to the structure of your own Google Drive. 5. Create the necessary folders in your Google Drive where the preprocessed images will be saved. Define these paths in the code as specified in the script. Once everything is set up (data extracted, folders created, and paths defined), you can run the notebook cell by cell to execute the following preprocessing operations: Wavelet Denoising, Histogram Equalization and Windowing The outputs will be saved directly in your Google Drive and can be downloaded afterward. Part 2: Data Augmentation 1. Open the file "region_of_interest(roi).py" in Google Colab. 2. Set the correct folder paths based on the preprocessing results. 3. Create a folder in your Google Drive where the data augmentation results will be saved. 4. Execute the notebook cell by cell after setting the correct paths. 5. Repeat the same process for the "segmentation.py" file to complete the augmentation step. Part 3: Training the Neural Network (Inception V3) 1. Upload the file "final_dataset.zip" to your Google Drive. 2. Open the file "inception_v3_150x150.py" in Google Colab as a notebook. 3. This notebook will connect to your Google Drive, extract "final_dataset.zip", and use the data for training. 4. Carefully check and modify the folder paths based on your Google Drive structure. 5. Run the notebook cell by cell. You can repeat this process with the other .py files if you're training the model on different image sizes. Google Colab offers free access to GPUs, but you must manually enable GPU acceleration: 1. In any of the Colab notebooks mentioned above, go to: Runtime > Change runtime type 2. In the "Hardware accelerator" option, select: GPU (preferably T4) 3. Then connect to the session and begin executing the code.
Institutions
- Universidad Yachay Tech