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 を参照してください。
主な依存関係:
オプション: