ReUse-X

ReUse-X

Table of Contents

ReUse-X is a platform for working with existing buildings. It helps with mapping resources and creates a simplified 3D model that can be used as a foundation for early sketching and as input for environmental analysis. The work is based on my Ph.D. research 3D Mapping of vacant buildings for reuse, though it has come a long way since then.

What started as a software library packaging different algorithms has evolved first into a CLI (Command line interface) application, then into a standalone GUI (Graphical user interface) app, and now into a hosted web service working with IFC, Rhino, and Speckle.

The Pipeline

The ReUse-X workflow transforms raw sensor data into actionable resource inventories through four main stages. First, buildings are scanned using iPhone or iPad Pro devices with LiDAR to capture 3D data. This raw sensor data is then assembled and corrected for drift using SLAM algorithms that detect when the scanner revisits previously mapped locations. Next, the resulting point cloud is segmented to identify and classify building components using both geometric and machine learning techniques. Finally, these classified components are mapped as resources, creating a detailed inventory of materials and their reuse potential.

Scanning

Everything starts with a 3D scan. ReUse-X targets the iPhone and iPad Pro as its scanning platform because these devices include a LiDAR sensor and are far cheaper than professional scanners. There is also a good chance you already own one, which lowers the barrier to entry further. This makes it more likely the tool will actually be used, which is important since the challenge is often a lack of budget, at least early on in the concept phase where it’s easiest to make an impact by providing good foundational data.

The challenge with Apple devices is that their resolution and accuracy are limited, and their reach is about 5 meters. This makes them really only useful for indoor scanning.

Scanning a room by moving the device around to capture all surfaces

Assembly

The devices scan by taking several measurements at a time. On one hand, they use the regular camera to take a color image. On the other hand, they use the LiDAR scanner to take a matching depth image. In a depth image, instead of measuring the color value, each pixel describes the distance it has to the camera. The device also uses its gyroscope and accelerometer to measure orientation and acceleration in space. All this happens at regular intervals, resulting in a large collection of poses (location and orientation) with matching color and depth images. In theory, if all sensors were perfect, this would allow for the construction of a 3D model. For every pose, we can use the depth image to project the points into 3D space, creating a point cloud.

The device’s trajectory through the building as it captures scan data

In reality, though, no sensor is perfect. Since the position measurements are sequentially dependent on each other, small errors will accumulate and result in the assumed location drifting away from the actual one. This problem is called SLAM (Simultaneous Localization and Mapping). You need to build a map of your surroundings while at the same time figure out where you are located in that map.

There are different implementations of SLAM algorithms, optimized for different combinations of sensor data, scanning devices, or with the goal of running in real time. Key to all of them is finding loop closures within a scan. This means detecting when the device revisits an already known location. This allows for updating your assumed location within the map and taking the two observations and forcing them to align. The resulting difference is then spread out over the in-between frames, ideally correcting for the accumulated error.

For this, ReUse-X uses the work done in RTABMap, a library developed at the IntRoLab of the Université de Sherbrooke for Real-Time Appearance-Based Mapping.

Loop closure detection correcting drift when the scanner returns to a previously visited location

Segmentation

The result so far is a 3D point cloud, essentially a collection of measurements. But there is no information on what is being measured and in what relationship points are to each other. If visualized in a 3D viewer, it would be trivial for a human to recognize what is being displayed. However, a computer has no idea if the point cloud is of a house, a landscape, or if it is made up of multiple objects and which ones those would be.

Geometric Segmentation

There are different strategies for bringing order to point clouds. Early ones relied on geometric properties, for example, points belonging to the same plane or fitting a specific shape well. A classical approach is called RANSAC (Random Sample Consensus). A geometric shape is placed randomly in the point cloud, and the points closest to its surface are sampled to determine how well the shape is approximating those points. This is repeated until a close fit has been found. The benefit of this method is that it works for any shape that can be mathematically described: a plane, a sphere, a pipe, etc. Though generally, planar surfaces are of most interest since most of our man-made environment consists of those. At least within buildings, floors, ceilings, and walls are mostly flat.

The way ReUse-X finds planar surfaces is by using a region growing algorithm. This starts with a random seed point and then evaluates its neighbors. Should they be similar to it, they are added to the set, and their neighbors are evaluated, and so on until no more points can be added. The criteria that are being checked are the point’s normal direction, its distance to the current set of points, and the distance to the current plane. Should all those be smaller than a specified threshold, the point is added. Periodically, the underlying plane equation is updated to reflect the current set of points that it is based upon. After a region has been found, the points are removed from the point cloud and the process repeats.

Semantic Segmentation

This is a good start for ordering the point clouds, but we are still lacking any kind of semantic understanding of what each thing might be. Is the plane a wall, ceiling, floor, or door? For some planes, their size, location, and orientation might provide further insight. However, since the rise of machine learning (AI), there are other approaches we can take.

One option would be to provide a machine learning model with the full point cloud and train it to tell us which parts the point cloud is made up of. This works, though in practice the computation is quite heavy. It only works on small point clouds, requiring the model to be divided into patches and processed sequentially.

Another option that ReUse-X takes is to use the color images that were captured for semantic image segmentation. The benefit here is that there is more available training data, and there is also more research being done, having resulted in some quite capable and fast models.

Prompting the segmentation model to identify specific building components

Currently, ReUse-X relies on a model called SAM3, which was trained by Meta. It can be prompted in three different ways. On one hand, it can segment shapes/objects based on point or rectangle selections. More relevant for ReUse-X, it can work based on a text description. Since the model has been trained on an open vocabulary, it is not limited to a preselected set of categories of objects that it can detect. Rather, a prompt can be as generic as “wall,” “ceiling,” or “door,” or as specific as “brown floor,” “wood panels,” or “blue wall tiles,” allowing for the categories to be tailored to the specific project.

With this and the previous knowledge of where in the point cloud each pose is located, those labels from the images can now be projected back into the point cloud to segment it and to annotate it semantically. Having access to the individual images and raw scan data is another reason for choosing the iPad and iPhones as devices. In theory, all major scanners collect images to colorize their point clouds. However, it is not always trivial to get access to those without needing proprietary software libraries or signing license agreements, making this kind of segmentation more difficult to do for other platforms.

Labels from image segmentation being projected back into the 3D point cloud

Resource Mapping

The result now is a point cloud where individual points are labeled based on the type of object they belong to. What’s left to do is to isolate clusters of points, thereby finding individual instances and also accounting for potential multiple images of the same object. The result is a semantically segmented point cloud which we can use to count the number of different items or measure their size or volume.

Furthermore, the 3D model can be used as a sort of three-dimensional database, making it clear not just which objects are present in a building but also where exactly they are located. The already collected information can be further enriched, either by providing it manually or, as we might want to explore in the future, using further machine learning on the images to maybe detect specific models or types. Educated guesses might also be made based on the year of construction of the building. All in all, this gives a better view of what the potential resources in the building are.

Creating a digital passport with measurements and properties for each building component

Regulatory Context

Different new regulations are being enacted that make resource mapping increasingly important. For Denmark specifically, BEK 496 requires all demolitions removing more than 250m² of floor area to be done as selective demolition, ensuring that the material is carefully disassembled and reused as well as it can be. This means that when applying for a permit for demolition, a resource mapping is one of the required documents that needs to be provided. This is essentially a list of all the objects/materials, their current state, and what potential they have for reuse.

The current way of writing this report mostly consists of going out on site, taking pictures and notes, and then back at the office collecting that into an Excel spreadsheet. Should you have forgotten anything like a measurement, it’s another trip back on site.

The goal for ReUse-X is to provide a tool for creating this resource mapping as well as making it so simple that it is already performed at the concept phase of the new design, where it’s easiest to make the largest impact, instead of at the end when the decision to demolish has already been taken and it’s required by law.

Web interface showing labeled building components

The web interface for reviewing and managing scanned building components


Learn more at reuse-x.com

Share :