This project leverages machine learning techniques to automate the assessment of pediatric bone age using hand X-ray images. Accurate bone age prediction is essential for diagnosing growth disorders, monitoring development, and addressing endocrine issues in children. Traditional methods are time-consuming and prone to variability, making automation a valuable tool.
We developed and evaluated various models, including custom convolutional neural networks (CNNs), traditional machine learning approaches, and pretrained architectures, to classify bone age as above or below 100 months (~8.3 years).
- Source: RSNA Bone Age Dataset
- Details:
- Grayscale X-ray images of pediatric hands (digital and scanned formats).
- Metadata includes bone age (in months) and gender.
- Preprocessing:
- Images resized to 224x224 pixels.
- Data augmentation applied (rotation, brightness adjustment, flipping, etc.).
- Normalized pixel values to [0,1].
- Converted images into tensors for compatibility with machine learning frameworks.
- Tailored for task-specific feature extraction in X-ray data.
- Architecture: 4 convolutional blocks, dropout regularization, global average pooling.
- Utilizes same architecture as binary CNN implementation; final Dense layer modified for appropriate output.
- Uses continuous bone age predictions as an alternative to binary classification.
- Architecture: 4 convolutional blocks, dropout regularization, global average pooling.
- Support Vector Machine (SVM):
- Utilizing PCA for dimensionality reduction and hyperparameter tuning for the SVM model.
- Random Forest:
- Hyperparameter tuning using GridSearchCV to find best fit for the model.
- MobileNetV2: Within both the
bin_cnn_train.py
andlin_cnn_train.py
files, there is a function defined to create a model using MobileNetV2, which is commented out but ready for use.- You can also replace MobileNetV2 with any accepted models from
tensorflow.keras.applications
- You can also replace MobileNetV2 with any accepted models from
~
: Contains scripts for all models and additional functions.output/
: Associated images and text files for results from the specified model directories inside.data/
: Contains associated CSV with metadata for images. Images must be sources from the original dataset; not available on GitHub.model/
: Pretrained and saved models for reproducibility.
- Download the RSNA Bone Age Dataset from Kaggle and place it in the appropriate directory.
- Run the preprocessing scripts to prepare the data.
- Use the model training scripts to train models from scratch or load pretrained models from the
model/
directory. - Evaluate the models using the provided evaluation scripts.
- Python 3.8+
- TensorFlow 2.x
- scikit-learn
- NumPy
- Matplotlib
- Pillow