Use it (PEFT load)
from transformers import AutoModelForImageTextToText, AutoProcessor
from peft import PeftModel
base = AutoModelForImageTextToText.from_pretrained(
"cfcamo/cfcamo-sft-4b", torch_dtype="auto", device_map="auto",
).eval()
model = PeftModel.from_pretrained(base, "cfcamo/cfcamo-rl-lora").eval()
processor = AutoProcessor.from_pretrained("cfcamo/cfcamo-sft-4b")
Or merge into a single standalone HF model:
python scripts/eval/merge_lora.py \
--base checkpoints/cfcamo-sft-4b \
--lora checkpoints/cfcamo-rl-lora \
--out checkpoints/cfcamo-rl-lora-merged
Reproduce paper LoRA numbers
git clone https://github.com/suhang2000/CFCamo && cd CFCamo
pip install -e ".[eval]"
huggingface-cli download cfcamo/cfcamo-sft-4b --local-dir checkpoints/cfcamo-sft-4b
huggingface-cli download cfcamo/cfcamo-rl-lora --local-dir checkpoints/cfcamo-rl-lora
huggingface-cli download --repo-type dataset cfcamo/CF-COD --local-dir data/cfcod
# (place upstream COD into data/cfcod/<source>/{Imgs,GT}/ — see dataset card)
python scripts/eval/merge_lora.py \
--base checkpoints/cfcamo-sft-4b \
--lora checkpoints/cfcamo-rl-lora \
--out checkpoints/cfcamo-rl-lora-merged
python scripts/eval/eval_cfcod.py \
--cf-manifest data/cfcod/test/cf_manifest_test.jsonl \
--data-root data/cfcod \
--models "CFCamo-LoRA=checkpoints/cfcamo-rl-lora-merged" \
--out-dir results/cfcod_eval
Training summary
- Base: cfcamo/cfcamo-sft-4b (SFT cold-start on Qwen3-VL-4B-Instruct)
- RL: CSPO/CPR (eta=1.0), LoRA r=64, single large GPU
- Checkpoint at step 252 = ε=0.5 over the 4040-pair RL set
Citation
@article{li2026cfcamo,
title = {{CFCamo}: A Counterfactual Detect-or-Abstain Framework for Camouflaged Object Detection},
author = {Li, Suhang and Yoshie, Osamu and Ieiri, Yuya},
journal = {arXiv preprint arXiv:2606.11231},
year = {2026}
}