Commit 9945f78
Vectorize triangulation and Jacobian projection for nonlinear EKS
- triangulate_3d_models: replace nested for-loop with joblib.Parallel(prefer='threads')
over all M*K (model, keypoint) pairs; 72s -> 7s for K=28 keypoints
- project_3d_covariance_to_2d: replace per-frame jax.jacfwd loop with
vmap(jax.jacfwd(h_cam)) and batched numpy covariance projection (J @ V @ J^T);
~13,659s -> 7s for T=30k frames (was firing 5M individual JAX dispatches)
Benchmark (30k frames, 28 kps, 6 views, nonlinear, smooth_param=10000):
PR#78 alone: ~3.8 hrs (reprojection dominated by per-frame dispatch)
+ these changes: 34s (873 fps)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent f83656a commit 9945f78
1 file changed
Lines changed: 23 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
838 | | - | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
839 | 844 | | |
840 | 845 | | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
841 | 855 | | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
| 856 | + | |
| 857 | + | |
848 | 858 | | |
849 | 859 | | |
850 | 860 | | |
| |||
863 | 873 | | |
864 | 874 | | |
865 | 875 | | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
| 876 | + | |
| 877 | + | |
877 | 878 | | |
878 | | - | |
879 | | - | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
884 | 883 | | |
885 | 884 | | |
886 | 885 | | |
| |||
0 commit comments