--- license: apache-2.0 base_model: cfcamo/cfcamo-sft-4b pipeline_tag: image-text-to-text library_name: peft language: - en tags: - vision-language - camouflaged-object-detection - reinforcement-learning - lora - peft - qwen3-vl --- # CFCamo-4B (RL-LoRA adapter) LoRA adapter for **CFCamo**: trained on top of [cfcamo/cfcamo-sft-4b](https://huggingface.co/cfcamo/cfcamo-sft-4b) with **Counterfactual Sequence Policy Optimization (CSPO)** and a **Counterfactual Paired Reward (CPR)**. This is the paper LoRA checkpoint at step 252 (ε=0.5) over the 4040-pair RL set — the single-large-GPU alternative to [cfcamo/cfcamo-rl-full](https://huggingface.co/cfcamo/cfcamo-rl-full). - 📄 Paper: - Code & training recipe: - Benchmark (CF-COD) + training data: ## Use it (PEFT load) ```python 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") # (use the same detect-or-abstain prompt as cfcamo-rl-full — see that model card) ``` Or merge into a single standalone HF model: ```bash 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 ```bash 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//{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 ```bibtex @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} } ```