Giter VIP home page Giter VIP logo

adversarial-attack-on-person-reid-with-deep-mis-ranking's Introduction

PhD student at the University of Hong Kong

adversarial-attack-on-person-reid-with-deep-mis-ranking's People

Contributors

whj363636 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

adversarial-attack-on-person-reid-with-deep-mis-ranking's Issues

Feature Extraction

Hi!
Can you show me the cooresponding feature length extracted by all these Re-id models on these test datasets (Market1501, cuhk03, and duke).
Whether the extracted feature has the same length with that of the original paper.
Look forward your help!

The weight files

I have this problem when I try to load 'market1501.pth.tar': 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

G model

I downloaded some pre-trained models. I want to try the test by following your instructions, but G is absent.
Should I train the model to obtain G, or has it been uploaded to another link?

Some question about the mask

I directly run you code following the instructions, and get the mask result like this
image
It shows that the mask do not work , or are there some bugs in your code?

Would D leak knowledge to G

Dear Sir:
Thanks for your elegant work. But I still have some questions about the paper. In the flow of attack generation, I saw the mask is generated by D and then multiplied by noise from G. However, the GAN paradigm is in the outer supervision. Would this design leak discriminator knowledge to the generator? As you know, in the competition between G and D, once either G or D know its opponent's knowledge,only two results would happen 1 the knowledge is soon abandoned 2 the competition would collapse. I know KeepTopK to some extent is to avoid this catastrophe, but I think the visualization shows it doesn't make sense.

If I misunderstand it, please correct my understanding. Thanks.
image

运行时出错,我是直接下载的完整代码,但是在运行时出现如下错误:

Traceback (most recent call last):
File "train.py", line 494, in
main(opt)
File "train.py", line 140, in main
target_net = models.init_model(name=args.targetmodel, pre_dir=pre_dir, num_classes=dataset.num_train_pids)
File "/Eric/works/Adversarial-attack-on-Person-ReID-With-Deep-Mis-Ranking/models/init.py", line 41, in init_model
checkpoint = torch.load(pre_dir)
File "/opt/conda/lib/python3.6/site-packages/torch/serialization.py", line 358, in load
return _load(f, map_location, pickle_module)
File "/opt/conda/lib/python3.6/site-packages/torch/serialization.py", line 542, in _load
result = unpickler.load()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa8 in position 0: ordinal not in range(128)

Could ReID system be attacked by digital attack?

Thanks for your contribution. In my opinion, there's little chance that someone is available to make digital attacks on captured photos. This algorithm can be used to attack other image retrieval systems like google or baidu. So, I'm wondering if you have tried to attack some other image retrieval tasks such as oxford building searching or datasets like CUB2011 etc.

There are some bugs in your code.

When I run your code Pytorch 1.0, I find some bugs.
e.g.,
In line 23 in train.py: from ReID_attr import get_target_withattr
In line 66 in advloss.py: smooth[pids.data.cpu()] = 0
In line 1183 in data_manager.py: return __img_factory.keys() + __vid_factory.keys()
in line 386 in train.py: delta[i,ci,:,:].data *= np.minimum(1.0, mag_in_scaled_c / l_inf_channel).float().cuda()

And I make some revision to fix it.
In line 23 in train.py: # from ReID_attr import get_target_withattr
In line 66 in advloss.py: smooth[:, pids.data.cpu()] = 0
In line 1183 in data_manager.py: return list(__img_factory.keys()) + list(__vid_factory.keys())
in line 386 in train.py: delta[i,ci,:,:].data *= np.minimum(1.0, mag_in_scaled_c / l_inf_channel.cpu()).float().cuda()

We are doing defense based on your code, but we don't know exactly how to customize our model

我发现你们的工作迁移能力很强!很厉害的一项工作。我们正在基于你们的代码在做防御方面的工作,但是我们不是很清楚到底该如何定制自己的模型,不知道您的代码之后会不会支持CVPR2019的reid-strong baseline?他的github链接如下:
https://github.com/michuanhaohao/reid-strong-baseline.
还有能否发布你们的被攻击模型-PCB的训练代码?以便于我们能够改造,更方便地开展防御工作。

对抗样本的可视化问题

可以向您要一下Market和DUKE数据集的对抗样本吗?我在尝试获取DUKE数据集对抗样本时,程序上遇到了一堆版本问题解决不来。恳请你们能够分享一下所生成的对抗样本。

Black box attack

hello, I want to know that whether I need to take some measures on other datasets when I want to do the Cross-dataset attack like drop some classes . I notice that the number of class in the training dataset is different from others. This measure whether cause the drop of accuracy. Please help me!!

Error while running with CUHK03 dataset

Hi, the same error is happening with Python 2.78 (train or test) or Python 3.76 (train or test) after CUHK03 images are already generated (PyTorch 0.4.1 or PyTorch 1.4.0):

Args:Namespace(D='MSGAN', G_resume_dir='', ablation='', ak_type=-1, attr_dir='', attr_key='upwhite', attr_value=2, beta1=0.5, dataset='cuhk03', epoch=40, eval_freq=1, loss='xent_htri', lr=0.0002, mag_in=16.0, margin=0.3, mode='train', normalization='bn', num_ker=32, pre_dir='models', print_freq=20, root='data', save_dir='logs', seed=123, targetmodel='aligned', temperature=-1.0, test_batch=32, train_batch=32, use_SSIM=2, usegumbel=False, usevis=False, vis_dir='vis')

GPU mode Initializing dataset cuhk03 Note: if root path is changed, the previously generated json files need to be re-generated (delete them first) Split index = 0 => CUHK03 (detected) loaded Dataset statistics: subset | # ids | # images train | 767 | 7365 query | 700 | 1400 gallery | 700 | 5332 total | 1467 | 8765 Initializing model: aligned Model size: 14.86019M ==> Start training
Traceback (most recent call last): File "train.py", line 416, in <module> main(opt) File "train.py", line 160, in main train(epoch, G, D, target_net, criterionGAN, clf_criterion, metric_criterion, optimizer_G, optimizer_D, trainloader, use_gpu) File "train.py", line 194, in train for batch_idx, (imgs, pids, _, pids_raw) in enumerate(trainloader): File "/home/eduardoandrade/anaconda3/envs/adversarial_attack_on_person_reid_with_deep_mis_ranking_python_2_env/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 336, in __next__ return self._process_next_batch(batch) File "/home/eduardoandrade/anaconda3/envs/adversarial_attack_on_person_reid_with_deep_mis_ranking_python_2_env/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch raise batch.exc_type(batch.exc_msg) TypeError: Traceback (most recent call last): File "/home/eduardoandrade/anaconda3/envs/adversarial_attack_on_person_reid_with_deep_mis_ranking_python_2_env/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/eduardoandrade/anaconda3/envs/adversarial_attack_on_person_reid_with_deep_mis_ranking_python_2_env/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 187, in default_collate return [default_collate(samples) for samples in transposed] File "/home/eduardoandrade/anaconda3/envs/adversarial_attack_on_person_reid_with_deep_mis_ranking_python_2_env/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line 189, in default_collate raise TypeError((error_msg.format(type(batch[0])))) TypeError: batch must contain tensors, numbers, dicts or lists; found <type 'NoneType'>

Don't know why it is returning 'NoneType'.

论文中的mask问题

您的论文中提到的对于mask在正向传播与反向传播时的处理,我好像没有在代码中找到对应的部分。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.