Floor Plan Recognition Using Computer Vision
How to perform automatic detection of elements on floor plan images of houses and apartments
The work of recognizing elements in floor plan images of houses or apartments is a very common problem and used for various applications such as the emulation of a 3D virtual environment through a 2D floor plan.
Although this type of problem is quite intuitive for us humans, the task of analyzing and recognizing elements of a floor plan such as doors, windows, rooms, etc., is a challenging task and requires knowledge in Computer Vision and Image Processing.
The most traditional approach to this type of problem consists of using image processing techniques and localization heuristics to identify a given element. However, there are many different models of floor plan images and they differ in the design of doors, walls and windows.
Therefore, recently several studies have used Deep Learning in conjunction with heuristic techniques to identify these elements.
By training a Deep Learning algorithm, the model can better generalize the elements in different types of images, improving the performance in identifying the desired elements.
The Canadian company Measure Square has a web service that uses a floor plan analysis technology based on Deep Learning and Computer Vision. This service can detect doors, windows, and rooms from images or documents. Video 1 presents a video from Measure Square on the prediction of elements in floor plans of houses and apartments, using the company’s own software.
The development of Artificial Intelligence to recognize certain elements is usually done using an object segmentation network. This type of network recognizes the position of an element from a mask generated from the original image.
For example, in the case of door recognition, it is necessary that the position of the doors is annotated in the images of the plants, as shown in Figure 1. In this image the green rectangles represent the bounding box that captures the pixels of each position surrounding a given door.
This annotation can be done using the imglab tool, which is a free online image annotation tool. After the annotation is done, we are able to export it as COCO JSON, which is a file annotation format often used in problems involving object detection.
For each port annotated in imglab, there is a bounding box, represented by a list of four integers. These integers represent the top-left (x, y) and bottom-right (bottom-left) positions of each port.
By obtaining the positions of the element you want to identify in the images, you can use them together with the image itself, feeding a neural network or a set of neural networks, using Deep Learning to train the model to identify doors in floor plan images.
To follow step by step how to annotate databases and train object recognition models on floor plans using Python and Keras, just download the Jupyter Notebook from the link below (All instructions must be executed).
Hi, I’m Maik. Hope you enjoyed the article. If you have any questions or want to connect with me and access more content, follow my channels:
LinkedIn: https://www.linkedin.com/in/maikpaixao/
Twitter: https://twitter.com/maikpaixao
Facebook: https://www.facebook.com/maikpaixao
Youtube: https://www.youtube.com/@maikpaixao
Instagram: https://www.instagram.com/datamaikpaixao/
Github: https://github.com/maikpaixao