Skip to content

End-to-end attacks on DNN lane detection techniques using ART, MetaDrive and PytorchAutoDrive

License

Notifications You must be signed in to change notification settings

alexander-toch/lane-detection-e2e-attack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

End-to-end robustness testing of DNN lane detection models

This project is part of my master thesis (TODO: add title/link) and enables robustness testing of DNN-based lane detection models (semantic segmentation) of PytorchAutoDrive with attacks taken from the Adversarial Robustness Toolbox.

The robustness testing is performed in an end-to-end setting within the MetaDrive simulator.

animated gif of an example attack

Currently supported models: RESA (paper)

Currently supported attacks: modified Robust DPatch (paper)

Requirements

Conda: https://docs.conda.io/projects/miniconda/en/latest/

Installation

Tested on Ubuntu Bullseye (SLURM node) with a Nvidia Tesla T4 (headless rendering).

Setup conda environment with:

srun -N 1 -n 1 --gpus-per-node=1 --ntasks-per-node=1 --pty bash -i
conda create -n ld python=3.9 
conda activate ld
conda install cuda-toolkit==11.4 cudatoolkit=11.4 -c pytorch -c nvidia
pip install jsonargparse panda3d metadrive-simulator opencv-python numpy pillow torch ==2.0.1 torchvision adversarial-robustness-toolbox[pytorch_image] timm mmcv tensorboard importmagician
pip install numpy --upgrade
pip install -U openmim
mim install  mmcv
conda list -e > requirements.txt
python3 -m metadrive.examples.verify_headless_installation --cuda --camera rgb

On Windows 11:

Install CUDA: https://developer.nvidia.com/cuda-12-1-0-download-archive?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local

conda create -n ld python=3.11
conda activate ld
git clone [email protected]:alexander-toch/metadrive.git ../metadrive
cd ../metadrive
pip install -e .
cd ../lane-detection-e2e-attack
python -m pip install --upgrade pywin32
pip3 install jsonargparse torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install panda3d fcntl metadrive-simulator opencv-python numpy pillow torch torchvision adversarial-robustness-toolbox[pytorch_image] timm mmcv tensorboard importmagician cupy-cuda12x 
pip install cuda-python PyOpenGL PyOpenGL_accelerate

Execution

Currently, the attack is started via rm -rf camera_observations/*.{jpg,npy} && python metadrive_bridge_selfdrive.py

Resources / Links

About

End-to-end attacks on DNN lane detection techniques using ART, MetaDrive and PytorchAutoDrive

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published