Official code for SkillCIR (NeurIPS 2026).
Training-free composed image retrieval (CIR) methods use a frozen MLLM to reason about the user's edit, but then compress every inferred constraint into a single retrieval signal. SkillCIR executes the inferred intent instead: each constraint activates a typed retrieval skill that scores gallery candidates along one evidence channel, and the per-skill scores are composed with explicit signs at ranking time.
- 2026-11 — We release a basic version of the SkillCIR code. More components will be added in future updates.
git clone https://github.com/Pter61/skillcir.git
cd skillcir
pip install -e . # core (NumPy only)
pip install -e '.[images]' # optional: OpenCLIP image/text encodingPython 3.9+ is required.
Run the demo (no model download or network access needed):
python examples/run_demo.py --top-k 3 --evaluate
# or, after installation
skillcir demo --top-k 3 --evaluate --output output/demo.jsonThe demo ranks a small gallery for a "remove the seashells, keep the stingray" query and prints each candidate's total score together with the signed contribution of every active skill.
from skillcir import Gallery, QueryFeatures, retrieve
gallery = Gallery(ids, gallery_features) # one row per image
query = QueryFeatures(target=t, reference=r, remove=n)
result = retrieve(gallery, query, active_skills=["RefSkill", "EntityNeg"], top_k=10)
for item in result.rankings:
print(item.id, item.score, item.contributions)Pre-computed features — put gallery and query features in a JSON manifest (see examples/features.json and docs/INPUTS.md):
skillcir rank --input examples/features.json --top-k 3 --output output/ranking.jsonImages with OpenCLIP:
python examples/make_image_example.py --output output/image_example
skillcir images --input output/image_example/manifest.json \
--model-name ViT-B-32 --pretrained laion2b_s34b_b79k \
--device cpu --top-k 3 --output output/image_ranking.jsonThe skill plan for each query is given in the manifest; examples/planner_prompt.txt is a simple prompt for producing it with an MLLM. --evaluate reports Recall@k and mAP@k from the relevant_ids in the manifest.
PYTHONPATH=src python -m unittest discover -s tests -v@inproceedings{tang2026skillcir,
title = {{SkillCIR}: Intent-Guided Skill Composition for Training-Free Composed Image Retrieval},
author = {Tang, Yuanmin and Li, Lin and Du, Yang and Gao, Yuan and Mancini, Massimiliano and Song, Jun and Gou, Gaopeng and Xiong, Gang and Qiu, Meikang and {YuCheng} and Zheng, Bo},
booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
year = {2026}
}This project is released under the MIT License.
Image and text encoding uses OpenCLIP.