{"id":18917544,"url":"https://github.com/exely/uap-pytorch","last_synced_at":"2026-03-11T22:30:16.428Z","repository":{"id":51539165,"uuid":"205862454","full_name":"Exely/UAP-pytorch","owner":"Exely","description":"A Simple Pytorch Implementation of Universal Adversarial Perturbation to fool neural networks.","archived":false,"fork":false,"pushed_at":"2021-05-13T06:28:53.000Z","size":23,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T15:33:13.291Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Exely.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-02T13:24:11.000Z","updated_at":"2024-08-28T11:03:23.000Z","dependencies_parsed_at":"2022-08-03T02:45:29.967Z","dependency_job_id":null,"html_url":"https://github.com/Exely/UAP-pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exely%2FUAP-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exely%2FUAP-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exely%2FUAP-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Exely%2FUAP-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Exely","download_url":"https://codeload.github.com/Exely/UAP-pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239914929,"owners_count":19717759,"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-08T10:26:45.327Z","updated_at":"2026-03-11T22:30:16.362Z","avatar_url":"https://github.com/Exely.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UAP-pytorch\nA simple and UNOFFICIAL Pytorch implementation of Universal Adversarial Perturbation proposed in [[1]](https://arxiv.org/pdf/1610.08401.pdf).      \nThe code is adapted from [LTS4](https://github.com/LTS4/universal) and [ferjad](https://github.com/ferjad/Universal_Adversarial_Perturbation_pytorch). Test passed on python2.7 and Pytorch0.4 .\n## Usage\n### Dataset preparation.\n- __Training set__: Random 10,000 images in 1000 classes from [ILSVRC 2012](http://www.image-net.org/challenges/LSVRC/2012/) training set.    \n- __Validation set__: ILSVRC 2012 validation set (50,000 images).    \n\nPlease modify the dataset path in [train_test_vgg16.py](train_test_vgg16.py) .\n### Traing and evalutaion.\n```sh\npython train_test_vgg16.py\n```\nThis generates the universal perturbation on a pretrained VGG16 model and evaluates misclassifcation rate on multiple different models. \n### Visualization of generated noise.\n```sh\npython show_v.py\n```\n## Reference\n[1] S. Moosavi-Dezfooli\\*, A. Fawzi\\*, O. Fawzi, P. Frossard:\n[*Universal adversarial perturbations*](http://arxiv.org/pdf/1610.08401), CVPR 2017\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexely%2Fuap-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexely%2Fuap-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexely%2Fuap-pytorch/lists"}