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.
- 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).
-
Downloading
myenv.tar.gzfrom 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
/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
--sequencesupportsTSE(default) andBTFE.--orisupportsaxial,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_DATAshould contain all T2-weighted scans (.nii.gzfiles) for a single subject. Upon completion,YOUR_OUTPUT_DIRwill contain the highest-quality image for each of the three orientations.
We gratefully acknowledge the contributions of the following projects:
- https://github.com/IntelligentImaging/fetal-brain-extraction
- https://github.com/IvanDrokin/torch-conv-kan
- https://github.com/Medical-Image-Analysis-Laboratory/fetmrqc
- https://github.com/KindXiaoming/pykan
- https://github.com/gift-surg/NiftyMIC
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.