3D Geodata Academy

All article materials Article materials

Label a 3D scene by painting on photos

Fifty-five brush strokes on five photos, and the 3D scene behind them gets its classes: 11.9 % of the points labeled by projection through the cameras, 83.3 % after KD-tree fusion, saved as a labeled PLY and a GLB. CPU only, no training.

Runs on Python 3.10, numpy, scipy, open3d, matplotlib, opencv-python, trimesh 4 or newer, and a screen for the painting window.

A 3D point cloud of a toy set labeled by painting brush strokes on photos
Open

The code

Public, no email needed. Read it, fork it, run it, break it.

  • da_semantic_masking.py Load, paint, project, fuse and export, in the article’s 11 cells.
  • interactive_painting.py The OpenCV brush tool the script paints with, 1-5 for the class, +/- for the brush.
  • run_headless.py The same run with no screen, replaying recorded brush strokes.
  • kids_strokes.json The brush strokes of the reference run, five classes on five photos.
View on GitHub
Email

The data and the reference output

Too big to paste out of an article, so tell me where to send them.

  • reconstruction_data.npz The KIDS reconstruction from the 3d-models-from-images kit, 9 frames and 1,270,080 points. 44 MB.
  • smart_fused_labels-v2.ply All 1,270,080 points with their colour and a segment_label field CloudCompare reads as a scalar field. 24 MB.
  • semantic_scene.glb The labeled scene with the nine camera frustums, for any glTF viewer. 20 MB.

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.

Cover of 3D Data Science with Python by Dr. Florent Poux
Go deeper

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.

O’Reilly Media, 2025 · ISBN 9781098161330 · 15,000+ readers

See the book or buy it on O’Reilly
Dr. Florent Poux

Dr. Florent Poux

Founder and Lead Instructor at the 3D Geodata Academy. 15+ years on the automation of reality capture, from point clouds and photogrammetry to spatial AI, and 1,700+ citations across 60+ peer-reviewed publications.

These are the materials for Label a 3D scene by painting on photos, one of the tutorials I publish on Medium and on learngeodata.eu. Every kit lives at learngeodata.eu/materials/.

Scroll to Top