File size: 4,725 Bytes
1948e94 | 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 |
---
license: apache-2.0
tags:
- composed-image-retrieval
- vision-language
- multimodal
- pytorch
---
<a id="top"></a>
<div align="center">
<h1>β TEMA: Anchor the Image, Follow the Text for Multi-Modification Composed Image Retrieval</h1>
<p>
<b>Zixu Li</b><sup>1</sup>
<b>Yupeng Hu</b><sup>1β</sup>
<b>Zhiheng Fu</b><sup>1</sup>
<b>Zhiwei Chen</b><sup>1</sup>
<b>Yongqi Li</b><sup>2</sup>
<b>Liqiang Nie</b><sup>3</sup>
</p>
<p>
<sup>1</sup>Shandong University
<sup>2</sup>Hong Kong Polytechnic University
<sup>3</sup>Harbin Institute of Technology (Shenzhen)
</p>
</div>
These are the official model and data resources for **TEMA** (Text-oriented Entity Mapping Architecture), the first Composed Image Retrieval (CIR) framework designed explicitly for multi-modification scenarios.
π **Paper:** [Accepted by ACL 2026]
π **GitHub Repository:** [lee-zixu/ACL26-TEMA](https://github.com/lee-zixu/ACL26-TEMA)
---
## π Model Information
### 1. Model Name
**TEMA** (Text-oriented Entity Mapping Architecture) Checkpoints.
### 2. Task Type & Applicable Tasks
- **Task Type:** Composed Image Retrieval (CIR) / Vision-Language / Multimodal Alignment
- **Applicable Tasks:** Retrieving target images based on a reference image and complex Multi-Modification Texts (MMT), seamlessly accommodating both simple and complex modifications.
### 3. Project Introduction
Prevailing CIR setups rely on simple modification texts, inducing two critical limitations in practical applications: **Insufficient Entity Coverage** and **Clause-Entity Misalignment**.
**TEMA** brings CIR closer to real-world use cases by introducing:
- π§ **MMT Parsing Assistant (PA):** Utilizes an LLM-based text summarizer and a Consistency Detector during training to enhance the exposure and coverage of modified entities.
- π **MMT-oriented Entity Mapping (EM):** Introduces learnable queries to consolidate multiple clauses of the same entity on the text side and align them with corresponding visual entities on the image side.
### 4. Training Data Source
The model is evaluated and trained using our newly proposed instruction-rich multi-modification datasets:
- **M-FashionIQ** (Fashion domain)
- **M-CIRR** (Open domain)
These datasets replace short, simplistic texts with Multi-Modification Texts (MMT) generated by MLLM and verified by human annotators.
---
## π Usage & Basic Inference
These weights and codes are designed to be used with the official TEMA GitHub repository.
### Step 1: Prepare the Environment
Clone the GitHub repository and install the required dependencies (evaluated on Python 3.10.8 and PyTorch 2.5.1):
```bash
git clone [https://github.com/lee-zixu/ACL26-TEMA](https://github.com/lee-zixu/ACL26-TEMA)
cd TEMA
conda create -n tema python=3.10.8 -y
conda activate tema
# Install PyTorch
pip install torch==2.5.1 torchvision torchaudio --index-url [https://download.pytorch.org/whl/cu121](https://download.pytorch.org/whl/cu121)
# Install core dependencies
pip install transformers==4.25.0
```
### Step 2: Download Model & Data
Please refer to the [GitHub Repository](https://github.com/lee-zixu/ACL26-TEMA) for detailed instructions on downloading the base image datasets (FashionIQ and CIRR) and replacing their captions with our provided `mmt_captions` to construct the **M-FashionIQ** and **M-CIRR** datasets.
Ensure your folder structure matches the requirements in the official codebase.
### Step 3: Run Training / Inference
Once the environment and datasets are prepared, you can start the training or evaluation process:
```bash
python3 train.py
```
---
## β οΈ Limitations & Notes
**Disclaimer:** This framework and the constructed M-FashionIQ/M-CIRR datasets are intended for **academic research and multimodal evaluation**.
- The datasets build upon existing public datasets (FashionIQ and CIRR); users must also comply with the original licenses of those datasets.
- The model's performance relies heavily on the quality of instruction parsing, and real-world multi-modification accuracy may vary based on domain-specific data.
---
## πβοΈ Citation
If you find our paper, the M-FashionIQ/M-CIRR datasets, or this codebase useful in your research, please consider leaving a **Star** βοΈ on our GitHub repo and citing our work:
```bibtex
@inproceedings{TEMA,
title={TEMA: Anchor the Image, Follow the Text for Multi-Modification Composed Image Retrieval},
author={Li, Zixu and Hu, Yupeng and Fu, Zhiheng and Chen, Zhiwei and Li, Yongqi and Nie, Liqiang},
booktitle={Proceedings of the Association for Computational Linguistics (ACL)},
year={2026}
}
``` |