{"id":24396821,"url":"https://github.com/ai4ce/flat","last_synced_at":"2026-03-05T16:03:35.381Z","repository":{"id":42699250,"uuid":"301607009","full_name":"ai4ce/FLAT","owner":"ai4ce","description":"[ICCV2021 Oral] Fooling LiDAR by Attacking GPS Trajectory","archived":false,"fork":false,"pushed_at":"2022-07-05T23:48:03.000Z","size":51315,"stargazers_count":71,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-15T01:15:46.810Z","etag":null,"topics":["3d-object-detection","3d-perception","adversarial-attacks","ai-safety","autonomous-driving","deep-learning","gnss","lidar","point-cloud","robotics","trustworthy-ai","trustworthy-machine-learning"],"latest_commit_sha":null,"homepage":"https://ai4ce.github.io/FLAT/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ai4ce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-06T03:47:49.000Z","updated_at":"2025-12-09T08:31:13.000Z","dependencies_parsed_at":"2022-09-06T06:11:57.972Z","dependency_job_id":null,"html_url":"https://github.com/ai4ce/FLAT","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ai4ce/FLAT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FFLAT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FFLAT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FFLAT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FFLAT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ai4ce","download_url":"https://codeload.github.com/ai4ce/FLAT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FFLAT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30134577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T15:35:27.018Z","status":"ssl_error","status_checked_at":"2026-03-05T15:35:23.768Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-object-detection","3d-perception","adversarial-attacks","ai-safety","autonomous-driving","deep-learning","gnss","lidar","point-cloud","robotics","trustworthy-ai","trustworthy-machine-learning"],"created_at":"2025-01-19T21:58:35.880Z","updated_at":"2026-03-05T16:03:35.357Z","avatar_url":"https://github.com/ai4ce.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FLAT: Fooling LiDAR Perception via Adversarial Trajectory Perturbation [ICCV2021 Oral]\n\n[Yiming Li*](https://scholar.google.com/citations?user=i_aajNoAAAAJ), [Congcong Wen*](https://scholar.google.com/citations?user=OTBgvCYAAAAJ), [Felix Juefei-Xu](https://scholar.google.com/citations?user=dgN8vtwAAAAJ), [Chen Feng](https://scholar.google.com/citations?user=YeG8ZM0AAAAJ)\n\n**\"Small perturbations to vehicle trajectory can blind LiDAR perception.\"**\n\n\u003cp align=\"center\"\u003e\u003cimg src='docs/pics/FLAT.png' align=\"center\" height=\"500px\"\u003e \u003c/p\u003e\n\nPoster Page: https://ai4ce.github.io/FLAT/\n\n[**ArXiv: Fooling LiDAR Perception via Adversarial Trajectory Perturbation**](https://arxiv.org/abs/2103.15326)        \n\n\n\n## News\n\n[2021-07]  🔥 FLAT is accepted at ICCV 2021 as oral presentation **(210/6236, 3% acceptance rate)**\n\n## Abstract\nLiDAR point clouds collected from a moving vehicle are functions of its trajectories, because the sensor motion needs to be compensated to avoid distortions. When autonomous vehicles are sending LiDAR point clouds to deep networks for perception and planning, could the motion compensation consequently become a wide-open backdoor in those networks, due to both the adversarial vulnerability of deep learning and GPS-based vehicle trajectory estimation that is susceptible to wireless spoofing? We demonstrate such possibilities for the first time: instead of directly attacking point cloud coordinates which requires tampering with the raw LiDAR readings, only adversarial spoofing of a self-driving car's trajectory with small perturbations is enough to make safety-critical objects undetectable or detected with incorrect positions. Moreover, polynomial trajectory perturbation is developed to achieve a temporally-smooth and highly-imperceptible attack. Extensive experiments on 3D object detection have shown that such attacks not only lower the performance of the state-of-the-art detectors effectively, but also transfer to other detectors, raising a red flag for the community. \n\n## Installation\nFor white-box attacks, we use point-based [PointRCNN](https://github.com/sshaoshuai/PointRCNN) as the target detector.  \n```point_rcnn.py``` ```rcnn_net.py``` ```rpn.py``` in ```PointRCNN/lib/net``` were modified for introducing attacks.   \n```kitti_dataset.py``` ```kitti_rcnn_dataset.py```  in ```PointRCNN/lib/datasets``` were modified for loading our customized nusc_kitti dataset.   \n  \nThe rest code of PointRCNN is left untouched.\n### Requirements\n* Linux (tested on Ubuntu 18.04)\n* Python 3.6\n* PyTorch 1.2.0\n* CUDA 10.0\n\n\n\n### Create Anaconda Environment\n```bash\nconda create -n flat python=3.6\nconda activate flat\n```\n\n### CUDA\n```bash\nexport PATH=/usr/local/cuda-10.0/bin:$PATH\nexport CUDA_PATH=/usr/local/cuda-10.0\nexport CUDA_HOME=/usr/local/cuda-10.0\nexport LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH\n```\n### Install dependencies\n```bash\ngit clone https://github.com/ai4ce/FLAT.git\ncd FLAT\npip install -r requirements.txt\npip install torch==1.2.0 torchvision==0.4.0\ncd PointRCNN\nsh build_and_install.sh\ncd ..\n```\n\n## Dataset Preparation\nPlease download the official [nuscenes dataset](https://www.nuscenes.org/nuscenes)(v1.0-trainval)\n\nUse ```nusc_to_kitti.py``` to generate the dataset.\n\n```bash\npython nusc_to_kitti.py nuscenes_gt_to_kitti [--dataroot \"Your nuscenes dataroot\"]\n```\n\nIt will generate the dataset in the structure as follows.\n```\nFLAT\n├── dataset\n│   ├── nusc_kitti\n│   │   ├──val_1000\n│   │   │   ├──image_2\n│   │   │   ├──ImageSets\n│   │   │   ├──label_2\n│   │   │   ├──pose\n│   │   │   ├──velodyne\n```\n\n**NOTICE**: This script converts the first 1000(of 6019 in total) samples from orginal validation split of v1.0-trainval at default. You can use all of the nuscenes samples, and shuffle option is also provided.\n\n## Run FLAT on Evaluation\n```bash\npython flat.py [--stage STAGE] [--nb_iter NB_ITER]\n               [--task TASK] [--attack_type ATTACK_TYPE] \n               [--iter_eps ITER_EPS] [--iter_eps2 ITER_EPS2] [--poly]\n```\n\n```\n--split SPLIT       \n                    The data split for evaluation\n--stage STAGE       \n                    Attack stage of Point RCNN. Options: \"1\" for RPN\n                    stage, \"2\" for RCNN stage\n--nb_iter NB_ITER   \n                    Number of attack iterations in PGD\n--task TASK         \n                    Task of attacking. Options: \"cls\" for classification,\n                    \"reg\" for regression\n--attack_type ATTACK_TYPE\n                    Specify attack type. Options: \"all\", \"translation\",\n                    \"rotation\"\n--iter_eps ITER_EPS \n                    Primary PGD attack step size for each iteration, in\n                    translation only/rotation only attacks, this parameter\n                    is used.\n--iter_eps2 ITER_EPS2\n                    Secondary PGD attack step size for each iteration,\n                    only effective when attack_type is \"all\" and poly mode\n                    is disabled.\n--poly              \n                    Polynomial trajectory perturbation option. Notice: if\n                    true, attack_type will be fixed(translation)\n```\nAll the experiments were performed at the [pretrained model](checkpoint_epoch_70.pth) of PointRCNN as provided.\n\nDetection and evaluation results will be save in \n```bash\noutput/{SPLIT}/{ATTACK_TYPE}/FLAT_{STAGE}_{TASK}_{NB_ITER}_{ITER_EPS}_{ITER_EPS2}\n```\n\n## Acknowledgment  \n```flat.py``` is modified from the evaluation code of [PointRCNN](https://github.com/sshaoshuai/PointRCNN), for implementing attacks.  \n```evaluate.py``` is  borrowed from evaluation code from [Train in Germany, Test in The USA: Making 3D Object Detectors Generalize](https://github.com/cxy1997/3D_adapt_auto_driving), utilizing distance-based difficulty metrics.  \n```nusc_to_kitti.py``` is  modified from official [nuscenes-devkit script](https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/scripts/export_kitti.py) to generate kitti-format nuscenes dataset with ego pose for interpolation.  \n* [PointRCNN](https://github.com/sshaoshuai/PointRCNN)\n* [3D_adapt_auto_driving](https://github.com/cxy1997/3D_adapt_auto_driving)\n* [nuSenes-devkit](https://github.com/nutonomy/nuscenes-devkit)\n\nThis project is not possible without these great codebases.\n\n## Citation\nIf you find FLAT useful in your research, please cite:\n```\n@InProceedings{Li_2021_ICCV,\n      title = {Fooling LiDAR Perception via Adversarial Trajectory Perturbation},\n      author = {Li, Yiming and Wen, Congcong and Juefei-Xu, Felix and Feng, Chen},\n      booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},\n      month = {October},\n      year = {2021}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai4ce%2Fflat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai4ce%2Fflat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai4ce%2Fflat/lists"}