Coder Social home page Coder Social logo

diff-pgd's Introduction

I am a 2nd-year Machine Learning Ph.D. student at Georgia Tech.

  • 📙 Python/C++
  • ⚓ Ph.D. student in ML
  • ⚽ soccer Lover
  • 🎮 LOL

diff-pgd's People

Contributors

xavihart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

diff-pgd's Issues

env.yml seems to be incorrect

There is an error when running attack_global.py:

Traceback (most recent call last):
File "code/attack_global.py", line 1, in
from load_dm import get_imagenet_dm_conf
File "/home/XXX/Diff-PGD/code/load_dm.py", line 23, in
from utils import *
File "/home/XXX/Diff-PGD/code/utils.py", line 4, in
from colorama import Fore, Back, Style
ModuleNotFoundError: No module named 'colorama'

I tried to install colorama using conda, however, another error occurred:

Traceback (most recent call last):
File "code/attack_global.py", line 8, in
from archs import get_archs, IMAGENET_MODEL
File "/home/XXX/Diff-PGD/code/archs.py", line 11, in
from robustbench.utils import load_model
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/init.py", line 1, in
from .data import load_cifar10
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/data.py", line 15, in
from robustbench.model_zoo import model_dicts as all_models
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/init.py", line 1, in
from .models import model_dicts
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/models.py", line 4, in
from robustbench.model_zoo.cifar10 import cifar_10_models
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/cifar10.py", line 24, in
from robustbench.model_zoo.architectures.robustarch_wide_resnet import get_model as get_robustarch_model
File "/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/robustbench/model_zoo/architectures/robustarch_wide_resnet.py", line 18, in
from torchvision.ops.misc import Conv2dNormActivation, SqueezeExcitation
ImportError: cannot import name 'Conv2dNormActivation' from 'torchvision.ops.misc' (/home/XXX/anaconda3/envs/diff-pgd/lib/python3.8/site-packages/torchvision/ops/misc.py)

How to generate an accurate mask corresponding to the image

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. 👍

Could you provide the checkpoint to generate face images?

Thank you for open-sourcing your wonderful work. We would like to generate face adversarial examples using Diff-PGD. However, we can only find the checkpoint to generate ImageNet-like images. Could you provide the checkpoint to generate face images, or tell us how to train the model on the face dataset?

Some question

Very glad you shared your code! I'm sorry to bother you, but is the code incomplete, after I installed the corresponding environment as well as the data path, there is still a part of the unknown error, such as in the denoise.py file from improved_diffusion.script_util import ... this improved_diffusion part and also the create_argparser() in the same file, and InputCenterLayer() in the dataset.py doesn't seem to appear in the whole code. I run the code on my win10 system. I'm still a novice when it comes to coding, so if you know how to fix my problem I'd appreciate it! :)

Inquiry About the Input Normalization Operation for Diff-PGD in Custom Models

Thank you for the great work you've done.

While assessing the effectiveness of Diff-PGD adversarial samples, I noticed that the ‘NormalizeLayer’ class in ‘dataset.py’ introduces an input normalization layer for all classifiers. The accompanying description states: "In order to certify radii in original coordinates rather than standardized coordinates, we add the Gaussian noise before standardizing, which is why we have standardization be the first layer of the classifier rather than as a part of preprocessing as is typical."

Currently, I am preparing to use Diff-PGD to test the robustness of a model that I have trained on ImageNet. However, I did not employ input normalization during the training of my model. I'm concerned that introducing it only during testing could introduce bias and might not fairly reflect the model's robustness.

Would omitting input normalization in the Diff-PGD data preparation adversely affect the results? Is it necessary to retrain my classifier with the input normalization step included for a fair and accurate evaluation?

Thank you for any guidance you can provide.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.