Bingyu Li, Da Zhang, Zhiyuan Zhao, Junyu Gao, Xuelong Li
This is the official implementation of our paper "StitchFusion: Weaving Any Visual Modalities to Enhance Multimodal Semantic Segmentation".
We are delighted to announce that our paper has been officially accepted by the ACM International Conference on Multimedia (ACMMM 2025) and selected for Oral Presentation! Highlights of Review Results
Acceptance Type: Oral Presentation
Average Review Score: 6.5/10
Confidence Score: 4/5
Multimodal semantic segmentation shows significant potential for enhancing segmentation accuracy in complex scenes. However, current methods often incorporate specialized feature fusion modules tailored to specific modalities, thereby restricting input flexibility and increasing the number of training parameters. To address these challenges, we propose StitchFusion, a straightforward yet effective modal fusion framework that integrates large-scale pre-trained models directly as encoders and feature fusers. This approach facilitates comprehensive multi-modal and multi-scale feature fusion, accommodating any visual modal inputs. Specifically, Our framework achieves modal integration during encoding by sharing multi-modal visual information. To enhance information exchange across modalities, we introduce a multi-directional adapter module (MultiAdapter) to enable cross-modal information transfer during encoding. By leveraging MultiAdapter to propagate multi-scale information across pre-trained encoders during the encoding process, StitchFusion achieves multi-modal visual information integration during encoding. Extensive comparative experiments demonstrate that our model achieves state-of-the-art performance on four multi-modal segmentation datasets with minimal additional parameters. Furthermore, the experimental integration of MultiAdapter with existing Feature Fusion Modules (FFMs) highlights their complementary nature.
Figure: Comparison of different model fusion paradigms.
Figure: MultiAdapter Module For StitchFusion Framwork At Different Density Levels.
First, create and activate the environment using the following commands:
conda env create -f environment.yaml
conda activate StitchFusion
Download the dataset:
- MCubeS, for multimodal material segmentation with RGB-A-D-N modalities.
- FMB, for FMB dataset with RGB-Infrared modalities.
- PST, for PST900 dataset with RGB-Thermal modalities.
- DeLiver, for DeLiVER dataset with RGB-D-E-L modalities.
- MFNet, for MFNet dataset with RGB-T modalities.
Then, put the dataset under data directory as follows:
data/
├── MCubeS
│ ├── polL_color
│ ├── polL_aolp_sin
│ ├── polL_aolp_cos
│ ├── polL_dolp
│ ├── NIR_warped
│ ├── NIR_warped_mask
│ ├── GT
│ ├── SSGT4MS
│ ├── list_folder
│ └── SS
├── FMB
│ ├── test
│ │ ├── color
│ │ ├── Infrared
│ │ ├── Label
│ │ └── Visible
│ ├── train
│ │ ├── color
│ │ ├── Infrared
│ │ ├── Label
│ │ └── Visible
├── PST
│ ├── test
│ │ ├── rgb
│ │ ├── thermal
│ │ └── labels
│ ├── train
│ │ ├── rgb
│ │ ├── thermal
│ │ └── labels
├── DELIVER
| ├── depth
│ ├── cloud
│ │ ├── test
│ │ │ ├── MAP_10_point102
│ │ │ │ ├── 045050_depth_front.png
│ │ │ │ ├── ...
│ │ ├── train
│ │ └── val
│ ├── fog
│ ├── night
│ ├── rain
│ └── sun
│ ├── event
│ ├── hha
│ ├── img
│ ├── lidar
│ └── semantic
├── MFNet
| ├── img
| └── ther
All .pth will release later. | Model-Modal | mIoU | weight | | :--------------- | :----- | :----- | | StitchFusion-RGB-T| 85.35 | GoogleDrive |
All .pth will release later. | Model-Modal | mIoU | weight | | :--------------- | :----- | :----- | | StitchFusion-RGB-T| 64.85 | GoogleDrive |
All .pth will release later. | Model-Modal | mIoU | weight | | :--------------- | :----- | :----- | | StitchFusion-RGB-T| 57.91 | GoogleDrive | | StitchFusion-RGB-T| 57.80 | GoogleDrive | | StitchFusion-RGB-T| 58.13 | GoogleDrive |
All .pth will release later. | Model-Modal | mIoU | weight | | :--------------- | :----- | :----- | | StitchFusion-RGB-D| 65.75 | GoogleDrive | | StitchFusion-RGB-E| 57.31 | GoogleDrive | | StitchFusion-RGB-L| 58.03 | GoogleDrive | | StitchFusion-RGB-DE| 66.03 | GoogleDrive | | StitchFusion-RGB-DL| 67.06 | GoogleDrive | | StitchFusion-RGB-DEL| 68.18 | GoogleDrive |
Figure: Main Results: Comparision With SOTA Model.
Figure: Main Results: Per-Class Comparision in Different Modality Combination Config and With SOTA Model.
Before training, please download pre-trained SegFormer, and put it in the correct directory following this structure:
checkpoints/pretrained/segformer
├── mit_b0.pth
├── mit_b1.pth
├── mit_b2.pth
├── mit_b3.pth
└── mit_b4.pth
To train StitchFusion model, please update the appropriate configuration file in configs/ with appropriate paths and hyper-parameters. Then run as follows:
cd path/to/StitchFusion
conda activate StitchFusion
python -m tools.train_mm --cfg configs/mcubes_rgbadn.yaml
python -m tools.train_mm --cfg configs/fmb_rgbt.yaml
python -m tools.train_mm --cfg configs/pst_rgbt.yaml
To evaluate StitchFusion models, please download respective model weights (GoogleDrive) and save them under any folder you like.
Then, update the EVAL section of the appropriate configuration file in configs/ and run:
cd path/to/StitchFusion
conda activate StitchFusion
python -m tools.val_mm --cfg configs/mcubes_rgbadn.yaml
python -m tools.val_mm --cfg configs/fmb_rgbt.yaml
python -m tools.val_mm --cfg configs/pst_rgbt.yaml
python -m tools.val_mm --cfg configs/deliver.yaml
python -m tools.val_mm --cfg configs/mfnet_rgbt.yaml
Figure: Visulization of StitchFusion On DeLiver Dataset.
Figure: Visulization of StitchFusion On Mcubes Dataset.
This repository is under the Apache-2.0 license. For commercial use, please contact with the authors.
@article{li2024stitchfusion,
title={StitchFusion: Weaving Any Visual Modalities to Enhance Multimodal Semantic Segmentation},
author={Li, Bingyu and Zhang, Da and Zhao, Zhiyuan and Gao, Junyu and Li, Xuelong},
journal={arXiv preprint arXiv:2408.01343},
year={2024}
}
Our codebase is based on the following Github repositories. Thanks to the following public repositories: - DELIVER - MMSFormer - Semantic-segmentation
Note: This is a research level repository and might contain issues/bugs. Please contact the authors for any query.
Thanks for Stargazers repo roster for StitchFusion
$ claude mcp add StitchFusion \
-- python -m otcore.mcp_server <graph>