Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Fixes https://github.com/facebookresearch/adversarial_image_defenses/issues/8 #9

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.DS_Store
13 changes: 8 additions & 5 deletions setup.py
Expand Up @@ -35,19 +35,22 @@
# Download inception_v4 and inceptionresnetv2
MODEL_DIR = str("adversarial/lib/models")
INCEPTION_V4_URL = ("https://raw.githubusercontent.com/Cadene/"
"tensorflow-model-zoo.torch/master/inceptionv4/"
"pytorch_load.py")
"tensorflow-model-zoo.torch/"
"f43005c4b4cdd745e9788b22e182c91453c54daf/inceptionv4"
"/pytorch_load.py")
INCEPTION_RESNET_V2_URL = ("https://raw.githubusercontent.com/Cadene/"
"tensorflow-model-zoo.torch/master/"
"inceptionresnetv2/pytorch_load.py")
"tensorflow-model-zoo.torch/"
"f43005c4b4cdd745e9788b22e182c91453c54daf/"
"inceptionresnetv2/pytorch_load.py")
urlopener = urllib.URLopener()
urlopener.retrieve(INCEPTION_V4_URL, os.path.join(MODEL_DIR, "inceptionv4.py"))
urlopener.retrieve(INCEPTION_RESNET_V2_URL,
os.path.join(MODEL_DIR, "inceptionresnetv2.py"))

# Download denoising code for tv_bregman from scikit-image
DENOISE_URL = ("https://raw.githubusercontent.com/scikit-image/scikit-image/"
"master/skimage/restoration/_denoise_cy.pyx")
"902a9a68add274c4125a358b29e3263b9d94f686/skimage/"
"restoration/_denoise_cy.pyx")
urlopener = urllib.URLopener()
urlopener.retrieve(DENOISE_URL, os.path.join(TRANSFORMATION_DIR, "_denoise_cy.pyx"))
# Apply patch to support TVM compressed sensing
Expand Down