The disclosure notably relates to a computer-implemented method for generating a 3D model representing a building. The method comprises providing a 2D floor plan representing a layout of the building. The method also comprises determining a semantic segmentation of the 2D floor plan. The method also comprises determining the 3D model based on the semantic segmentation. Such a method provides an improved solution for processing a 2D floor plan.