Open-vocabulary 3D semantics on a real room scan
A real living-room scan gets oriented, scaled to metres, labeled through a pixel-to-point link, cleaned by a vote and sliced into a floor plan, on a CPU in about 3 seconds. The 3D logic is real; the SAM, CLIP and DINOv2 outputs are simulated, with the two functions where yours plug in.
The code
Public, no email needed. Read it, fork it, run it, break it.
open_vocab_3d_semantics.pyThe nine steps plus the per-class query, with the real and simulated parts marked.dataviz.pyThe loader and step figures the script imports. Stops with a fix if a file or a library is missing.
The data and the reference output
Too big to paste out of an article, so tell me where to send them.
room.plyThe living-room scan, thinned to 999,987 points (one per 1.3 cm voxel) with colour and a class on each, 19 MB.room_labeled.plyThe 40,000 working points, levelled and in metres, with the pipeline’s label and the reference class on each.floorplan_slice.plyThe 30 cm slab at 1 m, the plan slice your run should reproduce.class_stats.csvPer-class points, heights, footprint along the walls and agreement with the reference.
Where should I send them?
One email, and the download links appear right here. You also get them in your inbox so you can come back to this any time.
Here they are
Yours to keep. Run the pipeline on this scene first to reproduce every number in the article, then point it at something of your own.
The same links are in your inbox. If nothing arrives, check spam, then mail me and I will send them by hand.
3D Data Science with Python
Building Accurate Digital Environments with 3D Point Cloud Workflows
This kit is one pipeline. The book is the discipline underneath them: 690 pages from the Python foundations through point cloud processing, meshing and the engineering that keeps a 3D workflow standing up in production. If the script above makes sense and you want the structure they came from, that is where it lives.
See the book or buy it on O’ReillyThese are the materials for Open-vocabulary 3D semantics on a real room scan, one of the tutorials I publish on Medium and on learngeodata.eu. Every kit lives at learngeodata.eu/materials/.