SpatialLM icon indicating copy to clipboard operation
SpatialLM copied to clipboard

Detection result misalignment

Open xiyufeng2 opened this issue 1 year ago • 4 comments

Hello author, I found that the detection results are not on the same plane as the point cloud plane when using my own dataset. Do I need to calibrate my point cloud data to the horizontal plane for this significant misalignment? How to calibrate? My point cloud data source is the dense point cloud output by DUST3R.

xiyufeng2 avatar Mar 21 '25 08:03 xiyufeng2

Hi, thank you for raising the question. As stated "In the current version of SpatialLM, input point clouds are considered axis-aligned where the z-axis is the up axis." The provided example point clouds followed the ScanNet scenes orientation convension, which is "Transforms scans to z-up alignment for scans and tries to align walls to x-y planes." in Alignment.

We've trained a version of the released model to predict the Pose of the point cloud as a script line output: pose_0=Pose(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz). Where point a is the origin point, and other 3 points along the orthogonal axes. And calibrate the point cloud based on the estimated pose.

Image Image
Image Image

We don't think it is a good or efficient way for calibrating the point cloud from the SLAM pipeline, as it seems an overkill task for LLM, so we are not releasing the pose predicting model. And we encourage the developers to explore more efficient ways to calibrate the point clouds.

As for alternative efficient ways, we recommend you to check out VanishingPoint Estimation, Manhattan Frame Estimation from video, Manhattan Frame Estimation from surface normals (ref paper: Globally Optimal Manhattan Frame Estimation in Real-time, Manhattan World Inference in the Space of Surface Normals) for estimating the Manhattan Frame from image, video or point cloud.

We will also continue working on this and provide updates on our progress.

SamMaoYS avatar Mar 21 '25 10:03 SamMaoYS

I know this thread is closed, but I wanted to share a method I am using with success that re-orients my point cloud. I am using RANSAC to determine the major planes of the point cloud and then have the workflow align the planes and point cloud to the axis. I have had a couple think a wall is the ground, but it's a simple 90 degree rotation after that fixes the problem.

That being said, I am also scanning scenes with the LiDAR on my iPhone via ARKit and they are Y up so I start with a simple rotation to get the model Z up and then align the largest planar surface to X axis. I have a bit more testing to do, but when I am happy with it, I can share the python script.

jonstephens85 avatar Mar 28 '25 02:03 jonstephens85

Hey @jonstephens85 Great idea, I am facing the exact same issue with my data, I will try this Please provide the python script if you can

vishxlyadav avatar Apr 09 '25 08:04 vishxlyadav