
SAM 세그멘테이션과 CLIP 모델을 사용하여 AI 기반 사기 이미지 분류기를 회피하는 적대적 이미지 교란 도구로, 보안 연구용입니다.
python -m venv clipguard_env
source clipguard_env/bin/activate
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
CPU의 경우:
pip install torch torchvision
pip install -r requirements.txt
python CLIPGuard.py --input SCAM_Image_path --output ./goodclip_out --sam_ckpt sam_vit_h.pth path --clip_model ViT-B-16 --clip_pretrained openai --grid 8x8
--perturb mask
python CLIPGuard.py --input image.jpg --output results/ --classes "church,tench,garbage truck" --templates "a photo of a {}"
CLIPGuard/
│
├── CLIPGuard.py
├── requirements.txt
├── README.md
└── examples/
requirements.txt를 참조하세요.
주요 의존성:
선택 사항: