alibaba / easyrobust Goto Github PK
View Code? Open in Web Editor NEWEasyRobust: an Easy-to-use library for state-of-the-art Robust Computer Vision Research with PyTorch.
License: Apache License 2.0
EasyRobust: an Easy-to-use library for state-of-the-art Robust Computer Vision Research with PyTorch.
License: Apache License 2.0
{"date": "24/11/2022",
"extra_data": "yes imagenet_v2",
"model": "Adversarial Training",
"institution": "MIT",
"paper_link": "https://arxiv.org/abs/2201.03545",
"code_link": "",
"architecture": "convnext_L",
"training framework": "easyrobust (v1)",
"ImageNet-val": TODO,
"autoattack": TODO,
"files": "download",
"advrob_imgcls_leaderboard": true,
"oodrob_imgcls_leaderboard": false,
"advrob_objdet_leaderboard": false,
"oodrob_objdet_leaderboard": false}
To execute main.py for any algorithms in the example/imageclassification/imagenet/ directory, it seems that the ImageNet dataset is required. However, the accompanying bash file does not include instructions for downloading the ImageNet datasets or their variants. Could you please provide guidance on obtaining these datasets?
I want to implement the DRA to a new model, but I cannot find the codes that finetune the origin model .
Can you provide the training code for DRA please?
It seems that the method doesn't use the information of BN layer in the code of BATS. Maybe I miss something. In addition, I'm curious about the selection of hyperparameter, such as lam = 1.05 for ImageNet.
Hi, thank you for your work of 'Discrete Adversarial Training'
I was trying to use the pre-tained model for inference. The [ViT-B/16] works pretty well. However, the [MAE-ViT-H] doesn't work.
Could you tell the difference between this two model when testing them on the custom images?
For the [MAE-ViT-H], I used vit_huge_patch14_224 instead of mae_vit_huge_patch14 to initialize the model in timm. (the later can not be found in timm model zoo.)
I normalize the input image with T.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))
Thank you !
您好,我最近因为批量的训练一批robust model,选择你们的仓库作为训练框架,在imagenet-net训练了 convnext_small(40.78@AA), convnext_large(在训练中) , swin_large(在训练中) ,mvitv2_base(在训练中) 。但很耗时.... 所以,环保起见,我觉得可能我把它po出来让别人再利用可能更好点,如果您觉得这个合适的话,请联系我 [email protected]
Hi, @vtddggg
Thank you for providing such a nice project.
I do not know how to generate two *.pt files (vit_features_mean.pt & vit_features_std.pt ). Could you provide the code for this?
Best.
Hi, what are SIN and DebiasedCNN? Is there a link to the paper? Does the project implement these two methods? Looking forward to your reply, thanks.
Never mind, mistake on my end
Hey there,
I try to re-produce some of the results in the COCO-O paper in order to use the dataset myself. Are the reported COCO mAP scores for val2017 or test-dev2017? I see that you have used mmdet and since I get slightly different results with pre-trained models from torchvision, I was wondering if this is due to different id-test set or due to small differences in the trained models.
Example: For Faster R-CNN ResNet-50 FPN I get:
coco mAP | sketch | weather | cartoon | painting | tattoo | handmake | avg. | ER | |
---|---|---|---|---|---|---|---|---|---|
paper | 37.4 | 9.8 | 25.1 | 13.9 | 23.3 | 10.1 | 16.3 | 16.4 | -0.41 |
torchvision | 37.0 (val2017) | 8.4 | 27.3 | 13.4 | 22.2 | 11.5 | 15.9 | 16.44 | -0.21 |
Thanks and keep up the great work!
Johannes
Could you please provide the features_mean
and features_std
for ResNet50 and MobileNet on ImageNet? I fail to reproduce the reported ood results in your paper.
I follow the code piece in #9 to generate features_mean
and features_std
on the features right before the linear layer and set lamb=1.25
for ResNet50 following the Appendix E.2.2 in the paper, but only to attain terrible performance. Did I still miss something?
Looking forward to your reply
The shape of natural_gs_np is [c, w, h], because it's a pytorch input. However, you didn't transpose it to [w, h, c] before calling get_average_saliency_map(), which assumes input tensor should have shape [w, h, c]. This may result in higher regional gini value.
After changing it, calculated regional gini value should be lower than global ones, because the sum operator will makes the pixels within the region equal, which looks like bluring a image with a average filter(multiply whole image with a scalar won't change it's gini value).
I tried to reproduce the results of DAT with the code present in the Readme.md. However, when I try to load checkpoints, I always get this error:
PytorchStreamReader failed reading zip archive: failed finding central directory
I tried different torch versions to understand if it is related to torch versions, however, the problem still persists.
Can you share more detail about your environment?
In the paper Towards Understanding and Boosting Adversarial Transferability from a Distribution Perspective,fine-tuning the model for the DCG loss in order to simulate data distribution. But I cannot find the codes of the fine-tuning, please could you release it or tell me where it is?
Recently, I have tried to reproduce the results presented in the paper "Model Inversion Attack via Dynamic Memory Learning" with the official code in the path "easyrobust/examples/attacks/dmmia_inversion". However, I found that much of the code is conflicted with the paper's description and instead kept the baseline settings of "Plug & Play Attacks: Towards Robust and Flexible Model Inversion Attacks".
I wonder if there is an up-to-date version of the code for DMMIA, whicn may not be uploaded to the repository? I would appreciate it if you could help us with it.
In the papaer,
DAT regards the two sub-tasks as a whole, and attacks the overall detection loss to produce adversarial images.
Does it mean that the total loss is directly used to calculate the gradient?
In addition, in the adversarial training of the object detection task, are the relevant parameters of the adversarial training the same as those of the classification task?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.