{"id":23979343,"url":"https://github.com/filapro/oneformer3d","last_synced_at":"2025-05-16T01:05:51.250Z","repository":{"id":208995001,"uuid":"721126093","full_name":"filaPro/oneformer3d","owner":"filaPro","description":"[CVPR2024] OneFormer3D: One Transformer for Unified Point Cloud Segmentation","archived":false,"fork":false,"pushed_at":"2024-10-23T08:33:02.000Z","size":101,"stargazers_count":433,"open_issues_count":10,"forks_count":38,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-09T11:07:05.827Z","etag":null,"topics":["3d-instance-segmentation","3d-object-detection","3d-panoptic-segmentation","3d-semantic-segmentation","mmdetection3d","pytorch","s3dis","scannet","scannet200"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filaPro.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-20T12:10:03.000Z","updated_at":"2025-04-09T10:07:32.000Z","dependencies_parsed_at":"2024-02-26T23:44:49.435Z","dependency_job_id":"27948226-c792-4ef1-8f8f-52b15a03c396","html_url":"https://github.com/filaPro/oneformer3d","commit_stats":null,"previous_names":["filapro/oneformer3d","oneformer3d/oneformer3d"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filaPro%2Foneformer3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filaPro%2Foneformer3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filaPro%2Foneformer3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filaPro%2Foneformer3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filaPro","download_url":"https://codeload.github.com/filaPro/oneformer3d/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448579,"owners_count":22072764,"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-instance-segmentation","3d-object-detection","3d-panoptic-segmentation","3d-semantic-segmentation","mmdetection3d","pytorch","s3dis","scannet","scannet200"],"created_at":"2025-01-07T09:48:30.559Z","updated_at":"2025-05-16T01:05:46.225Z","avatar_url":"https://github.com/filaPro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## OneFormer3D: One Transformer for Unified Point Cloud Segmentation\n\n**News**:\n * September, 2024. We release state-of-the-art 3D object detector [UniDet3D](https://github.com/filapro/unidet3d) based on OneFormer3D.\n * :fire: February, 2024. OneFormer3D is now accepted at CVPR 2024.\n * :fire: November, 2023. OneFormer3D achieves state-of-the-art in\n   * 3D instance segmentation on ScanNet ([hidden test](https://kaldir.vc.in.tum.de/scannet_benchmark/semantic_instance_3d))\n     [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/oneformer3d-one-transformer-for-unified-point/3d-instance-segmentation-on-scannetv2)](https://paperswithcode.com/sota/3d-instance-segmentation-on-scannetv2?p=oneformer3d-one-transformer-for-unified-point)\n     \u003cdetails\u003e\n        \u003csummary\u003eleaderboard screenshot\u003c/summary\u003e\n        \u003cimg src=\"https://github.com/filaPro/oneformer3d/assets/6030962/e8890fd9-336d-4851-85cb-06fbbb60abe3\" alt=\"ScanNet leaderboard\"/\u003e\n     \u003c/details\u003e\n   * 3D instance segmentation on S3DIS (6-Fold)\n     [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/oneformer3d-one-transformer-for-unified-point/3d-instance-segmentation-on-s3dis)](https://paperswithcode.com/sota/3d-instance-segmentation-on-s3dis?p=oneformer3d-one-transformer-for-unified-point)\n   * 3D panoptic segmentation on ScanNet\n     [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/oneformer3d-one-transformer-for-unified-point/panoptic-segmentation-on-scannet)](https://paperswithcode.com/sota/panoptic-segmentation-on-scannet?p=oneformer3d-one-transformer-for-unified-point)\n   * 3D object detection on ScanNet (w/o TTA)\n     [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/oneformer3d-one-transformer-for-unified-point/3d-object-detection-on-scannetv2)](https://paperswithcode.com/sota/3d-object-detection-on-scannetv2?p=oneformer3d-one-transformer-for-unified-point)\n   * 3D semantic segmentation on ScanNet (val, w/o extra training data) [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/oneformer3d-one-transformer-for-unified-point/semantic-segmentation-on-scannet)](https://paperswithcode.com/sota/semantic-segmentation-on-scannet?p=oneformer3d-one-transformer-for-unified-point)\n\nThis repository contains an implementation of OneFormer3D, a 3D (instance, semantic, and panoptic) segmentation method introduced in our paper:\n\n\u003e **OneFormer3D: One Transformer for Unified Point Cloud Segmentation**\u003cbr\u003e\n\u003e [Maksim Kolodiazhnyi](https://github.com/col14m),\n\u003e [Anna Vorontsova](https://github.com/highrut),\n\u003e [Anton Konushin](https://scholar.google.com/citations?user=ZT_k-wMAAAAJ),\n\u003e [Danila Rukhovich](https://github.com/filaPro)\n\u003e \u003cbr\u003e\n\u003e Samsung Research\u003cbr\u003e\n\u003e https://arxiv.org/abs/2311.14405\n\n### Installation\n\nFor convenience, we provide a [Dockerfile](Dockerfile).\nThis implementation is based on [mmdetection3d](https://github.com/open-mmlab/mmdetection3d) framework `v1.1.0`. If installing without docker please follow their [getting_started.md](https://github.com/open-mmlab/mmdetection3d/blob/22aaa47fdb53ce1870ff92cb7e3f96ae38d17f61/docs/en/get_started.md).\n\n\n### Getting Started\n\nPlease see [test_train.md](https://github.com/open-mmlab/mmdetection3d/blob/22aaa47fdb53ce1870ff92cb7e3f96ae38d17f61/docs/en/user_guides/train_test.md) for basic usage examples.\nFor ScanNet and ScanNet200 datasets preprocessing please follow our [instruction](data/scannet). It differs from original mmdetection3d only by adding superpoint clustering. For S3DIS preprocessing we follow original [instruction](https://github.com/open-mmlab/mmdetection3d/tree/22aaa47fdb53ce1870ff92cb7e3f96ae38d17f61/data/s3dis) from mmdetection3d. We also [support](data/structured3d) Structured3D dataset for pre-training.\n\nImportant notes:\n * The metrics from our paper can be achieved in several ways, we just choose the most stable one for each dataset in this repository.\n * If you are interested in only one of three segmentation tasks, it is possible to achieve slightly better metrics, than declared in our paper. Specifically, increasing `model.criterion.sem_criterion.loss_weight` in config file leads to better semantic metrics, and decreasing improve instance metrics.\n * All models can be trained with a single GPU with 32 Gb memory (or even 24 Gb for ScanNet dataset). If you face issues with RAM during instance segmentation evaluation at validation or test stages feel free to decrease `model.test_cfg.topk_insts` in config file.\n * Due to the bug in SpConv we [reshape](tools/fix_spconv_checkpoint.py) backbone weights between train and test stages.\n\n#### ScanNet\n\nFor ScanNet we present the model with [SpConv](https://github.com/traveller59/spconv) backbone, superpoint pooling, selecting all queries, and predicting semantics directly from instance queries. Backbone is initialized from [SSTNet](https://github.com/Gorilla-Lab-SCUT/SSTNet) checkpoint. It should be [downloaded](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/sstnet_scannet.pth) and put to `work_dirs/tmp` before training.\n\n```shell\n# train (with validation)\npython tools/train.py configs/oneformer3d_1xb4_scannet.py\n# test\npython tools/fix_spconv_checkpoint.py \\\n    --in-path work_dirs/oneformer3d_1xb4_scannet/epoch_512.pth \\\n    --out-path work_dirs/oneformer3d_1xb4_scannet/epoch_512.pth\npython tools/test.py configs/oneformer3d_1xb4_scannet.py \\\n    work_dirs/oneformer3d_1xb4_scannet/epoch_512.pth\n\n```\n\n#### ScanNet200\n\nFor ScanNet200 we present the model with [MinkowskiEngine](https://github.com/NVIDIA/MinkowskiEngine) backbone, superpoint pooling, selecting all queries, and predicting semantics directly from instance queries. Backbone is initialized from [Mask3D](https://github.com/JonasSchult/Mask3D) checkpoint. It should be [downloaded](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/mask3d_scannet200.pth) and put to `work_dirs/tmp` before training.\n\n```shell\n# train (with validation)\npython tools/train.py configs/oneformer3d_1xb4_scannet200.py\n# test\npython tools/test.py configs/oneformer3d_1xb4_scannet200.py \\\n    work_dirs/oneformer3d_1xb4_scannet/epoch_512.pth\n```\n\n#### S3DIS\n\nFor S3DIS we present the model with [SpConv](https://github.com/traveller59/spconv) backbone, w/o superpoint pooling, w/o query selection, and with separate semantic queries. Backbone is pretrained on Structured3D and ScanNet. It can be [downloaded](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/instance-only-oneformer3d_1xb2_scannet-and-structured3d.pth) and put to `work_dirs/tmp` before training or trained with our code. We train the model on Areas 1, 2, 3, 4, 6 and test on Area 5. To change this split feel free to modify `train_area` and `test_area` parameters in config.\n\n```shell\n# pre-train\npython tools/train.py configs/instance-only-oneformer3d_1xb2_scannet-and-structured3d.py\npython tools/fix_spconv_checkpoint.py \\\n    --in-path work_dirs/instance-only-oneformer3d_1xb2_scannet-and-structured3d/iter_600000.pth \\\n    --out-path work_dirs/tmp/instance-only-oneformer3d_1xb2_scannet-and-structured3d.pth\n# train (with validation)\npython tools/train.py configs/oneformer3d_1xb2_s3dis-area-5.py\n# test\npython tools/fix_spconv_checkpoint.py \\\n    --in-path work_dirs/oneformer3d_1xb2_s3dis-area-5/epoch_512.pth \\\n    --out-path work_dirs/oneformer3d_1xb2_s3dis-area-5/epoch_512.pth\npython tools/test.py configs/oneformer3d_1xb2_s3dis-area-5.py \\\n    work_dirs/oneformer3d_1xb2_s3dis-area-5/epoch_512.pth\n```\n\n### Models\n\nMetric values in the table are given for the provided checkpoints and may vary a little from the ones in our paper. Due to randomness it may be needed to run training with the same config for several times to achieve the best metrics.\n\n| Dataset | mAP\u003csub\u003e25\u003c/sub\u003e | mAP\u003csub\u003e50\u003c/sub\u003e | mAP | mIoU | PQ | Download |\n|:-------:|:----------------:|:----------------:|:---:|:----:|:--:|:--------:|\n| ScanNet | 86.7 | 78.8 | 59.3 | 76.4 | 70.7 | [model](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/oneformer3d_1xb4_scannet.pth) \u0026#124; [log](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/oneformer3d_1xb4_scannet.log) \u0026#124; [config](configs/oneformer3d_1xb4_scannet.py) |\n| ScanNet200 | 44.6 | 40.9 | 30.2 | 29.4 | 29.7 | [model](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/oneformer3d_1xb4_scannet200.pth) \u0026#124; [log](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/oneformer3d_1xb4_scannet200.log) \u0026#124; [config](configs/oneformer3d_1xb4_scannet200.py) |\n| S3DIS | 80.6 | 72.7 | 58.0 | 71.9 | 64.6 | [model](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/oneformer3d_1xb2_s3dis-area-5.pth) \u0026#124; [log](https://github.com/oneformer3d/oneformer3d/releases/download/v1.0/oneformer3d_1xb2_s3dis-area-5.log) \u0026#124; [config](configs/oneformer3d_1xb2_s3dis-area-5.py) |\n\n### Example Predictions\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/filaPro/oneformer3d/assets/6030962/12809615-7ed5-46a0-9321-747451862295\" alt=\"ScanNet predictions\"/\u003e\n\u003c/p\u003e\n\n### Citation\n\nIf you find this work useful for your research, please cite our paper:\n\n```\n@inproceedings{kolodiazhnyi2024oneformer3d,\n  title={Oneformer3d: One transformer for unified point cloud segmentation},\n  author={Kolodiazhnyi, Maxim and Vorontsova, Anna and Konushin, Anton and Rukhovich, Danila},\n  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},\n  pages={20943--20953},\n  year={2024}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilapro%2Foneformer3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilapro%2Foneformer3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilapro%2Foneformer3d/lists"}