This is an official PyTorch implementation of HU-KANet: A Hybrid U-Net with Kolmogorov-Arnold Networks for Explainable Medical Image Segmentation
We propose HU-KANet, a novel U-shaped network architecture built on Kolmogorov-Arnold Networks (KAN) that enhances segmentation accuracy, efficiency, and interpretability. Our model features a hybrid structure that effectively integrates local and global features, optimizing convolution kernel design while employing bidirectional, channel-level interactive weight generation at skip connections. This approach enables the efficient combination of shallow high-resolution and deep low-resolution features. Extensive experiments on multiple medical imaging datasets demonstrate that HU-KANet outperforms existing models in terms of accuracy, explainability, model size, and inference speed. Furthermore, its lightweight and efficient design significantly reduces computational resource demands, leading to lower energy consumption and a smaller carbon footprint, which makes it ideal for deployment on resource-constrained devices. Our work lays the groundwork for developing sustainable segmentation models, offering key insights for future advancements in medical image segmentation.
cd HUKANET
python -m venv venv
source ./venv/bin/activate
cd Seg_HUKANet && pip install -r requirements.txtBUSI: The dataset can be found here.
GLAS: The dataset can be found here.
CVC-ClinicDB: The dataset can be found here.
The input file structure is as follows.
Seg_HUKANet
├── inputs
│ ├── busi
│ ├── images
│ ├── malignant (1).png
| ├── ...
| ├── masks
│ ├── 0
│ ├── malignant (1)_mask.png
| ├── ...
│ ├── GLAS
│ ├── images
│ ├── 0.png
| ├── ...
| ├── masks
│ ├── 0
│ ├── 0.png
| ├── ...
│ ├── CVC-ClinicDB
│ ├── images
│ ├── 0.png
| ├── ...
| ├── masks
│ ├── 0
│ ├── 0.png
| ├── ...
You can simply train HUKANET on a single GPU by specifing the dataset name --dataset and input size --input_size.
cd Seg_HUKANet
python train.py --arch HUKANet --dataset {dataset} --input_w {input_size} --input_h {input_size} --name {dataset}_HUKANet_1 --data_dir [YOUR_DATA_DIR]You can simply test HUKANET on a single GPU by specifing name --name.
cd Seg_HUKANet
python val.py --name {dataset}_HUKANet_1You can simply test HUKANET on a single GPU by specifing name --name.
cd Seg_HUKANet
python xai.py --name {dataset}_HUKANet_1Greatly appreciate the tremendous effort for the following projects!