Kaiwen Cai, Chris Xiaoxuan Lu, Xingyu Zhao, Wei Huang, Xiaowei Huang
2024-12-22: Our main manuscript is available on arXiv, and the supplementary material on GitHub.
2024-12-22: The code for trainig and testing RCIR is released.
2024-12-14: Our paper has been accepted for a poster presentation at AAAI 2025! 🎉
@inproceedings{cai2025risk,
author = {Cai, Kaiwen and Lu, Chris Xiaoxuan and Zhao, Xingyu and Huang, Wei and Huang, Xiaowei},
booktitle = {AAAI Conference on Artificial Intelligence}, year = {2025},
pages = {},
publisher = {},
title = {Risk Controlled Image Retrieval},
}
- Ubuntu 18.04
- python 3.9 + PyTorch 2.0 + CUDA 11.7
CUB200: https://www.vision.caltech.edu/datasets/cub_200_2011/
CAR196: http://ai.stanford.edu/~jkrause/cars/car_dataset.html
Pittsburgh:
wget "https://www.dropbox.com/s/ynep8wzii1z0r6h/pittsburgh.zip?dl=0" unzip -q pittsburgh.zipChestX-Det:
wget "http://resource.deepwise.com/ChestX-Det/train_data.zip" wget "http://resource.deepwise.com/ChestX-Det/test_data.zip" python datasets/chestx.py # preprocessingArrange folders as follow:
dbs ├── CAR196 (-cars_test, -cars_train, -devkit) ├── chest_x_det (-all, -train, -test, -ChestX_Det_test.json, -ChestX_Det_train.json) ├── CUB_200_2011 (-attributes, -images, -parts, -transformed, -bounding_boxes.txt, ..) └── pitts (-database, -query, -structure, -gen_test.lst, -gen_train.lst, -gen_val.lst, ..)
pyrun.pytrain=[model] dataset=[dataset] # `[train]=triplet|mcd|btl`, `[dataset]=cub200|car196|pitts|chestx`e.g.,
pyrun.pytrain=tripletdataset=cub200pyrun.pytrain=[model] test=[model] dataset=[dataset] test.ckpt.[dataset]=[xxx.ckpt] # `[train]=[test]=triplet|mcd|btl`, `[dataset]=cub200|car196|pitts|chestx`e.g.,
pyrun.pytrain=triplettest=tripletdataset=car196test.ckpt.car196=logs_beta/triplet_car196_0608_223821/RCIR/tnn26715/checkpoints/best.ckpt(Make sure you have completed Eval)
dataset=cub200|car196|pitts|chestx, you may need to modify the runs folder of each setting in baselines_beta.json, then run:
#!/bin/bashforiin {0..9}
do
cnt=$i
py rcir_beta.py --unc=[model] --dbs=[dataset] --cnt=$cnt --basic &# `[model]=triplet|mcd|btl|ensemble`, `[dataset]=cub200|car196|pitts|chestx`# e.g.,# py rcir_beta.py --unc=btl --dbs=car196 --cnt=$cnt --exp1 & donewait