{"id":13993962,"url":"https://github.com/nmwsharp/neural-physics-subspaces","last_synced_at":"2025-05-12T09:31:36.188Z","repository":{"id":161941486,"uuid":"634969554","full_name":"nmwsharp/neural-physics-subspaces","owner":"nmwsharp","description":"Fit low-dimensional subspaces to physical systems with neural networks (SIGGRAPH 2023)","archived":false,"fork":false,"pushed_at":"2023-05-05T20:55:19.000Z","size":11479,"stargazers_count":163,"open_issues_count":0,"forks_count":18,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-01T05:11:17.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/nmwsharp.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}},"created_at":"2023-05-01T17:06:35.000Z","updated_at":"2025-03-26T13:37:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"167d1a3a-5200-4b98-a81f-951ddff3c155","html_url":"https://github.com/nmwsharp/neural-physics-subspaces","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/nmwsharp%2Fneural-physics-subspaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Fneural-physics-subspaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Fneural-physics-subspaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Fneural-physics-subspaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmwsharp","download_url":"https://codeload.github.com/nmwsharp/neural-physics-subspaces/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253709153,"owners_count":21951110,"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-08-09T14:02:38.703Z","updated_at":"2025-05-12T09:31:31.171Z","avatar_url":"https://github.com/nmwsharp.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Data-Free Learning of Reduced-Order Kinematics (SIGGRAPH 2023)\n \n**Authors:** Nicholas Sharp, Cristian Romero, Alec Jacobson, Etienne Vouga, Paul G. Kry, David I.W. Levin, Justin Solomon\n\n![a rendering of a ball rolling on a cloth, demonstrating a reduced subspace](https://github.com/nmwsharp/neural-physics-subspaces/blob/main/media/big_teaser.png)\n\n[[project page]](https://nmwsharp.com/research/neural-physics-subspaces/)  [[PDF]](https://nmwsharp.com/media/papers/neural-physics-subspaces/neural_physics_subspaces.pdf)  [[video]](https://youtu.be/6X2inurzkrs)\n\nUse neural networks to fit low-dimensional subspaces for simulations, with no dataset needed—the method automatically explores the potential energy landscape.\n\nThis repo contains an implementation of our core procedure on some sample physical systems.\n\n## Installing\n\nThis repository is standard Python code, tested with Python 3.9 on Ubuntu 20.04, as well as OSX systems.\n\nThe most significant depenency is JAX, which can be installed according to instructions here: https://jax.readthedocs.io/en/latest/\n\nOther dependencies are all available through pip and conda. Conda `environment.yml` file is included to help resolve dependencies.\n\nThis code runs on CPUs or GPUs, although generally the GPU will be dramatically faster.\n\n## Running\n\n### Basic\n\nTo run our systems and visualize them in a GUI, call\n\n```\npython src/main_run_system.py --system_name [system_name] --problem_name [problem_name]\n```\nwhere the available systems and problems are given below. This will run the system in the full configuration space. Click on UI elements in the upper-right to run the dynamics, etc. Note that the triangular tree nodes can be expanded to yield more options.\n\n### Fitting\n\nTo fit a subspace, call the following function. See the paper for parameters for the examples we showed.\n\n```\npython src/main_learn_subspace.py --system_name [system_name] --problem_name [problem_name] --subspace_dim=8 --weight_expand=1.0 --sigma_scale=1.0 --output_dir output/\n```\n\nwhich will iterative train and dump the resulting network files to `output/`\n\n### Running fitted models\n\nOnce the subspace has been fitted, it can be loaded in to the run script as\n\n```\npython src/main_run_system.py --system_name [system_name] --problem_name [problem_name] --subspace [subspace_file_prefix]\n```\nto explore the subspace. Note that [subspace_file_prefix] should not be a full filename, but the prefix which is printed by the training script.\n\nThree quick notes about apparent performance:\n   - JAX code is JIT-compiled, so all routines will have a lag when they are called for the first time.\n   - JAX by default allocates nearly all available GPU memory at startup.\n   - This vesion of our GUI is implemented in a way which may be slow on some machines. Be wary that rendering the scene data may actually be dominating the runtime, for incidental software reasons unrelated to our algorithm. Alternate GUIs can be used to circumvent the issue if needed.\n\n\n## Physical systems\n\nThe following systems are included:\n\n- \"FEM\" -- finite elemnet deformables in 2d and 3d\n  - \"bistable\" -- 2d bistable bar\n  - \"load3d\" -- 3d cantilevered bar\n  - \"heterobeam\" -- 3d cantilevered bar with non-constant stiffness\n- \"rigid3d\" -- rigid bodies in 3d\n  - \"klann\" -- Klann linkage\n  - \"stewart\" -- Stewart mechansim\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmwsharp%2Fneural-physics-subspaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmwsharp%2Fneural-physics-subspaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmwsharp%2Fneural-physics-subspaces/lists"}