geometry-evaluation
Use PyPose's projection and homogeneous-coordinate geometry, reprojection residuals, point-cloud transform estimation and filters, Euclidean/SE3 splines, trajectory timestamp association, APE/RPE metrics, testing comparison, and ReduceToBason convergence utility; choose the API from shape, frame, time, and threshold contracts and validate with deterministic smoke checks.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- geometry-evaluation
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use PyPose's projection and homogeneous-coordinate geometry, reprojection residuals, point-cloud transform estimation and filters, Euclidean/SE3 splines, trajectory timestamp association, APE/RPE metrics, testing comparison, and ReduceToBason convergence utility; choose the API from shape, frame, time, and threshold contracts and validate with deterministic smoke checks.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/geometry-api.md6.7 KB
- 参考文档references/splines-and-downsampling.md4.6 KB
- 参考文档references/trajectory-metrics.md6.7 KB
- 参考文档references/troubleshooting.md5.9 KB
- 脚本scripts/geometry_smoke.py7.2 KB
03 SKILL.md 正文
Geometry and evaluation
Use this sub-skill when a Researcher needs camera-coordinate geometry, point-cloud preprocessing/alignment, spline interpolation, trajectory association or error statistics, comparison assertions, or a small convergence stopper. This skill is for operating PyPose's existing APIs, not for re-deriving LieTensor representation fundamentals.
Scope boundary
Included:
- Cartesian/homogeneous conversion and camera projection/back-projection:
cart2homo,homo2cart,point2pixel,pixel2point,reprojerr. - Rigid and similarity point-set estimation:
svdtfandsvdstf. - Generic nearest-neighbor and point-cloud reduction/filtering:
knn,random_filter,voxel_filter,nbr_filter,knn_filter. - Euclidean cubic Hermite and SE3 B-spline interpolation:
chspline,bspline. - Trajectory containers, timestamp matching, alignment, frame/distance pair
selection, and APE/RPE:
StampedSE3,matching_time_indices,associate_traj,compute_error,pairs_by_frames,pairs_by_dist,pair_id,metric.ape, andmetric.rpe. pypose.testing.assert_closeandpypose.utils.ReduceToBason.
Excluded:
- SE3/SO3/Sim3 representation, composition, logarithms, exponentials, and other
fundamentals: use
lie-tensor. - ICP, EPnP, robotics pipelines, and robotics modules: use
robotics-modules. - Optimizers, schedulers, and optimization loops: use
optimization.
Read the focused references before writing a pipeline:
Run the bundled offline check from any directory with:
From the pypose skill directory, run:
python sub-skills/geometry-evaluation/scripts/geometry_smoke.py
The helper can also be invoked by absolute path from any working directory.
Use python sub-skills/geometry-evaluation/scripts/geometry_smoke.py --help
from the skill directory to see options. The helper sets no
random global state outside its own deterministic checks, does not access the
network, and does not create plots or files.
Operating procedure
- Normalize the data contract before calling an API:
- point coordinates are
(..., N, 3)and pixels are(..., N, 2); - an intrinsic matrix is
(..., 3, 3)with nonzerofx=K[...,0,0]andfy=K[...,1,1]; - poses are
SE3LieTensors with a final size of 7 when an extrinsic is supplied; and - a trajectory is one unbatched sequence of SE3 poses plus a one-dimensional, nondecreasing timestamp vector.
- point coordinates are
- Make frame and direction conventions explicit.
point2pixelexpects camera points ifextrinsics=None; withextrinsics, points are world-frame and the supplied pose acts before projection.pixel2pointreturns camera-frame points whose z coordinate is the supplied sensor-plane depth. It does not invert an extrinsic automatically. - Use lower-case public function names exactly as exported (
point2pixel,reprojerr,svdtf,metric.ape,metric.rpe). Metrics are functions andStampedSE3is an internal helper class inpypose.metric.ape_rpe; do not search for or instantiateAPE/RPEclasses. - Validate shapes and dtype/device with a small synthetic case. For a round trip, project positive-depth camera points then back-project using the original z. For transforms, apply a known rigid/similarity transform and compare estimated matrix action, not only raw quaternion storage.
- For trajectories, associate timestamps before evaluating. Inspect match count,
max_diff/diff,offset_2/offset, andthreshold/thresh; a nonzero association warning means the score may be unreliable. Decide whether APE alignment, scale correction, origin alignment, and RPE pair unit are wanted. - Record the exact options used and the result statistic (
All,Mean,RMSE, etc.). Usepp.testing.assert_closefor tensors or LieTensors rather than comparing quaternion coordinates directly.
Minimal examples
import torch
import pypose as pp
K = torch.tensor([[4., 0., 2.], [0., 4., 1.], [0., 0., 1.]])
xyz = torch.tensor([[0.5, -0.25, 2.], [1., 1., 4.]])
uv = pp.point2pixel(xyz, K)
xyz_again = pp.pixel2point(uv, xyz[:, 2], K)
pp.testing.assert_close(xyz_again, xyz)
# A metric call uses functions, not metric classes.
t = torch.arange(4, dtype=torch.float64)
poses = pp.SE3([[0., 0., 0., 0., 0., 0., 1.],
[1., 0., 0., 0., 0., 0., 1.],
[2., 0., 0., 0., 0., 0., 1.],
[3., 0., 0., 0., 0., 0., 1.]])
score = pp.metric.ape(t, poses, t, poses, etype='translation', otype='Mean')
assert torch.equal(score, torch.zeros_like(score))
Keep any backend-specific failures, unsupported degenerate cases, timestamp collisions, and unresolved coordinate assumptions explicit in the handoff rather than silently changing conventions.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).