{"id":27163507,"url":"https://github.com/gregspangenberg/pdm-cli","last_synced_at":"2025-06-29T17:33:30.892Z","repository":{"id":286382096,"uuid":"961240843","full_name":"gregspangenberg/PDM-cli","owner":"gregspangenberg","description":"Point Distribution Model (Statistical Shape Model of point-clouds) creation and fitting with Scalismo through the command line","archived":false,"fork":false,"pushed_at":"2025-04-10T01:42:43.000Z","size":58906,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T03:46:50.647Z","etag":null,"topics":["point-cloud","point-distribution-model","shape-completion","statistical-shape-model"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregspangenberg.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":"2025-04-06T04:25:31.000Z","updated_at":"2025-04-10T01:42:47.000Z","dependencies_parsed_at":"2025-04-10T03:43:01.529Z","dependency_job_id":null,"html_url":"https://github.com/gregspangenberg/PDM-cli","commit_stats":null,"previous_names":["gregspangenberg/pdm-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregspangenberg/PDM-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregspangenberg%2FPDM-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregspangenberg%2FPDM-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregspangenberg%2FPDM-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregspangenberg%2FPDM-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregspangenberg","download_url":"https://codeload.github.com/gregspangenberg/PDM-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregspangenberg%2FPDM-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262637759,"owners_count":23341188,"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":["point-cloud","point-distribution-model","shape-completion","statistical-shape-model"],"created_at":"2025-04-09T01:49:20.720Z","updated_at":"2025-06-29T17:33:30.868Z","avatar_url":"https://github.com/gregspangenberg.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDM-cli: Point Distribution Model Building and Fitting Tool\n\nA command-line tool for building, fitting, and visualizing Point Distribution Models (PDMs) using the Scalismo library.\n\n## Overview\n\nPDM-cli provides a streamlined workflow for statistical shape modeling:\n\n1. **Build PDMs** from training datasets\n2. **Fit PDMs** to new data using posterior or ICP approaches\n3. **Visualize** models and fitting results\n\n\n## Usage\n### Build PDM\n```bash\nscala-cli run build.scala -- /path/to/your/training/data\n```\nThe tool will:\n- Load point clouds from the specified directory\n- Compute the mean shape\n- Build a statistical model using PCA\n- Save the model to the models directory\n\n\n\n\n### Fit PDM\n```bash\n# Posterior-based fitting (for indexed point clouds that are algined and have correspondences)\nscala-cli run fit.scala -- posterior --pdm models/your_pdm.h5.json --input /path/to/target/data\n\n# ICP-based fitting (for point clouds that are aligned but do not have correspondences)\nscala-cli run fit.scala -- icp --pdm models/your_pdm.h5.json --input /path/to/target/data\n```\nThe tool will:\n- Load the PDM from the specified file\n- Load the from target point cloud folder\n- Fit the PDM to the target data using the specified method (posterior or ICP)\n- Save the fitted model to the output directory\n\n\nAdditional options:\n- `--output \u003cdir\u003e` - Custom output directory\n- `--iterations \u003cnumber\u003e` - Number of ICP iterations (default: 20)\n- `--visualize` - Enable UI visualization during fitting\n\n\nNote: The posterior-based fitting requires indexed point clouds, while the ICP-based fitting can be used with any point cloud.\n\n\n### Visualize PDM\n```bash\nscala-cli run visualize.scala -- /path/to/your/pdm.h5.json\n```\nThe tool will:\n- Load the PDM from the specified file\n- Visualize the mean shape and modes of variation\n\n\n\n## Dependencies\n\nThis project uses [Scalismo](https://scalismo.org/), a library for statistical shape modeling.\n\nDependencies are managed through Scala CLI directives at the top of each file:\n\n```scala\n//\u003e using scala \"3.3\"\n//\u003e using dep \"ch.unibas.cs.gravis::scalismo-ui:0.92.0\"\n```\n\n## Compiling to Java Bytecode\nYou may wish to compile the Scala fitting code to so you can run it without the need for scala and its dependencies. This is useful for deployment or distribution.\nTo compile the Scala code to a JAR file, you can use the following command:\n\n```bash\nscala-cli package --power --assembly fit.scala   --main-class PDMFittingTool   --output scalismo_fit.jar\n```\nThis all.\nAn example of how to call the JAR file is as follows:\n\n```bash\njava -jar scalismo_fit.jar icp --pdm models/your_pdm.h5.json --input /path/to/target/data\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregspangenberg%2Fpdm-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregspangenberg%2Fpdm-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregspangenberg%2Fpdm-cli/lists"}