Sitemap

Data Science Collective

Advice, insights, and ideas from the Medium data science community

How to Generate 3D Models from Images with Python

Learn to create 3D models (voxels, point clouds, 3D Gaussian splatting, 3D meshes) from any image using Python and DepthAnything v3. Complete workflow with code for 3D reconstruction and AI applications.

43 min read6 days ago
Press enter or click to view image in full size
Tutorial banner for converting 2D images to 3D models with Python. Colorful illustration featuring a 3D rendered landscape with mountains and terrain, a stylized arrow, visualization of 3D rendering, laptop with code, and Python syntax badge. 3D reconstruction, depth estimation, DepthAnything v3, photogrammetry
Ultimate Python Tutorial to generate voxels, 3D mesh, 3D Gaussian Splatting, and point clouds from any images (AI-generated or not) with Zero-shot Foundational models. © F. Poux

Every photograph you have ever taken contains a hidden dimension.

Not metaphorically. Literally.

Encoded in every pixel gradient, every shadow boundary, every texture variation lies enough geometric information to reconstruct the third dimension that your camera sensor collapsed when it captured light onto a flat plane.

“The camera is an instrument that teaches people how to see without a camera.” Dorothea Lange

For decades, recovering that lost dimension required multiple calibrated cameras, expensive LiDAR scanners, or painstaking manual modeling.

Press enter or click to view image in full size
Four-panel collage of 3D reconstruction setups: top-left shows orange markers capturing white cylindrical object with textures, top-right displays intricate circuit board pattern on wooden surface, bottom-left shows dark/empty frame, bottom-right displays light blue 3D printed structure. Techniques include photogrammetry and depth capture.
Example of the results of a 3D Photogrammetry dataset. © F. Poux.

Today, a single neural network can look at your photographs and predict the missing depth with startling accuracy.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web
Already have an account? Sign in
Data Science Collective

Published in Data Science Collective

Advice, insights, and ideas from the Medium data science community

Florent Poux, Ph.D.
Florent Poux, Ph.D.

Written by Florent Poux, Ph.D.

🏆 Director of Science | 3D Data + Spatial AI. https://learngeodata.eu (💻 + 📦 + 📙 + ▶️)

Responses (7)

Write a response

DA3’s a champ at global structure on textured scenes but gets a bit flaky with scale drift, glass/shine, blank walls, and extreme wide/fisheye edges. If I had to ship tomorrow, I’d lock down input hygiene, confidence‑gated back‑projection, and ICP…

15

Nice job 👍

5

Really interesting as is your book.

1