
एडवर्सेरियल इमेज परटर्बेशन टूल जो सुरक्षा अनुसंधान के लिए AI-आधारित स्कैम इमेज क्लासिफायर से बचने हेतु SAM सेगमेंटेशन और CLIP मॉडल का उपयोग करता है।
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.
मुख्य डिपेंडेंसीज़:
वैकल्पिक: