Member-only story
Generate a 3D Mesh from an Image with Python
Combine Deep Learning with 3D data processing to generate a mesh
Generating a 3D mesh from a single 2D image seemed a very hard task some years ago. Nowadays, thanks to the advancement in Deep Learning, multiple monocular depth estimation models have been developed and they can provide a precise depth map from any image. Through this map, it’s possible to generate a mesh by performing surface reconstruction.
Introduction
Monocular depth estimation is the task of estimating the depth value (distance relative to the camera) of each pixel given a single RGB image. The output of a monocular depth estimation model is a depth map, which is basically a matrix, where each element corresponds to the predicted depth of the associated pixel in the input image.
Points in a depth map can be seen as a collection of points with 3-axis coordinates. As the map is a matrix, each element has x and y components (its column and row). Whereas the z component is its stored value, which is the predicted depth in the point (x, y). In the field of 3D data processing, a list of (x, y, z) points is…