{"id":48446390,"url":"https://github.com/martinnormark/neural-mesh-simplification","last_synced_at":"2026-04-06T18:02:56.160Z","repository":{"id":252259816,"uuid":"839881918","full_name":"martinnormark/neural-mesh-simplification","owner":"martinnormark","description":"Un-official and WIP Implementation of the Neural Mesh Simplification paper","archived":false,"fork":false,"pushed_at":"2025-03-10T23:27:04.000Z","size":170,"stargazers_count":26,"open_issues_count":14,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-11T00:26:10.115Z","etag":null,"topics":["3d","3d-modelling","machine-learning","mesh","mesh-processing","mesh-simplification","pytorch","pytorch-geometric"],"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/martinnormark.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-08-08T14:10:35.000Z","updated_at":"2025-03-10T23:27:08.000Z","dependencies_parsed_at":"2025-01-24T12:19:13.805Z","dependency_job_id":"119739ad-99fb-4d2e-ab85-db14ecc2bbf8","html_url":"https://github.com/martinnormark/neural-mesh-simplification","commit_stats":null,"previous_names":["martinnormark/neural-mesh-simplification"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/martinnormark/neural-mesh-simplification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinnormark%2Fneural-mesh-simplification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinnormark%2Fneural-mesh-simplification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinnormark%2Fneural-mesh-simplification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinnormark%2Fneural-mesh-simplification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinnormark","download_url":"https://codeload.github.com/martinnormark/neural-mesh-simplification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinnormark%2Fneural-mesh-simplification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31483382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: 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","3d-modelling","machine-learning","mesh","mesh-processing","mesh-simplification","pytorch","pytorch-geometric"],"created_at":"2026-04-06T18:02:20.426Z","updated_at":"2026-04-06T18:02:56.154Z","avatar_url":"https://github.com/martinnormark.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Mesh Simplification\n\nImplementation of the\npaper [Neural Mesh Simplification paper](https://openaccess.thecvf.com/content/CVPR2022/papers/Potamias_Neural_Mesh_Simplification_CVPR_2022_paper.pdf)\nby Potamias et al. (CVPR 2022) and the updated info shared\nin [supplementary material](https://openaccess.thecvf.com/content/CVPR2022/supplemental/Potamias_Neural_Mesh_Simplification_CVPR_2022_supplemental.pdf).\n\nThis Python package provides a fast, learnable method for mesh simplification that generates simplified meshes in\nreal-time.\n\n### Overview\n\nNeural Mesh Simplification is a novel approach to reduce the resolution of 3D meshes while preserving their appearance.\nUnlike traditional simplification methods that collapse edges in a greedy iterative manner, this method simplifies a\ngiven mesh in one pass using deep learning techniques.\n\nThe method consists of three main steps:\n\n1. Sampling a subset of input vertices using a sophisticated extension of random sampling.\n2. Training a sparse attention network to propose candidate triangles based on the edge connectivity of sampled\n   vertices.\n3. Using a classification network to estimate the probability that a candidate triangle will be included in the final\n   mesh.\n\n### Features\n\n- Fast and scalable mesh simplification\n- One-pass simplification process\n- Preservation of mesh appearance\n- Lightweight and differentiable implementation\n- Suitable for integration into learnable pipelines\n\n### Installation\n\n```bash\nconda create -n neural-mesh-simplification python=3.12\nconda activate neural-mesh-simplification\nconda install pip\n```\n\nDepending on whether you are using PyTorch on a CPU or a GPU,\nyou'll have to use the correct binaries for PyTorch and the PyTorch Geometric libraries. You can install them via:\n\n```bash\npip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cpu\npip install torch_cluster==1.6.3 torch_geometric==2.5.3 torch_scatter==2.1.2 torch_sparse==0.6.18 -f https://data.pyg.org/whl/torch-2.4.0+cpu.html\n```\n\nReplace “cpu” with “cu121” or the appropriate CUDA version for your system. If you don't know what is your cuda version,\nrun `nvidia-smi`\n\nAfter that you can install the remaining requirements\n\n```bash\npip install -r requirements.txt\npip install -e .\n```\n\n### Example Usage / Playground\n\n1. Drop your meshes as `.obj` files to the `examples/data` folder\n2. Run the following command\n\n```bash\npython examples/example.py\n```\n\n3. Collect the simplified meshes in `examples/data`. The simplified mesh objects file name will be the ones prefixed\n   with `simplified_`.\n\n### Data Preparation\n\nIf you don't have a dataset for training and evaluation, you can use a collection from HuggingFace's 3D Meshes dataset.\nSee https://huggingface.co/datasets/perler/ppsurf for more information.\n\nRun the following script to use the HuggingFace API to download\n\n```bash\npython scripts/download_test_meshes.py\n```\n\nData will be downloaded in the `data/raw` folder at the root of the project.\nYou can use `--target-folder` to specify a different folder.\n\nOnce you have some data, you should preprocess it using the following script:\n\n```bash\npython scripts/preprocess_data.py\n```\n\nYou can use the `--data_path` argument to specify the path to the dataset. The script will create a `data/processed`\n\n### Training\n\nTo train the model on your own dataset with the prepared data:\n\n```bash\npython ./scripts/train.py\n```\n\nBy default, the default training config at `config/default.yaml` will be used. You can override it with\n`--config /path/to/your/config.yaml`.\\\nYou can override the following config parameters:\n\n* the checkpoint directory specified in the config file (where the model will be saved) with\n  `--checkpoint-dir`.\n* the data path with `--data-path` if you have your data in a different location.\n\nIf the training was interrupted, you can resume it by specifying the path to the previously created checkpoint directory\nwith `--resume`.\\\nUse `--debug` to see DEBUG logging.\n\n### Evaluation\n\nTo evaluate the model on a test set:\n\n```bash\npython ./scripts/evaluate.py --eval-data-path /path/to/test/set --checkpoint /path/to/checkpoint.pth\n```\n\nBy default, the default training config at `config/default.yaml` will be used. You can override it with\n`--config /path/to/your/config.yaml`.\n\n### Inference\n\nTo simplify a mesh using the trained model:\n\n```bash\npython ./scripts/infer.py --input-file /path/to/your/mesh.obj --output-file --model-checkpoint /path/to/checkpoint.pth --device cpu\n```\n\nThe default feature dimension for point sampler and face classifier is 128, but can be configured with\n`--hidden-dim \u003cnum\u003e`.\\\nThe default feature dimension for edge predictor is 64, but can be configured with `--edge-hidden-dim \u003cnum\u003e`.\\\nIf you have a CUDA-compatible GPU, you can specify `--device cuda` to use it for inference.\n\n### Citation\n\nIf you use this code in your research, please cite the original paper:\n\n```\n@InProceedings{Potamias_2022_CVPR,\n    author    = {Potamias, Rolandos Alexandros and Ploumpis, Stylianos and Zafeiriou, Stefanos},\n    title     = {Neural Mesh Simplification},\n    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},\n    month     = {June},\n    year      = {2022},\n    pages     = {18583-18592}\n}\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\nm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinnormark%2Fneural-mesh-simplification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinnormark%2Fneural-mesh-simplification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinnormark%2Fneural-mesh-simplification/lists"}