File size: 5,230 Bytes
7e5c7b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
---
task_categories:
- image-segmentation
language:
- en
tags:
- multimodal
- referring-image-segmentation
- infrared
- visible
- image-fusion
size_categories:
- 10K<n<100K
---

# MM-RIS: Multimodal Referring Image Segmentation Dataset

The **MM-RIS** dataset was introduced in the paper [RIS-FUSION: Rethinking Text-Driven Infrared and Visible Image Fusion from the Perspective of Referring Image Segmentation](https://huggingface.co/papers/2509.12710).

This large-scale benchmark supports the multimodal referring image segmentation (RIS) task by providing a goal-aligned approach to supervise and evaluate how effectively natural language contributes to infrared and visible image fusion outcomes.

## Paper

[RIS-FUSION: Rethinking Text-Driven Infrared and Visible Image Fusion from the Perspective of Referring Image Segmentation](https://huggingface.co/papers/2509.12710)

## Code

The official code repository for the associated RIS-FUSION project can be found on GitHub: [https://github.com/SijuMa2003/RIS-FUSION](https://github.com/SijuMa2003/RIS-FUSION)

## Introduction

Text-driven infrared and visible image fusion has gained attention for enabling natural language to guide the fusion process. However, existing methods often lack a goal-aligned task to supervise and evaluate how effectively the input text contributes to the fusion outcome.

We observe that **referring image segmentation (RIS)** and text-driven fusion share a common objective: highlighting the object referred to by the text. Motivated by this, we propose **RIS-FUSION**, a cascaded framework that unifies fusion and RIS through joint optimization.

To support the multimodal referring image segmentation task, we introduce **MM-RIS**, a large-scale benchmark with **12.5k training** and **3.5k testing** triplets, each consisting of an infrared-visible image pair, a segmentation mask, and a referring expression.

## Dataset Structure

The MM-RIS dataset is available in this Hugging Face repository and consists of the following Parquet files:

- `mm_ris_test.parquet`
- `mm_ris_val.parquet`
- `mm_ris_train_part1.parquet`
- `mm_ris_train_part2.parquet`

These files together comprise 12.5k training and 3.5k testing triplets. Each triplet includes an infrared image, a visible image, a segmentation mask, and a natural language referring expression.

## Sample Usage

To prepare the MM-RIS dataset for use with the RIS-FUSION code, you will need to download all the dataset files from this repository and merge the training partitions.

1.  **Download the dataset files**:
    Download `mm_ris_test.parquet`, `mm_ris_val.parquet`, `mm_ris_train_part1.parquet`, and `mm_ris_train_part2.parquet` from this Hugging Face repository and place them under a `data/` directory in your project, ideally within a cloned RIS-FUSION GitHub repository.

2.  **Merge partitioned parquet files**:
    The RIS-FUSION GitHub repository provides a script to merge the partitioned training data. Assuming you have cloned the repository and placed the parquet files in `./data/`:

    ```bash
    python ./data/merge_parquet.py
    ```
    This script will combine `mm_ris_train_part1.parquet` and `mm_ris_train_part2.parquet` into a single `mm_ris_train.parquet` file.

Once the dataset is prepared, you can use it for training and testing models as shown in the examples below.

### Training Example

```bash
python train_with_lavt.py      \
  --train_parquet ./data/mm_ris_train.parquet    \
  --val_parquet   ./data/mm_ris_val.parquet     \
  --prefusion_model unet_fuser --prefusion_base_ch 32     \
  --epochs 10 -b 16 -j 16     \
  --img_size 480     \
  --swin_type base \
  --pretrained_swin_weights ./pretrained_weights/swin_base_patch4_window12_384_22k.pth     \
  --bert_tokenizer ./bert/pretrained_weights/bert-base-uncased \
  --ck_bert ./bert/pretrained_weights/bert-base-uncased     \
  --init_from_lavt_one ./pretrained_weights/lavt_one_8_cards_ImgNet22KPre_swin-base-window12_refcoco+_adamw_b32lr0.00005wd1e-2_E40.pth     \
  --lr_seg 5e-5 --wd_seg 1e-2 --lr_pf 1e-4 --wd_pf 1e-2     \
  --lambda_prefusion 3.0     \
  --w_sobel_vis 0.0 \
  --w_sobel_ir 1.0     \
  --w_grad 1.0     \
  --w_ssim_vis 0.5 \
  --w_ssim_ir 0.0     \
  --w_mse_vis 0.5 \
  --w_mse_ir 2.0     
  --eval_vis_dir ./eval_vis \
  --output-dir ./ckpts/risfusion
```

### Testing Example

```bash
python test.py   \
  --ckpt  ./ckpts/risfusion/model_best_lavt.pth   \
  --test_parquet ./data/mm_ris_test.parquet   \
  --out_dir ./your_output_dir  \
  --bert_tokenizer ./bert/pretrained_weights/bert-base-uncased   \
  --ck_bert ./bert/pretrained_weights/bert-base-uncased
```

## Citation

If you find this dataset or the associated paper useful, please consider citing:

```bibtex
@article{RIS-FUSION2025,
  title   = {RIS-FUSION: Rethinking Text-Driven Infrared and Visible Image Fusion from the Perspective of Referring Image Segmentation},
  author  = {Ma, Siju and Gong, Changsiyu and Fan, Xiaofeng and Ma, Yong and Jiang, Chengjie},
  journal = {...},
  year    = {2025}
}
```

## Acknowledgements

-   [Swin Transformer](https://github.com/microsoft/Swin-Transformer)
-   [LAVT](https://github.com/yz93/LAVT)
-   [MMEngine](https://github.com/open-mmlab/mmengine)