{"id":19984525,"url":"https://github.com/intellabs/mart","last_synced_at":"2025-05-04T06:33:12.752Z","repository":{"id":64881522,"uuid":"547986133","full_name":"IntelLabs/MART","owner":"IntelLabs","description":"Modular Adversarial Robustness Toolkit","archived":false,"fork":false,"pushed_at":"2024-05-22T17:02:00.000Z","size":4994,"stargazers_count":16,"open_issues_count":53,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-22T17:32:58.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IntelLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-08T17:50:39.000Z","updated_at":"2024-05-28T20:23:54.789Z","dependencies_parsed_at":"2024-05-28T20:23:43.323Z","dependency_job_id":"ee45f2f1-364d-4c6f-996d-47d8b45341e5","html_url":"https://github.com/IntelLabs/MART","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":"ashleve/lightning-hydra-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2FMART","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2FMART/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2FMART/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2FMART/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IntelLabs","download_url":"https://codeload.github.com/IntelLabs/MART/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224386274,"owners_count":17302630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T04:19:25.180Z","updated_at":"2025-05-04T06:33:12.744Z","avatar_url":"https://github.com/IntelLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Modular Adversarial Robustness Toolkit\n\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n\u003cimg src=\"data/loop.png\" width=\"600\"\u003e\n\n\u003cb\u003eA unified optimization-based framework\u003c/b\u003e\n\n\u003c/div\u003e\n\n## Description\n\n**Modular Adversarial Robustness Toolkit** makes it easy to compose novel attacks to evaluate adversarial robustness of deep learning models. Thanks to the modular design of the optimization-based attack framework, you can use off-the-shelf elements, such as optimizers and learning rate schedulers, from PyTorch to compose powerful attacks. The unified framework also supports advanced features, such as early stopping, to improve attack efficiency.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"data/arch.png\" width=\"600\"\u003e\n\n\u003cb\u003eModular Design\u003c/b\u003e\n\n\u003c/div\u003e\n\n## Installation\n\n### Using pip\n\n```bash\npip install mart[full]@https://github.com/IntelLabs/MART/archive/refs/tags/\u003cVERSION\u003e.zip\n```\n\nReplace `\u003cVERSION\u003e` with the MART's version you want to install. For example:\n\n```bash\npip install mart[full]@https://github.com/IntelLabs/MART/archive/refs/tags/v0.2.1.zip\n```\n\n### Manual installation\n\n```bash\n# clone project\ngit clone https://github.com/IntelLabs/MART\ncd MART\n\n# [OPTIONAL] create conda environment\n# Recommend Python 3.9\nconda create -n myenv python=3.9\nconda activate myenv\n\n# [OPTIONAL] or create virtualenv environment\npython3 -m venv .venv\nsource .venv/bin/activate\n\n# Install Modular Adversarial Robustness Toolkit, if you plan to create your own `configs` folder elsewhere.\npip install -e .[full]\n\n# [OPTIONAL] install pre-commit hooks\n# this will trigger the pre-commit checks in each `git commit` command.\npre-commit install\n\n# If your CUDA version is not 10.2, you need to uninstall pytorch and torchvision, and\n# then reinstall them according to platform instructions at https://pytorch.org/get-started/\n# FYI, this is what we do:\n#   $ pip uninstall torch torchvision\n#   $ pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116\n\n```\n\n## How to run\n\nThe toolkit comes with built-in experiment configurations in [mart/configs](mart/configs).\n\nFor example, you can run a fast adversarial training experiment on CIFAR-10 with `python -m mart experiment=CIFAR10_CNN_Adv`.\nRunning on GPU will make it even faster `CUDA_VISIBLE_DEVICES=0 python -m mart experiment=CIFAR10_CNN_Adv trainer=gpu trainer.precision=16`.\n\nYou can see other examples in [examples](/examples).\n\n## Acknowledgements\n\nThis material is based upon work supported by the Defense Advanced Research Projects Agency (DARPA) under Contract No. HR001119S0026.\n\n## Disclaimer\n\nThis “research quality code” is provided by Intel “As Is” without any express or implied warranty of any kind. Intel does not warrant or assume responsibility for the accuracy or completeness of any information, text, graphics, links or other items within the code. A thorough security review has not been performed on this code. Additionally, this repository will not be actively maintained and as such may contain components that are out of date, or contain known security vulnerabilities. Proceed with caution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintellabs%2Fmart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintellabs%2Fmart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintellabs%2Fmart/lists"}