xavihart / Diff-PGD

[NeurIPS'2023] Official Code Repo:Diffusion-Based Adversarial Sample Generation for Improved Stealthiness and Controllability
87 stars 7 forks source link

How to generate an accurate mask corresponding to the image #7

Closed Raineasy closed 10 months ago

Raineasy commented 10 months ago

Nice and interesting code! But how you generate an accurate mask corresponding to the image. Did you use code processing or some other tool like Photoshop? I don't see the part that generates the mask in your code, they seem to be part of the preprocessed ImageNet dataset. Sorry to bother you again. 👍

xichenpan commented 10 months ago

You can use grouned-SAM to generate good masks (https://github.com/IDEA-Research/Grounded-Segment-Anything).