Skip to content

birthlab/OR-KAN

 
 

Repository files navigation

OR-KAN: Quality-label-free Fetal Brain MRI Quality Control Based on Image Orientation Recognition Uncertainty

OR-KAN is a tool for quality control (QC) of T2-weighted (T2w) fetal brain MR images.

Features

  • Training does not rely on labeled data.
  • Applicable to cross-device MRI scan data.
  • Equipped with orientation classification capabilities, it can be integrated into the slice-to-volume reconstruction pipeline (such as NiftyMIC).

Environment

  • Downloading myenv.tar.gz from Google Drive

  • Extract the package using the following command:

    tar -xzf myenv.tar.gz -C YOUR_PATH/OR-KAN/conda_env
  • Activate the environment by running:

    source YOUR_PATH/OR-KAN/conda_env/bin/activate

Usage

/checkpoint: Pre-trained weights for OR-KAN

/data_example_with_mask: It includes one high-quality (from here) and one low-quality (from here) fetal brain MR image as examples for testing.

  • For brain extraction on your fetal brain images, it is recommended to use the Fetal-BET tool.

  • Run the quality control model with the following command (with automatic orientation detection):

    python quality_control.py --input_dir YOUR_PATH/OR-KAN/data_example_with_mask
  • You can also manually specify the MRI sequence and orientation if known:

    python quality_control.py --input_dir YOUR_PATH/OR-KAN/data_example_with_mask \
     --sequence TSE --ori coronal
    • --sequence supports TSE (default) and BTFE.
    • --ori supports axial, coronal, sagittal. If not specified, the model will automatically determine the main orientation by majority voting across all slices.
  • The script will print, for each MRI, the inferred orientation (if auto), quality score, quality class, used threshold, and model sequence.

  • Run the quality control pipeline for reconstruction using the following command:

    python quality_control_for_recon.py --input_dir YOUR_DATA --output_dir YOUR_OUTPUT_DIR

    In this command, YOUR_DATA should contain all T2-weighted scans (.nii.gz files) for a single subject. Upon completion, YOUR_OUTPUT_DIR will contain the highest-quality image for each of the three orientations.

Docker (Optional)

Acknowledgments

We gratefully acknowledge the contributions of the following projects:

  1. https://github.com/IntelligentImaging/fetal-brain-extraction
  2. https://github.com/IvanDrokin/torch-conv-kan
  3. https://github.com/Medical-Image-Analysis-Laboratory/fetmrqc
  4. https://github.com/KindXiaoming/pykan
  5. https://github.com/gift-surg/NiftyMIC

Citation

Mingxuan Liu, Yi Liao, Haoxiang Li, Juncheng Zhu, Hongjia Yang, Yingqi Hao, Haibo Qu, Qiyuan Tian. Quality label free Fetal Brain MRI Quality Control Based on Image Orientation Recognition Uncertainty. Medical Image Analysis, 2026, 103994. DOI: 10.1016/j.media.2026.103994.

About

Unsupervised Fetal Brain MRI Quality Control based on Slice-level Orientation Prediction Uncertainty using an Orientation Recognition KAN Model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 97.8%
  • Shell 1.1%
  • Other 1.1%