Skip to content
/ MFHS Public

MFHS : Mutual Consistency Learning-based foundation model integrates Hypergraph Computation for Semi-supervised Medical Image Segmentation.

Notifications You must be signed in to change notification settings

Zhai-Mao/MFHS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MFHS

This is the repository for MFHS : Mutual Consistency Learning-based foundation model integrates Hypergraph Computation for Semi-supervised Medical Image Segmentation.

framework

Abstract: In this paper, we propose MFHS, a novel semi-supervised framework that synergizes a vision foundation model with hypergraph learning to address these challenges.Our framework leverages a pre-trained SAM2 encoder to extract robust hierarchical features, which are then refined by a hypergraph neural network that explicitly models many-to-many high-order relationships among anatomical structures. For semi-supervised training, we employ a multi-decoder architecture to generate high-quality pseudo-labels through a cross-consistency mechanism, further enhanced by an adversarial learning module.

Contents

Requirements

Tested on Ubuntu and Models were trained on a Nvidia RTX 3090.

🛠️ Installation

  • Creat a environment conda create -n MFHS and activate it conda activate MFHS
    conda create -n MFHS
    conda activate MFHS
  • git clone https://github.com/Zhai-Mao/MFHS
    git clone https://github.com/Zhai-Mao/MFHS
  • Enter the MFHS folder cd MFHS and run pip install -e.
    cd MFHS
    pip install -e.
  • Then install the packages pip install -r requirements.txt
    pip install -r requirements.txt

👉 Get Started

First Download the dataset ACDC from SSL4MS. Here, we need to place the list file of ACDC in the specified folder.

├── MFHS/
    ├── ACDC/
       ├── data/
       │   ├── slices/
       │   │   ├── train_slices.list
       │   │   ├── val.list
       │   │   ├── patient001_frame01_slice_1.h5
       │   │   ├── patient001_frame01_slice_2.h5
       │   │   └── ...
       │   ├── test.list
       │   ├── patient001_frame01.h5
       │   ├── patient001_frame02.h5
       └── ...

Then download the SAM2 pre-trained checkpoints named sam2_hiera_large to obtain the corresponding checkpoint files.

├── MFHS/
    ├── sam2_hiera_large.pt
    ├── sam2_hiera_small.pt
    └── sam2_hiera_tiny.pt

✅ Training

Training a model based on sam2 large.

python train2d_L.py --model="SAM2UNetL" --hiera_path="sam2_hiera_large.pt" --labeled_num=3

Training a model based on sam2 small.

python train2d_L.py --model="SAM2UNetS" --hiera_path="sam2_hiera_small.pt" --labeled_num=3

Training a model based on sam2 tiny.

python train2d_L.py --model="SAM2UNetT" --hiera_path="sam2_hiera_tiny.pt" --labeled_num=3

🎬 Testing

Testing a model based on sam2 large.

python test.py --model="SAM2UNetL" --labeled_num=3

Testing a model based on sam2 small.

python test.py --model="SAM2UNetS" --labeled_num=3

Testing a model based on sam2 tiny.

python test.py --model="SAM2UNetT" --labeled_num=3

🤝 Acknowledgement

We are very grateful to the contributors of the following open-source projects and other referenced content.

Citations

@article{LIU2025112721,
title = {MFHS: Mutual Consistency Learning-Based Foundation Model Integrates Hypergraph for Semi-Supervised Medical Image Segmentation},
journal = {Pattern Recognition},
pages = {112721},
year = {2025},
issn = {0031-3203},
doi = {https://doi.org/10.1016/j.patcog.2025.112721},
url = {https://www.sciencedirect.com/science/article/pii/S0031320325013846},
author = {Xuejun Liu and Zhaichao Tang and Yonghao Wu and Ruixiang Zhai and Xuanhe Dong and Zikang Du and Shujun Cao},
keywords = {Medical Image Segmentation, Semi-Supervised Learning, Vision Foundation Models, Hypergraph Learning, Pseudo-Labeling, Adversarial Learning}
}

📫Contact

17370487061@163.com

About

MFHS : Mutual Consistency Learning-based foundation model integrates Hypergraph Computation for Semi-supervised Medical Image Segmentation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors