Skip to content

hujinCN/DynamicPAE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynamicPAE

Overview

This project contains the official implementation for the IEEE TPAMI 2025 Paper DynamicPAE: Generating Scene-Aware Physical Adversarial Examples in Real-Time.

Directory Structure

This repository follows the directory structure of https://github.com/hujinCN/aiworkflow.

model definition: models

simulation stages definition: stages.py

base trainer module & digital classification module: bask_atk_model.py

Quick Start Guide

Prerequisites

  1. install torch & torchvision. verified on torch 2.0.1 and 2.7.0.

Please refer to the official installation code on pytorch.org.

conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia
  1. install other packages. Note that ultralytics version needs to be recheck, since this package is under development
conda install pytorch-lightning==2.2.1 seaborn loguru tensorboard --yes
pip install ultralytics==8.3.29 easydict pycocotools timm einops pytorch-msssim lpips torchmetrics==1.2.0
pip install diffusers torchattacks kornia imgaug openai-clip opencv-python matplotlib
  1. prepare detlib

See README.md, section Pretrained models.

This submodule is from T-SEA project. See LICENSE.

  1. Download the datasets.

Put all datasets under a directory, and modify the path in path_cfg.yml.

For INRIA dataset, please convert to COCO format.

The prepared dataset directory structure shall be as follows:

coco
|-- train2017
|-- val2017
|-- annotations
INRIAPerson
|-- Train
|-- Test
|-- test_ann_xywh.json
|-- train_ann_xywh.json

Running the Experiment

  1. Model Training:

    cd sources_root/dynamic_example
    bash run.sh

    Approximate time: 1 day for single 4090 GPU. Result may be different due to randomness.

  2. Model Evaluation:

    cd sources_root/dynamic_example
    bash test.sh

Refer to the shell scripts for more details.

Interpreting Results

The results are stored in the logs directory. Please refer to https://github.com/hujinCN/aiworkflow for format details.

Citation

@ARTICLE{hu2025dynamicpae,
  author={Hu, Jin and Liu, Xianglong and Wang, Jiakai and Zhang, Junkai and Yang, Xianqi and Qin, Haotong and Ma, Yuqing and Xu, Ke},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  title={DynamicPAE: Generating Scene-Aware Physical Adversarial Examples in Real-Time}, 
  year={2026},
  volume={48},
  number={3},
  pages={2413-2430},
  doi={10.1109/TPAMI.2025.3626068}
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors