{"id":27338479,"url":"https://github.com/chenzhaiyu/points2poly","last_synced_at":"2025-04-12T15:26:46.484Z","repository":{"id":44395598,"uuid":"337204366","full_name":"chenzhaiyu/points2poly","owner":"chenzhaiyu","description":"Reconstructing compact building models from point clouds using deep implicit fields [ISPRS 2022]","archived":false,"fork":false,"pushed_at":"2023-12-29T15:33:57.000Z","size":1344,"stargazers_count":161,"open_issues_count":1,"forks_count":28,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-05-06T00:02:57.712Z","etag":null,"topics":["3d","building","implicit-field","point-cloud","reconstruction"],"latest_commit_sha":null,"homepage":"https://github.com/chenzhaiyu/points2poly","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/chenzhaiyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-02-08T20:43:37.000Z","updated_at":"2024-05-03T17:46:23.000Z","dependencies_parsed_at":"2023-12-29T16:35:10.711Z","dependency_job_id":"c5e93921-e640-422a-a8ab-f8e31e776cd9","html_url":"https://github.com/chenzhaiyu/points2poly","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/chenzhaiyu%2Fpoints2poly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenzhaiyu%2Fpoints2poly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenzhaiyu%2Fpoints2poly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenzhaiyu%2Fpoints2poly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenzhaiyu","download_url":"https://codeload.github.com/chenzhaiyu/points2poly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248588232,"owners_count":21129355,"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":["3d","building","implicit-field","point-cloud","reconstruction"],"created_at":"2025-04-12T15:26:45.674Z","updated_at":"2025-04-12T15:26:46.475Z","avatar_url":"https://github.com/chenzhaiyu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Points2Poly\n\n-----------\n\n## Introduction\n\n***Points2Poly*** is an implementation of the paper [*Reconstructing Compact Building Models from Point Clouds Using Deep Implicit Fields*](https://www.sciencedirect.com/science/article/pii/S0924271622002611), which incorporates learnable implicit surface representation into explicitly constructed geometry.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/chenzhaiyu/points2poly/master/docs/images/teaser.png\" width=\"680\"/\u003e\n\u003c/p\u003e\n\nDue to clutter concerns, **the core module is separately maintained in the [*abspy*](https://github.com/chenzhaiyu/abspy) repository** (also available as a [PyPI package](https://pypi.org/project/abspy/)), while this repository acts as a wrapper with additional sources and instructions in particular for building reconstruction.\n\n## Prerequisites\n\nThe prerequisites are two-fold: one from `abspy` with functionalities on vertex group, cell complex, and adjacency graph; the other one from `points2surf` that facilitates occupancy estimation.\n\nClone this repository with submodules:\n```bash\ngit clone --recurse-submodules https://github.com/chenzhaiyu/points2poly\n```\n\nIn case you already cloned the repository but forgot `--recurse-submodules`:\n```bash\ngit submodule update --init\n```\n\n### Requirements from `abspy` \n\nFollow the [instruction](https://github.com/chenzhaiyu/abspy#installation) to install `abspy` with its dependencies, while `abspy` itself can be easily installed via [PyPI](https://pypi.org/project/abspy/):\n```bash\n# local version (stable)\npip install ./abspy\n\n# PyPI version (latest)\npip install abspy\n```\n\n###  Requirements from `points2surf`\n\nInstall the dependencies for `points2surf`:\n\n```bash\npip install -r points2surf/requirements.txt\n```\n\nFor training, make sure CUDA is available and enabled.\nNavigate to [`points2surf/README.md`](https://github.com/ErlerPhilipp/points2surf) for more details on its requirements.\n\nIn addition, install dependencies for logging:\n\n```bash\npip install -r requirements.txt\n```\n\n## Getting started\n\n### Reconstruction demo \n\nDownload a mini dataset of 6 buildings from the [Helsinki 3D city models](https://kartta.hel.fi/3d/), and a pre-trained full-view model:\n\n```bash\npython download.py dataset_name='helsinki_mini' model_name='helsinki_fullview'\n```\n\nRun reconstruction on the mini dataset:\n```bash\npython reconstruct.py dataset_name='helsinki_mini' model_name='helsinki_fullview'\n```\n\nEvaluate the reconstruction results by Hausdorff distance:\n\n```bash\npython evaluate.py dataset_name='helsinki_mini'\n```\n\nThe reconstructed building models and statistics can be found under `./outputs/helsinki_mini/reconstructed`.\n\n### Helsinki dataset\n\nDownload the Helsinki dataset from [OneDrive](https://1drv.ms/f/s!AseUjD457t0Sgtptq5PZlrPBwu8N_A?e=mvtSrw), including meshes, point clouds, and queries with distances.\n\n### Custom dataset\n\n#### Reconstruction from custom point clouds\n\n* **Convert point clouds into NumPy binary files** (`.npy`). Place point cloud files (e.g., `.ply`, `.obj`, `.stl` and `.off`) under `./datasets/{dataset_name}/00_base_pc` then run [`points2surf/make_pc_dataset.py`](https://github.com/ErlerPhilipp/points2surf/blob/master/make_pc_dataset.py), or manually do the conversion.\n\n* **Extract planar primitives from point clouds with** [Mapple](https://github.com/LiangliangNan/Easy3D/releases/tag/v2.5.2). In Mapple, use `Point Cloud` - `RANSAC primitive extraction` to extract planar primitives, then save the vertex group files (`.vg` or `.bvg`) into `./datasets/{dataset_name}/06_vertex_group`.\n\n* **Run reconstruction the same way as that in the demo**. Notice that, however, you might need to retrain a model that conforms to your data's characteristics.\n\n#### Make training data\n\nPrepare meshes and place them under `datasets/{dataset_name}` that mimic the structure of the provided data. Refer to this [instruction](https://github.com/ErlerPhilipp/points2surf#make-your-own-datasets) for creating training data through [BlenSor](https://www.blensor.org/) simulation. \n\n## TODOs\n\n- [x] Separate `abspy`/`points2surf` from `points2poly` wrappers\n- [x] Config with hydra\n- [x] Short tutorial on how to get started\n- [x] Host generated data\n\n## License\n\n[MIT](https://raw.githubusercontent.com/chenzhaiyu/points2poly/main/LICENSE)\n\n## Acknowledgement\nThe implementation of *Points2Poly* has greatly benefited from [Points2Surf](https://github.com/ErlerPhilipp/points2surf). In addition, the implementation of the *abspy* submodule is backed by great open-source libraries inlcuding [SageMath](https://www.sagemath.org/), [NetworkX](https://networkx.org/), and [Easy3D](https://github.com/LiangliangNan/Easy3D).\n\n## Citation\n\nIf you use *Points2Poly* in a scientific work, please consider citing the paper:\n\n```bibtex\n@article{chen2022points2poly,\n  title = {Reconstructing compact building models from point clouds using deep implicit fields},\n  journal = {ISPRS Journal of Photogrammetry and Remote Sensing},\n  volume = {194},\n  pages = {58-73},\n  year = {2022},\n  issn = {0924-2716},\n  doi = {https://doi.org/10.1016/j.isprsjprs.2022.09.017},\n  url = {https://www.sciencedirect.com/science/article/pii/S0924271622002611},\n  author = {Zhaiyu Chen and Hugo Ledoux and Seyran Khademi and Liangliang Nan}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenzhaiyu%2Fpoints2poly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenzhaiyu%2Fpoints2poly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenzhaiyu%2Fpoints2poly/lists"}