Skip to content

Commit

Permalink
Merge pull request #72 from MadryLab/breeds
Browse files Browse the repository at this point in the history
Breeds
  • Loading branch information
ShibaniSanturkar authored Aug 12, 2020
2 parents 54f3375 + aed2b5c commit 18bf5f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@ Contributors
.. [STE+19] Santurkar S., Tsipras D., Tran B., Ilyas A., Engstrom L., Madry A. (2019). Image Synthesis with a Single (Robust) Classifier. arXiv, arXiv:1906.09453
.. [STM20] Santurkar S., Tsipras D., Madry A. (2020). : BREEDS: Benchmarks for Subpopulation Shift.
.. [STM20] Santurkar S., Tsipras D., Madry A. (2020). : BREEDS: Benchmarks for Subpopulation Shift. arXiv, arXiv:2008.04859
4 changes: 2 additions & 2 deletions robustness/tools/breeds_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
REQUIRED_FILES = ['dataset_class_info.json',
'class_hierarchy.txt',
'node_names.txt']
BREEDS_URL = "https://github.com/MadryLab/BREEDS-Benchmarks/tree/master/imagenet_class_hierarchy/modified"
BREEDS_URL = "https://github.com/MadryLab/BREEDS-Benchmarks/blob/master/imagenet_class_hierarchy/modified/"

def setup_breeds(info_dir, url=BREEDS_URL):
print(f"Downloading files from {url} to {info_dir}")
if not os.path.exists(info_dir):
os.makedirs(info_dir)
for f in REQUIRED_FILES:
urllib.request.urlretrieve(f"{url}/{f}",
urllib.request.urlretrieve(f"{url}/{f}?raw=true",
os.path.join(info_dir, f))

class ClassHierarchy():
Expand Down

0 comments on commit 18bf5f0

Please sign in to comment.