Lihua-Jing / PAD

Code for the paper "PAD: Patch-Agnostic Defense against Adversarial Patch Attacks" (CVPR 2024)
18 stars 2 forks source link

No module named 'segment_anything'? #2

Open starktao opened 3 months ago

starktao commented 3 months ago

hello author,why does it give an error from segment_anything import SamPredictor, SamAutomaticMaskGenerator, sam_model_registry ModuleNotFoundError: No module named 'segment_anything'? There's nothing in segment_anything.

latentCall145 commented 1 month ago

Did you make sure to run pip install -r requirements.txt? The command should've installed segment_anything. And if you need a model path, download the model from https://huggingface.co/spaces/facebook/ov-seg/blob/main/sam_vit_l_0b3195.pth and place it in the segment_anything folder in the project directory (feel free to create the folder if it doesn't already exist)