{"id":13443981,"url":"https://github.com/yanx27/PointASNL","last_synced_at":"2025-03-20T17:32:30.783Z","repository":{"id":46098420,"uuid":"244108454","full_name":"yanx27/PointASNL","owner":"yanx27","description":"PointASNL: Robust Point Clouds Processing using Nonlocal Neural Networks with Adaptive Sampling （CVPR 2020）","archived":false,"fork":false,"pushed_at":"2021-10-15T14:45:48.000Z","size":786,"stargazers_count":262,"open_issues_count":19,"forks_count":34,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-17T13:11:17.261Z","etag":null,"topics":["classification","modelnet-dataset","point-cloud","sample","scannet-dataset","segmentation","self-driving","semantickitti","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yanx27.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-03-01T07:48:22.000Z","updated_at":"2025-02-24T02:24:39.000Z","dependencies_parsed_at":"2022-08-12T12:40:33.991Z","dependency_job_id":null,"html_url":"https://github.com/yanx27/PointASNL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanx27%2FPointASNL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanx27%2FPointASNL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanx27%2FPointASNL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanx27%2FPointASNL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanx27","download_url":"https://codeload.github.com/yanx27/PointASNL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244660746,"owners_count":20489388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["classification","modelnet-dataset","point-cloud","sample","scannet-dataset","segmentation","self-driving","semantickitti","tensorflow"],"created_at":"2024-07-31T03:02:15.711Z","updated_at":"2025-03-20T17:32:30.754Z","avatar_url":"https://github.com/yanx27.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# PointASNL\n\nThis repository is for **PointASNL** introduced in the following paper\n\nXu Yan, [Chaoda Zheng](https://github.com/Ghostish), [Zhen Li*](https://mypage.cuhk.edu.cn/academics/lizhen/), Sheng Wang and Shuguang Cui, \"PointASNL: Robust Point Clouds Processing using Nonlocal Neural Networks with Adaptive Sampling\", CVPR 2020 [[arxiv]](https://arxiv.org/pdf/2003.00492.pdf).\n\n![](figure/fig1.png)\n\nIf you find our work useful in your research, please consider citing:\n```\n@inproceedings{yan2020pointasnl,\n  title={Pointasnl: Robust point clouds processing using nonlocal neural networks with adaptive sampling},\n  author={Yan, Xu and Zheng, Chaoda and Li, Zhen and Wang, Sheng and Cui, Shuguang},\n  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},\n  pages={5589--5598},\n  year={2020}\n}\n```\n\n## Getting Started\n\n### (1) Set up\nClone the repository:\n```\ngit clone https://github.com/yanx27/PointASNL.git\n```\n\nInstallation instructions for Ubuntu 16.04 (available at **CUDA10**):\n     \n* Make sure \u003ca href=\"https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html\"\u003eCUDA\u003c/a\u003e  and \u003ca href=\"https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html\"\u003ecuDNN\u003c/a\u003e are installed. Only this configurations has been tested: \n     - Python 3.6.9, TensorFlow 1.13.1, CUDA 10.1\n\n\n* Follow \u003ca href=\"https://www.tensorflow.org/install/pip\"\u003eTensorflow installation procedure\u003c/a\u003e.\n     \n     \n* Compile the customized Tensorflow operators by `sh complile_op.sh`. \nN.B. If you installed Tensorflow in a virtual environment, it needs to be activated when running these scripts\n\n\n### (2) ModelNet40 Classification\nAligned ModelNet40 dataset can be found [here](https://shapenet.cs.stanford.edu/media/modelnet40_normal_resampled.zip). Since the randomness of data augmentation, the result of this code maybe slightly different from the result in paper, but it should be around 93%. \n#### Data without Noise\nIt will cost relatively long time in first epoch for cache construction.\n```\n# Training \n$ python train.py --data [MODELNET40 PATH] --exp_dir PointASNL_without_noise\n\n# Evaluation \n$ python test.py --data [MODELNET40 PATH] --model_path log/PointASNL_without_noise/best_model.ckpt\n```\n#### Data with Noise\nModel with AS module is extremely robust for noisy data. You can use adaptive sampling by setting `--AS` . \n```\n# Training \n$ python train.py --data [MODELNET40 PATH] --exp_dir PointASNL_with_noise --AS\n\n# Evaluation on noisy data \n$ python test.py --data [MODELNET40 PATH]  --model_path log/PointASNL_with_noise/best_model.ckpt --AS --noise\n```\n\n### (3) ScanNet Segmentation\nWe provide two options for training on ScanNet dataset (with or without pre/post processing). \nWith grid sampling processing, more input points and deeper network structure, our PointASNL can achieve **66.6%** on ScanNet [benchmark](http://kaldir.vc.in.tum.de/scannet_benchmark/).\n#### Data Preparation\nOfficial ScanNet dataset can be downloaded [here](http://www.scan-net.org/). \nIf you choose training without grid sampling, you need firstly run `ScanNet/prepare_scannet.py`, otherwise you can skip to training step.\n#### Data without Processing\nThis method converges relatively slower, and will achieve result around 63%.\n```\n# Training \n$ cd ScanNet/\n$ python train_scannet.py --data [SCANNET PATH] --log_dir PointASNL\n\n# Evaluation \n$ cd ScanNet/\n$ python test_scannet.py --data [SCANNET PATH]  --model_path log/PointASNL/latest_model.ckpt \n```\n#### Data with Grid Sampling\nWe highly recommend training with this method, although it takes a long time to process the raw data, it can achieve results around 66% and will be faster to converge. Grid sampling pre-processing will be automatically conducted before training.\n```\n# Training \n$ cd ScanNet/\n$ python train_scannet_grid.py --data [SCANNET PATH] --log_dir PointASNL_grid --num_point 10240 --model pointasnl_sem_seg_res --in_radius 2\n\n# Evaluation \n$ cd ScanNet/\n$ python test_scannet_grid.py --data [SCANNET PATH]  --model_path log/PointASNL_grid/latest_model.ckpt \n```\n\n#### Pre-trained Model\n| Model         | mIoU  | Download                                                     |\n| ------------- |  ------------- | ------------------------------------------------------------ |\n| pointasnl_sem_seg_res | 66.93  | [ckpt-163.9M](https://drive.google.com/file/d/1cSCOTScBZOJI4shU4Dwl8EXYy0NBUR5n/view?usp=sharing) |\n\n### (4) SemanticKITTI Segmentation\n* SemanticKITTI dataset can be found [here](http://semantic-kitti.org/dataset.html#download). Download the files related to semantic segmentation and extract everything into the same folder. \n* We add codes with grid sampling processing, which can achieve better result of around **52%** (using `--prepare_data` just in the first running).\n* Please using official [semantic_kitti_api](https://github.com/PRBonn/semantic-kitti-api) for evaluation.\n```\n# Training \n$ cd SemanticKITTI/\n$ python train_semantic_kitti.py --data [SemanticKITTI PATH] --log_dir PointASNL --with_remission\n# or\n$ python train_semantic_kitti_grid.py --data [SemanticKITTI PATH] --log_dir PointASNL_grid --prepare_data \n\n# Evaluation \n$ cd SemanticKITTI/\n$ python test_semantic_kitti.py --data [SemanticKITTI PATH]  --model_path log/PointASNL/latest_model.ckpt  --with_remission\n# or\n$ python test_semantic_kitti_grid.py --data [SemanticKITTI PATH] --model_path log/PointASNL_grid/best_model.ckpt --test_area [e.g., 08]\n\n```\n\n\n## Acknowledgement\n* The original code is borrowed from [PointNet++](https://github.com/charlesq34/pointnet2) and [PointConv](https://github.com/DylanWusee/pointconv).\n* The code with grid sampling is borrowed from [KPConv](https://github.com/HuguesTHOMAS/KPConv) and [RandLA-Net](https://github.com/QingyongHu/RandLA-Net). \n* The kd-tree tool is from [nanoflann](https://github.com/jlblancoc/nanoflann).\n## License\nThis repository is released under MIT License (see LICENSE file for details).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanx27%2FPointASNL","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanx27%2FPointASNL","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanx27%2FPointASNL/lists"}