Skip to content

This is the official implementation of 3D-TC2(Temporal Consistency Checks to Detect LiDAR Spoofing Attacks on Autonomous Vehicle Perception)

License

Notifications You must be signed in to change notification settings

YouChange/3D-TC2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D-TC2

This is the official implementation of 3D-TC2(Temporal Consistency Checks to Detect LiDAR Spoofing Attacks on Autonomous Vehicle Perception).

image

Targeting object spoofing attacks, 3D-TC2 can provide more than 98% attack detection rate with a recall of 91% for detecting spoofed Vehicle (Car) objects, and is able to achieve real-time detection at 41Hz.

[Paper Link] [Presentation Link]

Requirements

  • CUDA >= 9.0
  • Python 3
  • PyTorch >= 1.1
  • pyquaternion, Matplotlib, PIL, numpy, cv2, tqdm, scipy, scikit-image, scikit-learn, ipython and other relevant packages

Usage

1. Add path to the root folder. For example:

export PYTHONPATH=/your/home/dir/3D-TC2:$PYTHONPATH
export PYTHONPATH=/your/home/dir/3D-TC2/nuscenes-devkit/python-sdk:$PYTHONPATH

2. Dataset

Download Nuscenes dataset to folder: ./data/nuscenes/. For example, to download Nuscenes mini split:

wget https://www.nuscenes.org/data/v1.0-mini.tgz

3. Attack the dataset

  • Attack LiDAR scenes in ./data/nuscenes/mini/sweeps/ and customize your own poisoned LiDAR dataset via any data injection attack methods.

  • In our paper, we performed single-frame injection attack and assumed historical scenes are not poisoned. To do that, you can randomly pick some scenes from our Temporally Attacked Dataset.

  • Then replace corresponding benign LiDAR scenes in ./data/nuscenes/mini/sweeps/ .

  • Note: If you want to replicate our results, please make sure only the scene at the current timestamp is poisoned and relatively historical scenes(past 20 scenes) are benign.

4. Object detection

  • Please feed your poisoned dataset to any kind of 3D object detector and get predictions.

  • Our detection results after running OpenPCDet can be found in ./detection folder.

5. Motion prediction

  • Download MotionNet pretrained model here.

  • Our preliminary implementation of a 3D-TC2 prototype uses pretrained MotionNet to detect anomalies:

python TC2.py --data ./data/nuscenes/mini/ --version v1.0-mini --modelpath model.pth --net MotionNet --savepath log
  • For further details of MotionNet, please refer to the official website here.

6. Further exploration

There are some potential directions you might want to further explore:

  • Temporal attacks. If you want to perform stress tests on the motion predictor, you can also poison historical scenes to perform consecutive/temporal attacks. To do that, you can select more scenes from our Temporally Attacked Dataset to ensure historical scenes are poisoned to influence motion predictions for the current scene.

  • Other motion predictors. Other motion predictors such as FlowNet3D, PointFlowNet and HPLFlowNet are also good replacements for MotionNet.

Reference

If you find this project useful in your research, please cite:

@inproceedings{you2021temporal,
  title={Temporal Consistency Checks to Detect LiDAR Spoofing Attacks on Autonomous Vehicle Perception},
  author={You, Chengzeng and Hau, Zhongyuan and Demetriou, Soteris},
  booktitle={Proceedings of the 1st Workshop on Security and Privacy for Mobile AI},
  pages={13--18},
  year={2021}
}

About

This is the official implementation of 3D-TC2(Temporal Consistency Checks to Detect LiDAR Spoofing Attacks on Autonomous Vehicle Perception)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages