mlx3d 0.3.2__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. {mlx3d-0.3.2 → mlx3d-0.4.0}/.github/workflows/documentation.yml +3 -3
  2. {mlx3d-0.3.2 → mlx3d-0.4.0}/.github/workflows/publish.yml +6 -6
  3. {mlx3d-0.3.2 → mlx3d-0.4.0}/.github/workflows/tests.yml +7 -7
  4. mlx3d-0.4.0/CHANGELOG.md +285 -0
  5. {mlx3d-0.3.2 → mlx3d-0.4.0}/CONTRIBUTING.md +1 -1
  6. {mlx3d-0.3.2 → mlx3d-0.4.0}/PKG-INFO +33 -7
  7. {mlx3d-0.3.2 → mlx3d-0.4.0}/README.md +28 -4
  8. mlx3d-0.4.0/docs/api/models.md +12 -0
  9. mlx3d-0.4.0/docs/api/spaghetti.md +3 -0
  10. mlx3d-0.4.0/docs/assets/capture_garden_da3.jpg +0 -0
  11. mlx3d-0.4.0/docs/assets/da3_garden_depth.jpg +0 -0
  12. mlx3d-0.4.0/docs/assets/da3_garden_flythrough.mp4 +0 -0
  13. mlx3d-0.4.0/docs/assets/da3_garden_flythrough_strip.jpg +0 -0
  14. mlx3d-0.4.0/docs/assets/robust_appearance 2.jpg +0 -0
  15. mlx3d-0.4.0/docs/assets/robust_appearance.jpg +0 -0
  16. mlx3d-0.4.0/docs/assets/robust_cutout 2.jpg +0 -0
  17. mlx3d-0.4.0/docs/assets/robust_cutout.jpg +0 -0
  18. mlx3d-0.4.0/docs/assets/robust_depth_prior 2.jpg +0 -0
  19. mlx3d-0.4.0/docs/assets/robust_depth_prior.jpg +0 -0
  20. mlx3d-0.4.0/docs/assets/spaghetti_bicycle_compare.jpg +0 -0
  21. mlx3d-0.4.0/docs/assets/spaghetti_bicycle_flythrough.mp4 +0 -0
  22. mlx3d-0.4.0/docs/assets/spaghetti_bicycle_spokes.jpg +0 -0
  23. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/index.md +18 -8
  24. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/capture.md +45 -8
  25. mlx3d-0.4.0/docs/tutorials/feedforward_geometry.md +131 -0
  26. mlx3d-0.4.0/docs/tutorials/real_captures 2.md +121 -0
  27. mlx3d-0.4.0/docs/tutorials/real_captures.md +121 -0
  28. mlx3d-0.4.0/docs/tutorials/spaghetti_splatting.md +122 -0
  29. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/viewer.md +3 -3
  30. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/README.md +2 -0
  31. mlx3d-0.4.0/examples/predict_geometry.py +162 -0
  32. mlx3d-0.4.0/examples/train_spaghetti_splatting.py +161 -0
  33. {mlx3d-0.3.2 → mlx3d-0.4.0}/mkdocs.yml +5 -0
  34. {mlx3d-0.3.2 → mlx3d-0.4.0}/pyproject.toml +7 -2
  35. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/__init__.py +2 -0
  36. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/_version.py +2 -2
  37. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/capture/__init__.py +4 -0
  38. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/capture/colmap_wrap.py +4 -0
  39. mlx3d-0.4.0/src/mlx3d/capture/feedforward.py +130 -0
  40. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/capture/pipeline.py +180 -24
  41. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/capture/sfm.py +14 -2
  42. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/cli/capture.py +48 -5
  43. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/cli/eval.py +71 -10
  44. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/datasets/__init__.py +4 -0
  45. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/datasets/colmap.py +34 -0
  46. mlx3d-0.4.0/src/mlx3d/datasets/masks.py +106 -0
  47. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/losses/__init__.py +14 -1
  48. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/losses/image_metrics.py +76 -6
  49. mlx3d-0.4.0/src/mlx3d/models/__init__.py +12 -0
  50. mlx3d-0.4.0/src/mlx3d/models/_hub.py +40 -0
  51. mlx3d-0.4.0/src/mlx3d/models/_resample.py +93 -0
  52. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/__init__.py +27 -0
  53. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/alignment.py +65 -0
  54. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/backbone.py +328 -0
  55. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/camera.py +70 -0
  56. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/config.py +89 -0
  57. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/convert.py +78 -0
  58. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/head.py +206 -0
  59. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/model.py +239 -0
  60. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/prediction.py +114 -0
  61. mlx3d-0.4.0/src/mlx3d/models/depth_anything3/preprocess.py +73 -0
  62. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/renderer/points.py +5 -1
  63. mlx3d-0.4.0/src/mlx3d/splatting/spaghetti/__init__.py +31 -0
  64. mlx3d-0.4.0/src/mlx3d/splatting/spaghetti/model.py +366 -0
  65. mlx3d-0.4.0/src/mlx3d/splatting/spaghetti/projection.py +180 -0
  66. mlx3d-0.4.0/src/mlx3d/splatting/spaghetti/rasterize.py +441 -0
  67. mlx3d-0.4.0/src/mlx3d/splatting/spaghetti/render.py +119 -0
  68. mlx3d-0.4.0/src/mlx3d/splatting/spaghetti/trainer.py +279 -0
  69. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/trainer.py +278 -66
  70. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_cameras.py +4 -2
  71. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_capture.py +167 -0
  72. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_cli_eval.py +49 -0
  73. mlx3d-0.4.0/tests/test_docs_media.py +35 -0
  74. mlx3d-0.4.0/tests/test_models_da3.py +297 -0
  75. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_nerf_renderer.py +12 -0
  76. mlx3d-0.4.0/tests/test_spaghetti.py +189 -0
  77. mlx3d-0.4.0/tests/test_training_extras.py +288 -0
  78. {mlx3d-0.3.2 → mlx3d-0.4.0}/uv.lock +187 -377
  79. mlx3d-0.3.2/CHANGELOG.md +0 -135
  80. {mlx3d-0.3.2 → mlx3d-0.4.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  81. {mlx3d-0.3.2 → mlx3d-0.4.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  82. {mlx3d-0.3.2 → mlx3d-0.4.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  83. {mlx3d-0.3.2 → mlx3d-0.4.0}/.gitignore +0 -0
  84. {mlx3d-0.3.2 → mlx3d-0.4.0}/CITATION.cff +0 -0
  85. {mlx3d-0.3.2 → mlx3d-0.4.0}/CODE_OF_CONDUCT.md +0 -0
  86. {mlx3d-0.3.2 → mlx3d-0.4.0}/LICENSE +0 -0
  87. {mlx3d-0.3.2 → mlx3d-0.4.0}/Logo.jpeg +0 -0
  88. {mlx3d-0.3.2 → mlx3d-0.4.0}/SECURITY.md +0 -0
  89. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/cameras.md +0 -0
  90. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/capture.md +0 -0
  91. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/datasets.md +0 -0
  92. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/io.md +0 -0
  93. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/losses.md +0 -0
  94. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/nn.md +0 -0
  95. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/ops.md +0 -0
  96. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/renderer.md +0 -0
  97. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/splatting.md +0 -0
  98. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/structures.md +0 -0
  99. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/transforms.md +0 -0
  100. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/utils.md +0 -0
  101. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/api/viewer.md +0 -0
  102. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/capture_castle.jpg +0 -0
  103. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/fast_4dgs_juggle.mp4 +0 -0
  104. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/fast_4dgs_juggle_strip.png +0 -0
  105. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/fast_truck_diff_x50.png +0 -0
  106. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/fast_truck_fast.png +0 -0
  107. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/fast_truck_reference.png +0 -0
  108. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/gallery_gsplat.png +0 -0
  109. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/gallery_nerf.png +0 -0
  110. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/logo.jpeg +0 -0
  111. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/mlx3d-icon.png +0 -0
  112. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/mlx3d-logo.png +0 -0
  113. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/render_aa.png +0 -0
  114. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/render_lit_sphere.png +0 -0
  115. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/render_lit_torus.png +0 -0
  116. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/render_normals.png +0 -0
  117. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/render_textured.png +0 -0
  118. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/v020_lego_ngp.png +0 -0
  119. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/v020_truck_depth_hi.png +0 -0
  120. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/v020_truck_normals_hi.png +0 -0
  121. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/assets/v020_truck_render_hi.png +0 -0
  122. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/benchmarks.md +0 -0
  123. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/conventions.md +0 -0
  124. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/quickstart.md +0 -0
  125. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/extending.md +0 -0
  126. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/fast_rendering.md +0 -0
  127. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/gaussian_splatting.md +0 -0
  128. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/hashgrid_nerf.md +0 -0
  129. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/mesh_lighting.md +0 -0
  130. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/mesh_optimization.md +0 -0
  131. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/mesh_rendering.md +0 -0
  132. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/nerf.md +0 -0
  133. {mlx3d-0.3.2 → mlx3d-0.4.0}/docs/tutorials/pointcloud_fitting.md +0 -0
  134. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/benchmark.py +0 -0
  135. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/benchmark_fast_rasterization.py +0 -0
  136. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/benchmark_gaussian_splatting.py +0 -0
  137. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/extend_renderer.py +0 -0
  138. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/extract_mesh.py +0 -0
  139. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/fit_gaussians.py +0 -0
  140. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/fit_mesh.py +0 -0
  141. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/fit_nerf.py +0 -0
  142. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/fit_pointcloud.py +0 -0
  143. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/play_dynamic_gaussians.py +0 -0
  144. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/raytrace_volume.py +0 -0
  145. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/refine_pose.py +0 -0
  146. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/render_mesh.py +0 -0
  147. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/render_mesh_lit.py +0 -0
  148. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/sdf_csg.py +0 -0
  149. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/train_gaussian_splatting.py +0 -0
  150. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/train_nerf.py +0 -0
  151. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/train_ngp_nerf.py +0 -0
  152. {mlx3d-0.3.2 → mlx3d-0.4.0}/examples/validate_gaussian_gradients.py +0 -0
  153. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/cameras/__init__.py +0 -0
  154. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/cameras/cameras.py +0 -0
  155. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/capture/frames.py +0 -0
  156. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/cli/__init__.py +0 -0
  157. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/cli/compact.py +0 -0
  158. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/cli/render.py +0 -0
  159. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/datasets/blender.py +0 -0
  160. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/datasets/images.py +0 -0
  161. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/datasets/instant_ngp.py +0 -0
  162. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/io/__init__.py +0 -0
  163. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/io/gltf_io.py +0 -0
  164. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/io/image_io.py +0 -0
  165. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/io/obj_io.py +0 -0
  166. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/io/ply_io.py +0 -0
  167. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/losses/chamfer.py +0 -0
  168. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/losses/lpips.py +0 -0
  169. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/losses/mesh_losses.py +0 -0
  170. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/losses/point_mesh.py +0 -0
  171. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/nn/__init__.py +0 -0
  172. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/nn/accel.py +0 -0
  173. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/nn/fused_mlp.py +0 -0
  174. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/nn/hashgrid.py +0 -0
  175. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/nn/instant_ngp.py +0 -0
  176. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/nn/nerf.py +0 -0
  177. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/nn/occupancy.py +0 -0
  178. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/__init__.py +0 -0
  179. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/ball_query.py +0 -0
  180. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/geometry.py +0 -0
  181. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/knn.py +0 -0
  182. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/marching_cubes.py +0 -0
  183. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/ray_mesh.py +0 -0
  184. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/sample_points.py +0 -0
  185. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/sdf.py +0 -0
  186. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/ops/subdivide.py +0 -0
  187. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/py.typed +0 -0
  188. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/renderer/__init__.py +0 -0
  189. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/renderer/mesh.py +0 -0
  190. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/renderer/protocols.py +0 -0
  191. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/renderer/rasterizer.py +0 -0
  192. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/renderer/rays.py +0 -0
  193. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/renderer/shading.py +0 -0
  194. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/__init__.py +0 -0
  195. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/fast.py +0 -0
  196. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/model.py +0 -0
  197. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/projection.py +0 -0
  198. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/rasterize.py +0 -0
  199. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/reference.py +0 -0
  200. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/render.py +0 -0
  201. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/sh.py +0 -0
  202. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/splatting/tiles.py +0 -0
  203. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/structures/__init__.py +0 -0
  204. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/structures/meshes.py +0 -0
  205. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/structures/pointclouds.py +0 -0
  206. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/transforms/__init__.py +0 -0
  207. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/transforms/rotations.py +0 -0
  208. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/transforms/se3.py +0 -0
  209. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/utils/__init__.py +0 -0
  210. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/utils/primitives.py +0 -0
  211. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/viewer/__init__.py +0 -0
  212. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/viewer/__main__.py +0 -0
  213. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/viewer/server.py +0 -0
  214. {mlx3d-0.3.2 → mlx3d-0.4.0}/src/mlx3d/viewer/viewer.html +0 -0
  215. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/__init__.py +0 -0
  216. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/conftest.py +0 -0
  217. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_behavior.py +0 -0
  218. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_cli_compact.py +0 -0
  219. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_cli_render.py +0 -0
  220. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_datasets.py +0 -0
  221. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_gradcheck_rasterizer.py +0 -0
  222. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_image_io.py +0 -0
  223. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_import.py +0 -0
  224. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_io.py +0 -0
  225. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_mesh_rendering.py +0 -0
  226. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_ops_losses.py +0 -0
  227. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_ops_sdf.py +0 -0
  228. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_rasterizer.py +0 -0
  229. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_se3.py +0 -0
  230. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_smoke.py +0 -0
  231. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_splatting.py +0 -0
  232. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_splatting_fast.py +0 -0
  233. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_structures.py +0 -0
  234. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_tiles_fast_binning.py +0 -0
  235. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_transforms.py +0 -0
  236. {mlx3d-0.3.2 → mlx3d-0.4.0}/tests/test_viewer.py +0 -0
@@ -14,10 +14,10 @@ permissions:
14
14
 
15
15
  jobs:
16
16
  docs:
17
- runs-on: macos-14
17
+ runs-on: macos-15
18
18
  steps:
19
- - uses: actions/checkout@v4
20
- - uses: astral-sh/setup-uv@v5
19
+ - uses: actions/checkout@v7
20
+ - uses: astral-sh/setup-uv@v10.4.0
21
21
  with:
22
22
  python-version: "3.11"
23
23
  enable-cache: true
@@ -22,7 +22,7 @@ jobs:
22
22
  name: Build distributions
23
23
  runs-on: ubuntu-latest
24
24
  steps:
25
- - uses: actions/checkout@v4
25
+ - uses: actions/checkout@v7
26
26
  with:
27
27
  # hatch-vcs needs full history and tags to resolve the version.
28
28
  fetch-depth: 0
@@ -36,7 +36,7 @@ jobs:
36
36
  exit 1
37
37
  fi
38
38
 
39
- - uses: actions/setup-python@v5
39
+ - uses: actions/setup-python@v7
40
40
  with:
41
41
  python-version: "3.12"
42
42
 
@@ -55,7 +55,7 @@ jobs:
55
55
  fi
56
56
  echo "Built mlx3d ${expected} from tag ${GITHUB_REF_NAME}."
57
57
 
58
- - uses: actions/upload-artifact@v4
58
+ - uses: actions/upload-artifact@v7
59
59
  with:
60
60
  name: dist
61
61
  path: dist/
@@ -68,7 +68,7 @@ jobs:
68
68
  permissions:
69
69
  id-token: write # trusted publishing
70
70
  steps:
71
- - uses: actions/download-artifact@v4
71
+ - uses: actions/download-artifact@v8
72
72
  with:
73
73
  name: dist
74
74
  path: dist/
@@ -83,11 +83,11 @@ jobs:
83
83
  permissions:
84
84
  contents: write # create the release
85
85
  steps:
86
- - uses: actions/checkout@v4
86
+ - uses: actions/checkout@v7
87
87
  with:
88
88
  fetch-depth: 0
89
89
 
90
- - uses: actions/download-artifact@v4
90
+ - uses: actions/download-artifact@v8
91
91
  with:
92
92
  name: dist
93
93
  path: dist/
@@ -11,8 +11,8 @@ jobs:
11
11
  # Lint is platform-independent and needs no MLX, so run it fast on Linux.
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
- - uses: actions/checkout@v4
15
- - uses: astral-sh/setup-uv@v5
14
+ - uses: actions/checkout@v7
15
+ - uses: astral-sh/setup-uv@v10.4.0
16
16
  with:
17
17
  python-version: "3.12"
18
18
  enable-cache: true
@@ -23,15 +23,15 @@ jobs:
23
23
 
24
24
  test:
25
25
  needs: lint
26
- # macos-14+ runners are Apple Silicon, required for MLX (Metal GPU).
27
- runs-on: macos-14
26
+ # macos-15 runners are Apple Silicon, required for MLX (Metal GPU).
27
+ runs-on: macos-15
28
28
  strategy:
29
29
  fail-fast: false
30
30
  matrix:
31
- python-version: ["3.10", "3.11", "3.12"]
31
+ python-version: ["3.11", "3.12", "3.13"]
32
32
  steps:
33
- - uses: actions/checkout@v4
34
- - uses: astral-sh/setup-uv@v5
33
+ - uses: actions/checkout@v7
34
+ - uses: astral-sh/setup-uv@v10.4.0
35
35
  with:
36
36
  python-version: ${{ matrix.python-version }}
37
37
  enable-cache: true
@@ -0,0 +1,285 @@
1
+ # Changelog
2
+
3
+ ## 0.4.0
4
+
5
+ ### Added
6
+
7
+ - **Spaghetti Splatting** (`mlx3d.splatting.spaghetti`): radiance fields of
8
+ Gaussian-blurred line segments (Shramko et al., 2026), a strict superset of
9
+ 3DGS that represents hair, wires, spokes and grass with far fewer
10
+ primitives. Custom Metal forward/backward rasterizer that evaluates the
11
+ paper's closed-form segment optical depth exactly per pixel (in the
12
+ kernel's whitened space, robust for thin kernels), with opacity-aware
13
+ footprint ellipses for binning and early rejection, and SIMD-group-reduced
14
+ gradient atomics (10x faster backward). `SpaghettiModel` (PLY IO, 3DGS
15
+ lift, polyline extraction), `SpaghettiTrainer` (3DGS-MCMC-style relocation
16
+ and growth with exact split / clone moves, endpoint attraction and
17
+ merging into polylines), and `examples/train_spaghetti_splatting.py` for
18
+ COLMAP scenes with a like-for-like 3DGS comparison. Validated against
19
+ numerical quadrature (4e-5), a dense MLX reference (1e-6) and autodiff
20
+ gradients (1e-5).
21
+ - Foreground masks for Gaussian training (#28): `load_colmap(masks_dir=...,
22
+ masks_from_alpha=...)` loads COLMAP-layout masks (`<name>.png` or
23
+ `<stem>.png`; grayscale / RGB / RGBA) or the images' own alpha into a
24
+ `MaskCollection` aligned with every cache mode and downscale, failing early
25
+ on missing, empty or mis-sized masks. `GaussianTrainer.step(..., mask=)`
26
+ supports `alpha_mode="masked"` (coverage-normalized L1 + mask-aware SSIM;
27
+ background pixels get no loss or gradient; 2DGS geometry losses restricted
28
+ to the mask) and `"transparent"` (mask = target opacity: alpha supervision,
29
+ target composited over an optionally random background).
30
+ - Mask-aware metrics `masked_l1`, `masked_psnr`, `masked_ssim` and a per-pixel
31
+ `ssim_map`; `mlx3d-eval --masks / --masks-from-alpha / --alpha-mode` reports
32
+ the matching metrics plus coverage, alpha MAE and foreground IoU.
33
+ - Per-view appearance compensation (`TrainerConfig.appearance`): a learnable
34
+ affine color transform per image absorbs exposure / white-balance changes.
35
+ - Geometry priors: `TrainerConfig.lambda_depth_prior` (scale/shift-invariant
36
+ Pearson depth correlation) and `lambda_normal_prior` (normals of rendered vs
37
+ prior depth) with `step(..., depth_prior=)`.
38
+ - `mlx3d-capture --masks / --masks-from-alpha / --alpha-mode / --mask-sfm /
39
+ --appearance / --depth-prior`. The DA3 pose stage now saves per-frame depth
40
+ maps (`<out>/depth/`) for the priors; `--mask-sfm` opts into masked feature
41
+ extraction for COLMAP and the built-in SfM.
42
+ - "Training on Real Captures" tutorial.
43
+ - `mlx3d.models.DepthAnything3`: an MLX port of the Depth Anything 3
44
+ feed-forward geometry model. From any number of views of a static scene,
45
+ one forward pass predicts per-view depth, confidence, intrinsics and
46
+ world-to-camera poses (`GeometryPrediction`, with `cameras()`,
47
+ `world_points()`, `point_cloud()` and `to_pointclouds()` helpers). Loads the
48
+ official checkpoints (`da3-small` / `da3-base`, Apache-2.0; `da3-large`,
49
+ CC BY-NC) through an exhaustive, strict weight conversion; backbone in
50
+ float32 or half precision, and matches the official PyTorch implementation
51
+ to ~1e-6 relative error on every output. Sequences longer than
52
+ `max_views` run in anchored chunks aligned by a similarity fit on shared anchor cameras.
53
+ Weight downloads need the new optional `[models]` extra (`huggingface_hub`).
54
+ - `mlx3d-capture --poses da3 [--pose-model da3-small]`: feed-forward camera
55
+ poses and a dense fused point cloud as the capture pipeline's pose stage
56
+ (`mlx3d.capture.run_feedforward_poses`), with joint pose refinement on by
57
+ default.
58
+ - `examples/predict_geometry.py`: photos → depth maps, fused `points.ply`,
59
+ and a fly-through video; plus the "Photos → Depth & Cameras" tutorial.
60
+
61
+ ### Added
62
+
63
+ - Foreground masks for Gaussian training (#28): `load_colmap(masks_dir=...,
64
+ masks_from_alpha=...)` loads COLMAP-layout masks (`<name>.png` or
65
+ `<stem>.png`; grayscale / RGB / RGBA) or the images' own alpha into a
66
+ `MaskCollection` aligned with every cache mode and downscale, failing early
67
+ on missing, empty or mis-sized masks. `GaussianTrainer.step(..., mask=)`
68
+ supports `alpha_mode="masked"` (coverage-normalized L1 + mask-aware SSIM;
69
+ background pixels get no loss or gradient; 2DGS geometry losses restricted
70
+ to the mask) and `"transparent"` (mask = target opacity: alpha supervision,
71
+ target composited over an optionally random background).
72
+ - Mask-aware metrics `masked_l1`, `masked_psnr`, `masked_ssim` and a per-pixel
73
+ `ssim_map`; `mlx3d-eval --masks / --masks-from-alpha / --alpha-mode` reports
74
+ the matching metrics plus coverage, alpha MAE and foreground IoU.
75
+ - Per-view appearance compensation (`TrainerConfig.appearance`): a learnable
76
+ affine color transform per image absorbs exposure / white-balance changes.
77
+ - Geometry priors: `TrainerConfig.lambda_depth_prior` (scale/shift-invariant
78
+ Pearson depth correlation) and `lambda_normal_prior` (normals of rendered vs
79
+ prior depth) with `step(..., depth_prior=)`.
80
+ - `mlx3d-capture --masks / --masks-from-alpha / --alpha-mode / --mask-sfm /
81
+ --appearance / --depth-prior`. The DA3 pose stage now saves per-frame depth
82
+ maps (`<out>/depth/`) for the priors; `--mask-sfm` opts into masked feature
83
+ extraction for COLMAP and the built-in SfM.
84
+ - "Training on Real Captures" tutorial.
85
+ - `mlx3d.models.DepthAnything3`: an MLX port of the Depth Anything 3
86
+ feed-forward geometry model. From any number of views of a static scene,
87
+ one forward pass predicts per-view depth, confidence, intrinsics and
88
+ world-to-camera poses (`GeometryPrediction`, with `cameras()`,
89
+ `world_points()`, `point_cloud()` and `to_pointclouds()` helpers). Loads the
90
+ official checkpoints (`da3-small` / `da3-base`, Apache-2.0; `da3-large`,
91
+ CC BY-NC) through an exhaustive, strict weight conversion; backbone in
92
+ float32 or half precision, and matches the official PyTorch implementation
93
+ to ~1e-6 relative error on every output. Sequences longer than
94
+ `max_views` run in anchored chunks aligned by a similarity fit on shared anchor cameras.
95
+ Weight downloads need the new optional `[models]` extra (`huggingface_hub`).
96
+ - `mlx3d-capture --poses da3 [--pose-model da3-small]`: feed-forward camera
97
+ poses and a dense fused point cloud as the capture pipeline's pose stage
98
+ (`mlx3d.capture.run_feedforward_poses`), with joint pose refinement on by
99
+ default.
100
+ - `examples/predict_geometry.py`: photos → depth maps, fused `points.ply`,
101
+ and a fly-through video; plus the "Photos → Depth & Cameras" tutorial.
102
+
103
+ ### Changed
104
+
105
+ - Python 3.11 or newer is required (3.10 reached end of life in October 2026,
106
+ and the patched Pillow and filelock releases need 3.11). CI now tests 3.11,
107
+ 3.12 and 3.13.
108
+ - `mlx3d-capture --poses auto` now prefers Depth Anything 3 when the
109
+ `[models]` extra is installed, then COLMAP, then the built-in SfM.
110
+ - `mlx3d-capture` initializes splat scales from nearest-neighbor spacing
111
+ against up to 100k reference points (was 10k). On dense clouds the old
112
+ subsample inflated every initial splat several-fold, making early training
113
+ steps up to ~10x slower.
114
+
115
+ ### Fixed
116
+
117
+ - Normal-based losses (the 2DGS normal-consistency loss and the new normal
118
+ prior) produced NaN gradients wherever a pixel's depth tangents vanish
119
+ (empty background): `linalg.norm` has a NaN gradient at zero, which a zero
120
+ mask weight does not cancel. Normalization is now zero-safe.
121
+ - `render_points` rendered blank images when any point was behind the camera:
122
+ its soft z-weights were normalized against the nearest point including
123
+ culled ones, which underflowed every visible weight.
124
+ - Resumed captures forgot where their poses came from (reported only as
125
+ "existing"), so built-in SfM / DA3 poses lost joint pose refinement on a
126
+ re-run. The pose source is now recorded in `<out>/poses.json`.
127
+ - `--poses auto` falls back to COLMAP / the built-in SfM when Depth Anything 3
128
+ cannot load (e.g. offline before the one-time weight download) instead of
129
+ failing the capture.
130
+ - Broken images on the Interactive Viewer docs page (raw HTML paths were not
131
+ relative to the page's served URL); a new test checks every raw-HTML media
132
+ path in the docs.
133
+ - CI: macOS jobs moved to `macos-15` (GitHub retired the `macos-14` image, so
134
+ every macOS test and docs-deploy job was being cancelled), and all actions
135
+ moved to their Node 24 majors.
136
+
137
+ ### Security
138
+
139
+ - Lockfile upgrades for the open Dependabot alerts: Pillow 13.0.0, filelock
140
+ 4.3.1, pymdown-extensions >= 12.3, mkdocs-material 9.8.2.
141
+
142
+ ## 0.3.2
143
+
144
+ ### Changed
145
+
146
+ - Faster Gaussian tile binning (`bin_gaussians`), on the critical path of every
147
+ render and training step. The default path now fuses expansion and
148
+ range-finding into two Metal kernels — tile duplicates are emitted in depth
149
+ order so only a stable 32-bit tile-key sort is needed, and per-tile ranges are
150
+ recovered by boundary detection instead of a scatter-min/max pass — replacing
151
+ the int64 composite-key argsort. Bit-identical output; ~2.5× faster binning
152
+ and ~26% faster forward rendering on a 500k-Gaussian scene at 1080p (so
153
+ viewers, evaluation, capture previews, and every training forward speed up).
154
+
155
+ ### Added
156
+
157
+ - Type support: mlx3d now ships a `py.typed` marker, so downstream projects
158
+ get its inline type hints under mypy / pyright.
159
+ - Finite-difference gradient check for the Metal Gaussian rasterizer's
160
+ hand-written backward pass (`examples/validate_gaussian_gradients.py` plus a
161
+ `unit` test). Confirms the analytic gradients match numerical derivatives
162
+ (geometry to ~1e-2, appearance to ~1e-3), a runnable correctness artifact on
163
+ Apple Silicon.
164
+
165
+ ### Security
166
+
167
+ - Pillow, certifi and urllib3 bumped for Dependabot alerts (#29).
168
+
169
+ ## 0.3.0
170
+
171
+ ### Added
172
+
173
+ - Fast forward-only Gaussian rasterization (`FastGaussianRenderer`,
174
+ `render_gaussians_fast`), adapting the geometry-shader-style pipeline of
175
+ dendenxu/fast-gaussian-rasterization to Metal compute: a fused per-Gaussian
176
+ geometry kernel, duplicates emitted in globally depth-sorted order (stable
177
+ 32-bit tile sort), boundary-detection tile ranges, fp16 splat colors, and
178
+ zero mid-frame CPU/GPU synchronization via persistent grow-on-demand
179
+ buffers. 1.5–2× faster than the training rasterizer on real scenes (up to
180
+ 3.7× at high pixel-to-point ratios) at 45+ dB PSNR parity; not
181
+ differentiable (training keeps `render_gaussians`). Exposed as
182
+ `mlx3d-view --fast` and `mlx3d-render --fast`.
183
+ - Dynamic (4D) Gaussian sequence playback: `FastGaussianRenderer.update()`
184
+ swaps per-timestep arrays cheaply;
185
+ `examples/play_dynamic_gaussians.py` streams a Dynamic 3D Gaussians
186
+ `params.npz` at 67 fps (vs 40 fps on the training path) with GIF/frame
187
+ export. New `examples/benchmark_fast_rasterization.py` reports
188
+ latency/FPS/PSNR on synthetic scenes or any 3DGS `.ply`.
189
+ - `mlx3d-capture`: a one-command capture pipeline (photos directory or video
190
+ file → camera poses → 3D Gaussian Splatting with a live browser viewer → a
191
+ compacted `splat.ply`). Stages are cached and resumable; `--quality
192
+ fast/balanced/best` presets pick iterations, resolution, frame count and SH
193
+ degree. Python API in `mlx3d.capture` (`run_capture`, `CaptureConfig`).
194
+ - Built-in COLMAP-free structure-from-motion (`mlx3d.capture.run_sfm`): SIFT +
195
+ ratio matching, essential-matrix initialization, incremental PnP-RANSAC
196
+ registration, filtered triangulation, and periodic sparse bundle adjustment
197
+ with shared-focal refinement (EXIF 35mm-equivalent prior when available).
198
+ Requires the new optional `[capture]` extra (OpenCV + SciPy). A thin COLMAP
199
+ CLI wrapper (`mlx3d.capture.run_colmap`) is preferred automatically when the
200
+ binary is installed.
201
+ - Video ingestion for captures: ffmpeg-based even sampling with automatic
202
+ motion-blur filtering (sharpest frame per time bucket by variance of
203
+ Laplacian).
204
+ - `GaussianTrainer.step` accepts an optional per-view SE(3) twist and returns
205
+ its gradient, enabling BARF-style joint pose refinement during training. The
206
+ capture pipeline turns this on automatically for built-in SfM poses and
207
+ exports the refined poses as a COLMAP model.
208
+ - `save_colmap`: binary COLMAP sparse-model writer (inverse of `load_colmap`),
209
+ with intrinsics deduplication and PINHOLE/OPENCV/OPENCV_FISHEYE support.
210
+
211
+ ### Packaging
212
+
213
+ - Tag-driven releases: the version comes from the git tag (hatch-vcs) and
214
+ pushing a `v*` tag builds and publishes to PyPI (#25).
215
+
216
+ ## 0.2.1
217
+
218
+ ### Added
219
+
220
+ - SDF utilities in `mlx3d.ops`: analytic primitives (`sdf_sphere`, `sdf_box`,
221
+ `sdf_torus`, `sdf_plane`), constructive-solid-geometry operators
222
+ (`sdf_union`, `sdf_intersection`, `sdf_difference` and smooth `sdf_smooth_*`
223
+ variants), and `sample_sdf_grid` / `sdf_to_mesh` to turn an SDF callable into
224
+ a mesh via marching cubes. All pure-MLX and differentiable w.r.t. shape
225
+ parameters. New `examples/sdf_csg.py` shows CSG modeling through to a render.
226
+
227
+ ### Fixed
228
+
229
+ - NeRF training: the classic `NeRF` model used a ReLU density activation that
230
+ dies at initialization (density 0 everywhere, zero gradients), so the network
231
+ never trained. Switched to softplus; added a regression test.
232
+ - Soft mesh rasterizer (`render_mesh_soft`): per-chunk accumulators are now
233
+ evaluated each iteration so intermediates are freed between chunks. Peak
234
+ memory for dense meshes is bounded (a 46k-face mesh at 256² went from OOM on
235
+ 16 GB to ~1.2 GB) while staying fully differentiable.
236
+ - `marching_cubes` now welds duplicate crossing-point vertices (≈5× fewer verts
237
+ on a 64³ grid) and drops collapsed faces, cutting downstream memory and cost.
238
+ - `examples/extract_mesh.py` visualizes dense meshes with the O(H·W) hard
239
+ rasterizer instead of the soft renderer (68 s + OOM → ~0.4 s).
240
+
241
+ ### Packaging
242
+
243
+ - Added a standard `project.optional-dependencies` `dev` extra so
244
+ `pip install -e ".[dev]"` works with any installer (the PEP 735
245
+ `dependency-groups` entry is kept for `uv sync`). Documented both dev setups,
246
+ including the uv-venv `pip` caveat, in the README.
247
+
248
+ ## 0.2.0
249
+
250
+ ### Added
251
+
252
+ - Arbitrary-channel Gaussian feature rendering through the existing Metal
253
+ rasterizer, with alpha-composited and normalized expected-feature modes.
254
+ - Mip-Splatting-style opacity compensation for anti-aliased Gaussian rendering,
255
+ available from render APIs and Gaussian Splatting training.
256
+ - glTF scene loading across default-scene nodes and triangle primitives,
257
+ including node transforms, UVs, material IDs, and PBR base-color summaries.
258
+ - glTF base-color texture loading for embedded/data-URI and external image
259
+ assets, wired into `mlx3d-render` for textured mesh previews.
260
+ - glTF metallic/roughness factor import, with `mlx3d-render --shading pbr`
261
+ forwarding uniform material factors into the PBR mesh shader.
262
+ - glTF export of self-contained GLB assets with embedded base-color PNG
263
+ textures.
264
+ - glTF export of UV coordinates and a simple PBR base color material.
265
+ - `mlx3d-render` CLI for rendering Gaussian checkpoints and mesh assets to
266
+ RGB, depth, or normal images.
267
+ - `mlx3d-eval` CLI for deterministic Gaussian checkpoint evaluation with PSNR,
268
+ SSIM, L1, per-view metrics, and JSON output.
269
+ - Gaussian checkpoint compaction by opacity/footprint importance, Gaussian
270
+ count cap, and optional spherical-harmonic degree truncation.
271
+ - `mlx3d-compact` CLI for checkpoint pruning and SH-degree truncation.
272
+ - Opt-in 2DGS depth-variance and normal-depth consistency regularizers that
273
+ reuse the differentiable Metal-backed feature rasterizer.
274
+ - 2DGS surfel extraction helpers on `GaussianModel`, including a Poisson
275
+ reconstruction wrapper for mesh extraction from oriented Gaussian disks.
276
+ - 3DGUT-style Unscented Transform Gaussian projection for distortion-aware
277
+ rendering/training with `projection="ut"` and `--projection ut`.
278
+ - PBR-style Cook-Torrance/GGX mesh shading with roughness and metallic controls.
279
+ - Morton-order face sorting for ray-mesh intersection, improving chunk-level
280
+ AABB culling on arbitrarily ordered meshes while preserving original face IDs.
281
+
282
+ ### Fixed
283
+
284
+ - Aligned Gaussian depth rasterization with the RGB kernel's early-transmittance
285
+ cutoff semantics.
@@ -5,7 +5,7 @@ docs fixes and pull requests are all welcome.
5
5
 
6
6
  ## Getting set up
7
7
 
8
- You need an Apple Silicon Mac (MLX runs on the Metal GPU) and Python ≥ 3.10.
8
+ You need an Apple Silicon Mac (MLX runs on the Metal GPU) and Python ≥ 3.11.
9
9
  Development uses [uv](https://docs.astral.sh/uv/):
10
10
 
11
11
  ```bash
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: mlx3d
3
- Version: 0.3.2
3
+ Version: 0.4.0
4
4
  Summary: Differentiable 3D computer vision on Apple Silicon, built on MLX
5
5
  Project-URL: Homepage, https://github.com/amirhossein-razlighi/mlx3D
6
6
  Project-URL: Documentation, https://amirhossein-razlighi.github.io/mlx3D/
@@ -15,12 +15,12 @@ Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: MacOS :: MacOS X
16
16
  Classifier: Programming Language :: Python :: 3
17
17
  Classifier: Programming Language :: Python :: 3 :: Only
18
- Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Topic :: Multimedia :: Graphics
22
22
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
- Requires-Python: >=3.10
23
+ Requires-Python: >=3.11
24
24
  Requires-Dist: mlx>=0.31.0; platform_system == 'Darwin' and platform_machine == 'arm64'
25
25
  Requires-Dist: numpy>=1.24
26
26
  Requires-Dist: pillow>=10.0
@@ -33,6 +33,8 @@ Requires-Dist: mkdocs-material>=9.5; extra == 'dev'
33
33
  Requires-Dist: mkdocstrings[python]>=0.24; extra == 'dev'
34
34
  Requires-Dist: pytest>=8.0; extra == 'dev'
35
35
  Requires-Dist: ruff>=0.5; extra == 'dev'
36
+ Provides-Extra: models
37
+ Requires-Dist: huggingface-hub>=0.24; extra == 'models'
36
38
  Description-Content-Type: text/markdown
37
39
 
38
40
  <p align="center">
@@ -63,7 +65,10 @@ MLX3D brings the PyTorch3D workflow to Macs: batched 3D data structures, cameras
63
65
  - **NeRF** — positional encoding, the NeRF MLP, stratified + hierarchical sampling, volume rendering, Blender-synthetic dataset loader.
64
66
  - **Mesh rendering** — differentiable soft triangle rasterization, UV texture sampling for OBJ/MTL assets, and scalar-field mesh extraction.
65
67
  - **Gaussian Splatting** — a Metal translation of the reference CUDA rasterizer (tile-based forward & backward kernels wrapped in `mx.custom_function`), EWA projection, spherical harmonics, anti-aliased and arbitrary feature rendering, adaptive density control, COLMAP loading, and standard 3DGS `.ply` checkpoints. ~30 FPS forward at 720p with 100k Gaussians on an M-series GPU.
68
+ - **Feed-forward geometry** — [Depth Anything 3](https://amirhossein-razlighi.github.io/mlx3D/tutorials/feedforward_geometry/) on the Apple GPU: any number of photos → per-view depth, confidence, intrinsics and poses in one forward pass, with official Apache-2.0 weights, fused point clouds, and anchored chunking for long videos.
69
+ - **Real-world training** — foreground masks (masked or transparent cut-out modes), per-image exposure compensation, and depth / normal priors from Depth Anything 3.
66
70
  - **Capture pipeline** — `mlx3d-capture photos_or_video` goes from raw photos or a phone video to a trained splat in one resumable command: sharp-frame selection, COLMAP or built-in COLMAP-free SfM (with joint pose refinement during training), live training preview, and a compacted `.ply` export.
71
+ - **Spaghetti Splatting** — [curve-segment splats](https://amirhossein-razlighi.github.io/mlx3D/tutorials/spaghetti_splatting/) (Shramko et al., 2026), a strict superset of 3DGS for spokes, cables, hair and grass: exact closed-form per-pixel rasterization in custom Metal kernels, MCMC training with exact split/clone moves, and polyline extraction.
67
72
  - **Fast splat viewing** — a forward-only rasterization path (`FastGaussianRenderer`, `mlx3d-view --fast`) with fused Metal geometry kernels, cross-frame caching, and sync-free frames: 1.5–2× faster than the training rasterizer on real scenes (up to 3.7× for large splats) at 45+ dB parity, and 67 fps playback of dynamic **4D Gaussian** sequences.
68
73
  - **Interactive viewer** — `mlx3d-view point_cloud.ply` opens a browser viewer with orbit/pan/zoom; frames are rendered on the Apple GPU by the Metal rasterizer and streamed live. Works for NeRFs too.
69
74
  - **IO** — OBJ and PLY (ascii + binary, including Gaussian Splatting checkpoint layouts), plus one-line image `save_image` / `load_image` for any renderer output.
@@ -75,7 +80,7 @@ MLX3D brings the PyTorch3D workflow to Macs: batched 3D data structures, cameras
75
80
  pip install mlx3d
76
81
  ```
77
82
 
78
- Requires an Apple Silicon Mac and Python ≥ 3.10.
83
+ Requires an Apple Silicon Mac and Python ≥ 3.11.
79
84
 
80
85
  ## Photos → splat in minutes
81
86
 
@@ -95,9 +100,11 @@ mlx3d-capture ./my_photos/ # or: mlx3d-capture walkaround.mp4
95
100
  This runs the whole pipeline: frame extraction (with automatic motion-blur
96
101
  filtering for video) → camera poses → 3DGS training with a **live browser
97
102
  viewer** → a compacted `splat.ply` you can open in any splat viewer. Poses
98
- come from COLMAP when it's installed (`brew install colmap`); otherwise
99
- mlx3d's **built-in COLMAP-free SfM** (`pip install "mlx3d[capture]"`) handles
100
- them and the trainer refines poses jointly with the splats. Stages are cached,
103
+ come from feed-forward **Depth Anything 3** by default
104
+ (`pip install "mlx3d[models]"`), otherwise from COLMAP when it's installed
105
+ (`brew install colmap`) or mlx3d's **built-in COLMAP-free SfM**
106
+ (`pip install "mlx3d[capture]"`); the trainer refines estimated poses jointly
107
+ with the splats. Stages are cached,
101
108
  so re-runs resume where they left off.
102
109
 
103
110
  ```bash
@@ -145,6 +152,25 @@ renderer = FastGaussianRenderer(model) # caches activations, covariances, SH
145
152
  out = renderer.render(camera) # forward-only: {"image", "alpha"}
146
153
  ```
147
154
 
155
+ Predict depth and cameras for a set of photos in one forward pass:
156
+
157
+ ```python
158
+ from mlx3d.models import DepthAnything3
159
+
160
+ model = DepthAnything3.from_pretrained("da3-base") # pip install "mlx3d[models]"
161
+ pred = model.predict(["0.jpg", "1.jpg", "2.jpg"])
162
+ pred.depth, pred.cameras() # (S, H, W) depth, list[Camera]
163
+ points, colors = pred.point_cloud() # fused colored point cloud
164
+ ```
165
+
166
+ <p align="center">
167
+ <img src="./docs/assets/da3_garden_depth.jpg" width="90%" alt="Garden photos and their Depth Anything 3 depth maps" />
168
+ <br/>
169
+ <img src="./docs/assets/da3_garden_flythrough_strip.jpg" width="90%" alt="Point cloud fused from 24 predicted depth maps" />
170
+ <br/>
171
+ <em>Depth Anything 3 on the Apple GPU: 24 photos → depth and cameras in 5 s (top), fused into one point cloud through the predicted poses (bottom).</em>
172
+ </p>
173
+
148
174
  More in the docs: [mesh optimization](https://amirhossein-razlighi.github.io/mlx3D/tutorials/mesh_optimization/), [point cloud fitting](https://amirhossein-razlighi.github.io/mlx3D/tutorials/pointcloud_fitting/), [NeRF](https://amirhossein-razlighi.github.io/mlx3D/tutorials/nerf/), [Gaussian Splatting](https://amirhossein-razlighi.github.io/mlx3D/tutorials/gaussian_splatting/).
149
175
 
150
176
  ## Gallery
@@ -26,7 +26,10 @@ MLX3D brings the PyTorch3D workflow to Macs: batched 3D data structures, cameras
26
26
  - **NeRF** — positional encoding, the NeRF MLP, stratified + hierarchical sampling, volume rendering, Blender-synthetic dataset loader.
27
27
  - **Mesh rendering** — differentiable soft triangle rasterization, UV texture sampling for OBJ/MTL assets, and scalar-field mesh extraction.
28
28
  - **Gaussian Splatting** — a Metal translation of the reference CUDA rasterizer (tile-based forward & backward kernels wrapped in `mx.custom_function`), EWA projection, spherical harmonics, anti-aliased and arbitrary feature rendering, adaptive density control, COLMAP loading, and standard 3DGS `.ply` checkpoints. ~30 FPS forward at 720p with 100k Gaussians on an M-series GPU.
29
+ - **Feed-forward geometry** — [Depth Anything 3](https://amirhossein-razlighi.github.io/mlx3D/tutorials/feedforward_geometry/) on the Apple GPU: any number of photos → per-view depth, confidence, intrinsics and poses in one forward pass, with official Apache-2.0 weights, fused point clouds, and anchored chunking for long videos.
30
+ - **Real-world training** — foreground masks (masked or transparent cut-out modes), per-image exposure compensation, and depth / normal priors from Depth Anything 3.
29
31
  - **Capture pipeline** — `mlx3d-capture photos_or_video` goes from raw photos or a phone video to a trained splat in one resumable command: sharp-frame selection, COLMAP or built-in COLMAP-free SfM (with joint pose refinement during training), live training preview, and a compacted `.ply` export.
32
+ - **Spaghetti Splatting** — [curve-segment splats](https://amirhossein-razlighi.github.io/mlx3D/tutorials/spaghetti_splatting/) (Shramko et al., 2026), a strict superset of 3DGS for spokes, cables, hair and grass: exact closed-form per-pixel rasterization in custom Metal kernels, MCMC training with exact split/clone moves, and polyline extraction.
30
33
  - **Fast splat viewing** — a forward-only rasterization path (`FastGaussianRenderer`, `mlx3d-view --fast`) with fused Metal geometry kernels, cross-frame caching, and sync-free frames: 1.5–2× faster than the training rasterizer on real scenes (up to 3.7× for large splats) at 45+ dB parity, and 67 fps playback of dynamic **4D Gaussian** sequences.
31
34
  - **Interactive viewer** — `mlx3d-view point_cloud.ply` opens a browser viewer with orbit/pan/zoom; frames are rendered on the Apple GPU by the Metal rasterizer and streamed live. Works for NeRFs too.
32
35
  - **IO** — OBJ and PLY (ascii + binary, including Gaussian Splatting checkpoint layouts), plus one-line image `save_image` / `load_image` for any renderer output.
@@ -38,7 +41,7 @@ MLX3D brings the PyTorch3D workflow to Macs: batched 3D data structures, cameras
38
41
  pip install mlx3d
39
42
  ```
40
43
 
41
- Requires an Apple Silicon Mac and Python ≥ 3.10.
44
+ Requires an Apple Silicon Mac and Python ≥ 3.11.
42
45
 
43
46
  ## Photos → splat in minutes
44
47
 
@@ -58,9 +61,11 @@ mlx3d-capture ./my_photos/ # or: mlx3d-capture walkaround.mp4
58
61
  This runs the whole pipeline: frame extraction (with automatic motion-blur
59
62
  filtering for video) → camera poses → 3DGS training with a **live browser
60
63
  viewer** → a compacted `splat.ply` you can open in any splat viewer. Poses
61
- come from COLMAP when it's installed (`brew install colmap`); otherwise
62
- mlx3d's **built-in COLMAP-free SfM** (`pip install "mlx3d[capture]"`) handles
63
- them and the trainer refines poses jointly with the splats. Stages are cached,
64
+ come from feed-forward **Depth Anything 3** by default
65
+ (`pip install "mlx3d[models]"`), otherwise from COLMAP when it's installed
66
+ (`brew install colmap`) or mlx3d's **built-in COLMAP-free SfM**
67
+ (`pip install "mlx3d[capture]"`); the trainer refines estimated poses jointly
68
+ with the splats. Stages are cached,
64
69
  so re-runs resume where they left off.
65
70
 
66
71
  ```bash
@@ -108,6 +113,25 @@ renderer = FastGaussianRenderer(model) # caches activations, covariances, SH
108
113
  out = renderer.render(camera) # forward-only: {"image", "alpha"}
109
114
  ```
110
115
 
116
+ Predict depth and cameras for a set of photos in one forward pass:
117
+
118
+ ```python
119
+ from mlx3d.models import DepthAnything3
120
+
121
+ model = DepthAnything3.from_pretrained("da3-base") # pip install "mlx3d[models]"
122
+ pred = model.predict(["0.jpg", "1.jpg", "2.jpg"])
123
+ pred.depth, pred.cameras() # (S, H, W) depth, list[Camera]
124
+ points, colors = pred.point_cloud() # fused colored point cloud
125
+ ```
126
+
127
+ <p align="center">
128
+ <img src="./docs/assets/da3_garden_depth.jpg" width="90%" alt="Garden photos and their Depth Anything 3 depth maps" />
129
+ <br/>
130
+ <img src="./docs/assets/da3_garden_flythrough_strip.jpg" width="90%" alt="Point cloud fused from 24 predicted depth maps" />
131
+ <br/>
132
+ <em>Depth Anything 3 on the Apple GPU: 24 photos → depth and cameras in 5 s (top), fused into one point cloud through the predicted poses (bottom).</em>
133
+ </p>
134
+
111
135
  More in the docs: [mesh optimization](https://amirhossein-razlighi.github.io/mlx3D/tutorials/mesh_optimization/), [point cloud fitting](https://amirhossein-razlighi.github.io/mlx3D/tutorials/pointcloud_fitting/), [NeRF](https://amirhossein-razlighi.github.io/mlx3D/tutorials/nerf/), [Gaussian Splatting](https://amirhossein-razlighi.github.io/mlx3D/tutorials/gaussian_splatting/).
112
136
 
113
137
  ## Gallery
@@ -0,0 +1,12 @@
1
+ # mlx3d.models
2
+
3
+ Pretrained 3D foundation models. Install the `models` extra to download
4
+ weights: `pip install "mlx3d[models]"`.
5
+
6
+ ::: mlx3d.models.depth_anything3.DepthAnything3
7
+
8
+ ::: mlx3d.models.depth_anything3.GeometryPrediction
9
+
10
+ ::: mlx3d.models.depth_anything3.DA3Config
11
+
12
+ ::: mlx3d.models.depth_anything3.convert_checkpoint
@@ -0,0 +1,3 @@
1
+ # mlx3d.splatting.spaghetti
2
+
3
+ ::: mlx3d.splatting.spaghetti
@@ -20,18 +20,28 @@ MLX3D brings the PyTorch3D workflow to Macs: batched 3D data structures, cameras
20
20
  - **NeRF** — positional encoding, the NeRF MLP, stratified + hierarchical sampling and volume rendering, with a training script for the Blender synthetic scenes.
21
21
  - **Mesh rendering** — differentiable soft triangle rasterization, OBJ/MTL texture loading and UV sampling, plus scalar-field mesh extraction.
22
22
  - **3D Gaussian Splatting** — a Metal translation of the reference CUDA rasterizer: tile-based forward and backward kernels wrapped in `mx.custom_function`, EWA and 3DGUT-style UT projection, spherical harmonics, anti-aliased and arbitrary feature rendering, adaptive density control, COLMAP loading, and standard `.ply` checkpoints viewable in any splat viewer.
23
+ - **Feed-forward geometry** — [Depth Anything 3](tutorials/feedforward_geometry.md): photos → per-view depth, intrinsics and poses in one forward pass, with official pretrained weights.
24
+ - **Real-world training** — [foreground masks](tutorials/real_captures.md) (masked or transparent cut-out), per-image exposure compensation, and depth / normal priors.
25
+ - **Spaghetti Splatting** — [curve-segment primitives](tutorials/spaghetti_splatting.md) for thin structures, a strict superset of 3DGS.
23
26
  - **Interactive viewer** — [`mlx3d-view`](viewer.md) opens any 3DGS checkpoint in the browser with orbit/pan/zoom, rendered live by the Metal kernels; NeRFs are supported too.
24
27
  - **IO** — OBJ and PLY (ascii/binary) loading and saving, including 3DGS checkpoint layouts.
25
28
 
26
- ## What is new in 0.2.0
29
+ ## What's new
27
30
 
28
- <p align="center"><img src="assets/v020_truck_render_hi.png" width="88%" /></p>
31
+ <p align="center"><img src="assets/da3_garden_depth.jpg" width="88%" alt="Garden photos and their Depth Anything 3 depth maps" /></p>
29
32
 
30
- The 0.2.0 release focuses on production use: `mlx3d-render`, `mlx3d-eval`,
31
- and `mlx3d-compact` CLIs; textured glTF import/export; PBR-style mesh shading;
32
- 2DGS geometry regularizers and surfel extraction helpers; Mip-Splatting-style
33
- anti-aliasing; arbitrary-channel Gaussian feature rendering; and a
34
- 3DGUT-style Unscented Transform projection path for distorted/fisheye cameras.
33
+ - **Photos → splat in one command** — [`mlx3d-capture`](tutorials/capture.md)
34
+ turns a photo folder or phone video into a trained splat, with poses from
35
+ [Depth Anything 3](tutorials/feedforward_geometry.md), COLMAP or a built-in SfM.
36
+ - **Feed-forward geometry** — depth, intrinsics and poses for any number of
37
+ photos in one forward pass, matching the official implementation to ~1e-6.
38
+ - **Real-world training** — [foreground masks, exposure compensation and depth
39
+ priors](tutorials/real_captures.md) for phone captures.
40
+ - **Fast viewing** — a [forward-only rasterizer](tutorials/fast_rendering.md)
41
+ 1.5–2× faster than the training path, including 4D sequence playback.
42
+
43
+ See the [changelog](https://github.com/amirhossein-razlighi/mlx3D/blob/main/CHANGELOG.md)
44
+ for everything in each release.
35
45
 
36
46
  ## Installation
37
47
 
@@ -39,7 +49,7 @@ anti-aliasing; arbitrary-channel Gaussian feature rendering; and a
39
49
  pip install mlx3d
40
50
  ```
41
51
 
42
- Requires an Apple Silicon Mac (M1 or newer) and Python ≥ 3.10.
52
+ Requires an Apple Silicon Mac (M1 or newer) and Python ≥ 3.11.
43
53
 
44
54
  ## A 60-second taste
45
55