Skip to content

Official Implementation of Harnessing Perceptual Adversarial Patches for Crowd Counting (ACM CCS)

Notifications You must be signed in to change notification settings

shunchang-liu/PAP-Pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PAP-pytorch

This is the official pytorch version repo for [Harnessing Perceptual Adversarial Patches for Crowd Counting].

v4o4YV.png

ATTACK

Prerequisites

We strongly recommend Anaconda as the environment.

Python: 3.X PyTorch: 1.4.0+

Datasets

ShanghaiTech Dataset: Google Drive

Ground Truth

Please follow the CSRNet to generate the ground truth.

Models

In the paper, we totally use six crowd couting models with the repos as follows:

MCNN: https://github.com/CommissarMa/MCNN-pytorch

CSRNet: https://github.com/leeyeehoo/CSRNet-pytorch

CAN: https://github.com/weizheliu/Context-Aware-Crowd-Counting

BL: https://github.com/ZhihengCV/Bayesian-Crowd-Counting

DM-Count: https://github.com/cvlab-stonybrook/DM-Count

SASNet: https://github.com/TencentYoutuResearch/CrowdCounting-SASNet

Here we give the official pre-trained CSRNet. You can also use other crowd counting models.

ShanghaiA Google Drive

ShanghaiB Google Drive

Training Process

Try python patch_attack.py to start training process.

For attacking the CSRNet, you may modify the follow ones:

data_root = './data/attack_shanghai/' #the dataset root

model_path = './pre_trained/PartA_model.pth.tar' #the pre-trained model root

save_path = './results' # the results root, finally you can get the images with our adversarial patches

For attacking other models, you need to modify the patch_attack.py to fit your target model.

About

Official Implementation of Harnessing Perceptual Adversarial Patches for Crowd Counting (ACM CCS)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages