Skip to content

Repository files navigation

This is the official repository of "Generalizable Targeted Data Poisoning against Varying Physical Objects".

Our implementation is based on Industrial Scale Data Poisoning via Gradient Matching.

Environment

conda create --name gtdp python=3.11 -y
conda activate gtdp

pip install numpy==1.26.4
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=11.8 -c pytorch -c nvidia
# or 
# conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia
pip install transformers==4.39.3 scikit-learn==1.5.0
pip install lmdb

unzip handmade.zip

The gims08.zip is Multi-View Car dataset in CIFAR-10 size.

handmade.zip contain our handmade dataset.

Evaluation

We present some of experiments samples in the examples folder. For example, to run the evaluation of $\mathrm{Our}_\mathrm{add}$ on table 1:

CUDA_VISIBLE_DEVICES=0 bash examples/table1_ouradd.sh

For the experiment of the full ImageNet, please run imagenet2lmdb.py to preprocess the dataset first, then run the script with --dataset ImageNetLmdb argument.

For the ImageNet scale experiments, please refer to the script examples/handmade.sh.

About

The official repository of "Generalizable Targeted Data Poisoning against Varying Physical Objects"

Resources

Stars

3 stars

Watchers

1 watching

Forks

Contributors

Languages