The directory contains source code of the published article:
Zhang et al's Collaborative group: Composed image retrieval via consensus learning from noisy annotations.
Download these datasets Shoes, FashionIQ, and Fashion200k into the "data" directory.
Please make sure you have installed anaconda or miniconda. The version about pytorch and cudatoolkit should be depended on your machine.
conda create -n css_net python=3.7 \
conda activate css_net \
pip3 install -r requirements.txtModify the config files in config directory
Run the following script to train and evluate the model:
CUDA_VISIBLE_DEVICES=0,1,2 python3 main.py --config_path=configs/Shoes_trans_g2_res50_config.json --experiment_description=base --device_idx=0,1,2 --num_workers=8 --batch_size=30 --optimizer='Adam'Example scripts are placed in the current directory named shoes.sh, iq.sh, and 200k.sh.
All the config files are placed in the pretrain_finetune folder. Using OpenNMT commands to run the codes and modifiing them according to the needs.
CoSMo: https://github.com/postBG/CosMo.pytorch
RoBerta: https://huggingface.co/docs/transformers/model_doc/roberta
If you use our code, please cite our work:
@article{ZHANG2024112135,
title = {Collaborative group: Composed image retrieval via consensus learning from noisy annotations},
journal = {Knowledge-Based Systems},
volume = {300},
pages = {112135},
year = {2024},
author = {Xu Zhang and Zhedong Zheng and Linchao Zhu and Yi Yang}
}