Sovereign 8s.is mirror of standardgalactic/midpalatal_suture_maturation_stage_classification
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-01-26 09:56:30 +08:00
Experiment.py Update and rename 3D_CNN_Model.py to Experiment.py 2026-01-26 09:40:16 +08:00
nii2npy.py Create nii2npy.py 2026-01-26 09:40:42 +08:00
README.md Update README.md 2026-01-26 09:56:30 +08:00

Midpalatal Suture Maturation Stage Classification Repository

Overview

This GitHub repository is dedicated to the development and validation of a deep learning model for classifying the maturity stages of the midpalatal suture. The model integrates a 3D Convolutional Neural Network (CNN) for processing image data from Cone Beam Computed Tomography (CBCT) images with fully connected networks for handling tabular data, facilitating multi-modal data fusion for accurate classification.

Dataset

The dataset used in this study includes both tabular data and corresponding CBCT images. The tabular data features include:

  • CT
  • Age (4-24)
  • Gender
  • Midpalatal Suture Maturation Stage
  • Dental Age
  • Cervical Spine Stage
  • Bone Density Ratio
  • Palate Length
  • Palate Depth
  • Palatal Midline Gray Density (GDs)
  • Maxilla Palate Protrusion Gray Density (GDppm)
  • Soft Palatal Gray Density (GDsp)

Each row in the table is paired with a corresponding CBCT image, serving as the visual modality in the multi-modal dataset. The dataset can be downloaded from [https://doi.org/10.57760/sciencedb.31255].

Data Processing

To facilitate the classification process:

  • Categorical labels in the tabular data were converted into numerical values using LabelEncoder from sklearn.preprocessing, while continuous variables were normalized using StandardScaler to ensure all features reside on a comparable scale.
  • To ensure high-quality inputs, raw images underwent a robust preprocessing workflow. Images were cast to 32-bit floating-point precision, followed by N4 bias field correction using Otsu threshold-based masking to remove intensity inhomogeneities. Intensity standardization was achieved via Z-score normalization calculated specifically from tissue regions (non-background) to prevent intensity skewing. Finally, all volumes were spatially resampled using linear interpolation to a uniform dimension of 128 × 128 × 128 voxels. During training, a 3D augmentation strategy was applied, including random flipping, small-angle rotations (\pm10^{\circ}), Gaussian noise injection, brightness adjustments, and random cubic occlusion to enhance model generalization.

Model Architecture

The model architecture consists of three main modules:

  1. 3D CNN Module: Extracts spatial features from 3D image inputs.
  2. Tabular Data Module: Processes tabular data through fully connected layers.
  3. Concatenation and Classification Module: Combines features from both modules for classification.

Usage Instructions

1. Data Acquisition

Download all the required files from the specified dataset source. Ensure that all raw NIfTI files (.nii.gz) are placed in a local directory (e.g., nii_data/).

2. Data Preprocessing

Before training, you must convert the raw MRI data into a format suitable for the model. Use the nii2npy.py script to perform N4 bias correction, Z-score normalization, and resampling to a fixed size (128x128x128).

Make sure to update the INPUT_FOLDER and OUTPUT_FOLDER paths in the script to point to your local data locations.

3. Model Training

Once the preprocessing is complete, run the Train_Model.py script to begin the training process. This script handles the multimodal fusion of image data and tabular features.

[!IMPORTANT] Environment Configuration: Before execution, please ensure your CUDA device environment is correctly configured within the script to match your hardware setup.

4. Results and Evaluation

After the training is finished, all generated files—including:

  • Training Logs: Detailed CSV files of the training history.
  • Model Weights: The best-performing model checkpoints.
  • Evaluation Metrics: Class distribution and accuracy statistics. These will be automatically saved in the results/ directory within the current project path.

Contact

For any queries or further information, please contact Nick at xyt34809@gmail.com