{"id":23757263,"url":"https://github.com/pointcept/sampart3d","last_synced_at":"2025-04-12T16:41:46.623Z","repository":{"id":244877300,"uuid":"816373900","full_name":"Pointcept/SAMPart3D","owner":"Pointcept","description":"SAMPart3D: Segment Any Part in 3D Objects","archived":false,"fork":false,"pushed_at":"2025-01-15T11:05:02.000Z","size":15528,"stargazers_count":310,"open_issues_count":13,"forks_count":19,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-03T20:09:26.465Z","etag":null,"topics":[],"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/Pointcept.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":"2024-06-17T16:00:57.000Z","updated_at":"2025-04-03T11:21:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"968f2973-fdfd-4700-b6b3-92f9bd552f00","html_url":"https://github.com/Pointcept/SAMPart3D","commit_stats":null,"previous_names":["pointcept/3d-sap","pointcept/sampart3d"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pointcept%2FSAMPart3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pointcept%2FSAMPart3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pointcept%2FSAMPart3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pointcept%2FSAMPart3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pointcept","download_url":"https://codeload.github.com/Pointcept/SAMPart3D/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248599075,"owners_count":21131213,"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":[],"created_at":"2024-12-31T19:43:22.642Z","updated_at":"2025-04-12T16:41:46.600Z","avatar_url":"https://github.com/Pointcept.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SAMPart3D: Segment Any Part in 3D Objects\n\n## [Project Page](https://yhyang-myron.github.io/SAMPart3D-website/) | [Paper](https://arxiv.org/abs/2411.07184v1) | [Dataset: PartObjaverse-Tiny](PartObjaverse-Tiny/PartObjaverse-Tiny.md)\n\n![](assets/teaser.png)\n\n## 🔧 Setup\n\n### Installation\nPlease refer to [INSTALL.md](INSTALL.md).\n\n### Preparation for training\n\n1. Download pretrained PTv3-object [https://huggingface.co/yhyang-myron/SAMPart3D/tree/main](https://huggingface.co/yhyang-myron/SAMPart3D/tree/main).\n\n2. Data prepocessing\n\n    We use Blender to render multi-view rgb and depth of the 3D glb mesh. First Install Blender:\n    ```bash\n    wget https://download.blender.org/release/Blender4.0/blender-4.0.0-linux-x64.tar.xz\n    tar -xf blender-4.0.0-linux-x64.tar.xz\n    rm blender-4.0.0-linux-x64.tar.xz\n    ```\n    Then render rgb and depth:\n    ```bash\n    cd tools\n    ${PATH_TO_BLENDER} -b -P blender_render_16views.py ${MESH_PATH} ${TYPES} ${OUTPUT_PATH}\n    ```   \n    For example:\n    ```bash\n    blender-4.0.0-linux-x64/blender -b -P blender_render_16views.py mesh_root/knight.glb glb data_root/knight\n    ```\n\n## 🚀 Running SAMPart3D\n### 1. Train\nChange the rendering **data_root**, **mesh_root** and **backbone_weight_path** in `configs/sampart3d/sampart3d-trainmlp-render16views.py`.\n```bash\nSAMPart3D\n|-- ckpt\n    |-- ptv3-object.pth\n|-- mesh_root\n    |-- knight.glb\n|-- data_root\n    |-- knight\n        |-- meta.json\n        |-- render_0000.webp\n        |-- depth_0000.exr\n        ...\n```\n\n```bash\nexport CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}\nsh scripts/train.sh -g ${NUM_GPU} -d ${DATASET_NAME} -c ${CONFIG_NAME} -n ${EXP_NAME} -o ${OBJECT_UID}\n```\nFor example:\n```bash\nsh scripts/train.sh -g 1 -d sampart3d -c sampart3d-trainmlp-render16views -n knight -o knight\n```\n\nThe mesh segmentation results will be saved in `exp/${DATASET_NAME}/${EXP_NAME}/resuls`, and the visualization of point clouds and meshes will be saved in `exp/${DATASET_NAME}/${EXP_NAME}/vis_pcd/`.\n\n### 2. Test more scales with pretrained MLPs\nAfter training, the ckpt of the target mesh will be saved in `exp/${DATASET_NAME}/${EXP_NAME}/model/`, if you want to try more scales, you can directly load the weight. And modify the **val_scales_list** in `exp/${DATASET_NAME}/${EXP_NAME}/config.py`.\n\n```bash\nexport CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}\nsh scripts/eval.sh -g ${NUM_GPU} -d ${DATASET_NAME} -n ${EXP_NAME} -w ${WEIGHT_NAME}\n```\nFor example:\n```bash\nsh scripts/eval.sh -g 1 -d sampart3d -n knight -w 5000\n```\n\n### 3. Highlight 3D segments on multi-view renderings\nSet **render_dir**, **mesh_path**, **results_dir**, **save_dir** in `tools/highlight_parts.py`.\n```bash\npython tools/highlight_parts.py\n```\n\n## 📚 Dataset: PartObjaverse-Tiny\nPlease refer to [PartObjaverse-Tiny.md](PartObjaverse-Tiny/PartObjaverse-Tiny.md).\n\n## Acknowledgement\nSAMPart3D is inspired by the following repos: [garfield](https://github.com/chungmin99/garfield), [PointTransformerV3](https://github.com/Pointcept/PointTransformerV3), [Pointcept](https://github.com/Pointcept/Pointcept), [FeatUp](https://github.com/mhamilton723/FeatUp), [dinov2](https://github.com/facebookresearch/dinov2), [segment-anything](https://github.com/facebookresearch/segment-anything), [PartSLIP2](https://github.com/zyc00/PartSLIP2).\n\nMany thanks to the authors for sharing their codes.\n\n## Citation\nIf you find SAMPart3D useful in your project, please cite our work. :)\n```\n@article{yang2024sampart3d,\n  title={SAMPart3D: Segment Any Part in 3D Objects},\n  author={Yang, Yunhan and Huang, Yukun and Guo, Yuan-Chen and Lu, Liangjun and Wu, Xiaoyang and Lam, Edmund Y and Cao, Yan-Pei and Liu, Xihui},\n  journal={arXiv preprint arXiv:2411.07184},\n  year={2024}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpointcept%2Fsampart3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpointcept%2Fsampart3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpointcept%2Fsampart3d/lists"}