Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,114 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
tags:
|
| 5 |
+
- composed-image-retrieval
|
| 6 |
+
- vision-language
|
| 7 |
+
- multimodal
|
| 8 |
+
- pytorch
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
<a id="top"></a>
|
| 12 |
+
<div align="center">
|
| 13 |
+
<h1>β TEMA: Anchor the Image, Follow the Text for Multi-Modification Composed Image Retrieval</h1>
|
| 14 |
+
|
| 15 |
+
<p>
|
| 16 |
+
<b>Zixu Li</b><sup>1</sup>
|
| 17 |
+
<b>Yupeng Hu</b><sup>1β</sup>
|
| 18 |
+
<b>Zhiheng Fu</b><sup>1</sup>
|
| 19 |
+
<b>Zhiwei Chen</b><sup>1</sup>
|
| 20 |
+
<b>Yongqi Li</b><sup>2</sup>
|
| 21 |
+
<b>Liqiang Nie</b><sup>3</sup>
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
<p>
|
| 25 |
+
<sup>1</sup>Shandong University
|
| 26 |
+
<sup>2</sup>Hong Kong Polytechnic University
|
| 27 |
+
<sup>3</sup>Harbin Institute of Technology (Shenzhen)
|
| 28 |
+
</p>
|
| 29 |
+
</div>
|
| 30 |
+
|
| 31 |
+
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.
|
| 32 |
+
|
| 33 |
+
π **Paper:** [Accepted by ACL 2026]
|
| 34 |
+
π **GitHub Repository:** [lee-zixu/ACL26-TEMA](https://github.com/lee-zixu/ACL26-TEMA)
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## π Model Information
|
| 39 |
+
|
| 40 |
+
### 1. Model Name
|
| 41 |
+
**TEMA** (Text-oriented Entity Mapping Architecture) Checkpoints.
|
| 42 |
+
|
| 43 |
+
### 2. Task Type & Applicable Tasks
|
| 44 |
+
- **Task Type:** Composed Image Retrieval (CIR) / Vision-Language / Multimodal Alignment
|
| 45 |
+
- **Applicable Tasks:** Retrieving target images based on a reference image and complex Multi-Modification Texts (MMT), seamlessly accommodating both simple and complex modifications.
|
| 46 |
+
|
| 47 |
+
### 3. Project Introduction
|
| 48 |
+
Prevailing CIR setups rely on simple modification texts, inducing two critical limitations in practical applications: **Insufficient Entity Coverage** and **Clause-Entity Misalignment**.
|
| 49 |
+
|
| 50 |
+
**TEMA** brings CIR closer to real-world use cases by introducing:
|
| 51 |
+
- π§ **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.
|
| 52 |
+
- π **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.
|
| 53 |
+
|
| 54 |
+
### 4. Training Data Source
|
| 55 |
+
The model is evaluated and trained using our newly proposed instruction-rich multi-modification datasets:
|
| 56 |
+
- **M-FashionIQ** (Fashion domain)
|
| 57 |
+
- **M-CIRR** (Open domain)
|
| 58 |
+
|
| 59 |
+
These datasets replace short, simplistic texts with Multi-Modification Texts (MMT) generated by MLLM and verified by human annotators.
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## π Usage & Basic Inference
|
| 64 |
+
|
| 65 |
+
These weights and codes are designed to be used with the official TEMA GitHub repository.
|
| 66 |
+
|
| 67 |
+
### Step 1: Prepare the Environment
|
| 68 |
+
Clone the GitHub repository and install the required dependencies (evaluated on Python 3.10.8 and PyTorch 2.5.1):
|
| 69 |
+
```bash
|
| 70 |
+
git clone [https://github.com/lee-zixu/ACL26-TEMA](https://github.com/lee-zixu/ACL26-TEMA)
|
| 71 |
+
cd TEMA
|
| 72 |
+
conda create -n tema python=3.10.8 -y
|
| 73 |
+
conda activate tema
|
| 74 |
+
|
| 75 |
+
# Install PyTorch
|
| 76 |
+
pip install torch==2.5.1 torchvision torchaudio --index-url [https://download.pytorch.org/whl/cu121](https://download.pytorch.org/whl/cu121)
|
| 77 |
+
|
| 78 |
+
# Install core dependencies
|
| 79 |
+
pip install transformers==4.25.0
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
### Step 2: Download Model & Data
|
| 83 |
+
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.
|
| 84 |
+
|
| 85 |
+
Ensure your folder structure matches the requirements in the official codebase.
|
| 86 |
+
|
| 87 |
+
### Step 3: Run Training / Inference
|
| 88 |
+
Once the environment and datasets are prepared, you can start the training or evaluation process:
|
| 89 |
+
```bash
|
| 90 |
+
python3 train.py
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
---
|
| 94 |
+
|
| 95 |
+
## β οΈ Limitations & Notes
|
| 96 |
+
|
| 97 |
+
**Disclaimer:** This framework and the constructed M-FashionIQ/M-CIRR datasets are intended for **academic research and multimodal evaluation**.
|
| 98 |
+
- The datasets build upon existing public datasets (FashionIQ and CIRR); users must also comply with the original licenses of those datasets.
|
| 99 |
+
- 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.
|
| 100 |
+
|
| 101 |
+
---
|
| 102 |
+
|
| 103 |
+
## πβοΈ Citation
|
| 104 |
+
|
| 105 |
+
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:
|
| 106 |
+
|
| 107 |
+
```bibtex
|
| 108 |
+
@inproceedings{TEMA,
|
| 109 |
+
title={TEMA: Anchor the Image, Follow the Text for Multi-Modification Composed Image Retrieval},
|
| 110 |
+
author={Li, Zixu and Hu, Yupeng and Fu, Zhiheng and Chen, Zhiwei and Li, Yongqi and Nie, Liqiang},
|
| 111 |
+
booktitle={Proceedings of the Association for Computational Linguistics (ACL)},
|
| 112 |
+
year={2026}
|
| 113 |
+
}
|
| 114 |
+
```
|