UCPM: Uncertainty-Guided Cross-Modal Retrieval with Partially Mismatched Pairs
April 16, 2026 · View on GitHub
The official pytorch implementation of UCPM: Uncertainty-Guided Cross-Modal Retrieval with Partially Mismatched Pairs (submitted to IEEE TIP).
Introduction
UCPM framework
Requirements
- Python 3.8
- PyTorch 1.20.0
- numpy
- scikit-learn
- Punkt Sentence Tokenizer:
import nltk
nltk.download()
> d punkt
(Optional) if the above download failed, you can manually download it from here. The directory structure is:
/home/username/
├── nltk_data
│ ├── tokenizers
│ ├── punkt
│ ├── czech.pickle
│ ├── french.pickle
│ ├── polish.pickle
│ ├── ......
DATASETS
Our directory structure of data.
data
├── f30k_precomp # pre-computed BUTD region features for Flickr30K, provided by SCAN
│ ├── train_ids.txt
│ ├── train_caps.txt
│ ├── ......
│
├── coco_precomp # pre-computed BUTD region features for COCO, provided by SCAN
│ ├── train_ids.txt
│ ├── train_caps.txt
│ ├── ......
│
├── cc152k_precomp # pre-computed BUTD region features for cc152k, provided by NCR
│ ├── train_ids.txt
│ ├── train_caps.tsv
│ ├── ......
│
└── vocab # vocab files provided by SCAN and NCR
├── f30k_precomp_vocab.json
├── coco_precomp_vocab.json
└── cc152k_precomp_vocab.json
Downloads
We follow NCR to obtain image features and vocabularies. Download Dataset
Noise Index
If you want to experiment with the same noise index as in this paper, the noise index files can be downloaded from here.
Training and Evaluation
Training
Coming soon
Pre-trained models and Evaluation
The pre-trained models are available here:
- CC152K model Download
- F30k 20% MRate model Download
- F30k 40% MRate model Download
- F30k 60% MRate model Download
- F30k 80% MRate model Download
- COCO 20% MRate model Download
- COCO 40% MRate model Download
- COCO 60% MRate model Download
- COCO 80% MRate model Download
Modify the data_path, vocab_path, and model_paths in the eval.py file and run it.
python eval.py
Experiment Results
Results on Well-Annotated Datasets
Results on Simulated PMPs
Results on Real-World PMPs