DarkSAM, integrated into XTransferBench

Code: https://github.com/cgcl-codes/darksam

Code: https://github.com/HanxunH/XTransferBench


X-TransferBench

X-TransferBench is an open-source benchmark that provides a comprehensive collection of UAPs/TUAPs capable of achieving universal adversarial transferability. These UAPs can simultaneously transfer across data, domains, models, and tasks. Essentially, they represent perturbations that can transform any sample into an adversarial example, effective against any model and for any task.

Model Details

  • Surrogate Model: sam-vit-b
  • Surrogate Dataset: ADE
  • Threat Model: L_inf_eps=10/255
  • Perturbation Size: 3 x 1024 x 1024
  • Prompt Type:Box
  • Num of training samples:100
  • Epoch:10

Model Usage

from XTransferBench import attacker

attacker = XTransferBench.zoo.load_attacker("linf_non_targeted", "darksam_box_ade_sam_vit_b_eps10")
images = # torch.Tensor [b, 3, h, w], values should be between 0 and 1
adv_images = attacker(images) # adversarial examples

Citation

If you use this model in your work, please cite the accompanying paper:

@article{zhou2024darksam,
  title={Darksam: Fooling segment anything model to segment nothing},
  author={Zhou, Ziqi and Song, Yufei and Li, Minghui and Hu, Shengshan and Wang, Xianlong and Zhang, Leo Yu and Yao, Dezhong and Jin, Hai},
  journal={NeurIPS},
  year={2024}
}
@inproceedings{
huang2025xtransfer,
title={X-Transfer Attacks: Towards Super Transferable Adversarial Attacks on CLIP},
author={Hanxun Huang and Sarah Erfani and Yige Li and Xingjun Ma and James Bailey},
booktitle={ICML},
year={2025},
}

Security and Ethical Use Statement

The perturbations provided in this project are intended solely for research purposes. They are shared with the academic and research community to advance understanding of super transferable attacks and defenses.

Any other use of the data, model weights, or methods derived from this project, including but not limited to unauthorized access, modification, or malicious deployment, is strictly prohibited and not endorsed by this project. The authors and contributors of this project are not responsible for any misuse or unethical applications of the provided resources. Users are expected to adhere to ethical standards and ensure that their use of this research aligns with applicable laws and guidelines.

Downloads last month
13
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support