$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
To study this, we used a publicly available dataset from the Kaggle platform (Floor Plan Images and Their Details, available at: https://www.kaggle.com/datasets/adilmohammed/floor-plan-images-and-their-details; accessed April 16, 2026). The study did not involve human participants, animals, or personally identifiable data; therefore, ethical approval and informed consent were not required.
This protocol presents an AI-driven framework for automated analysis of residential floor plan images, focusing on spatially aware and healthcare-oriented design. The complete experimental workflow is presented in Figure 1. The protocol is designed to bridge the gap between low-level architectural feature prediction and high-level application-oriented decision-making. It integrates deep learning, ensemble modeling, and explainable AI to provide an accurate, robust, and interpretable solution for analyzing residential layouts. The framework consists of multiple stages, starting with data acquisition and preprocessing, followed by feature learning using deep convolutional neural networks, meta-ensemble prediction, and finally, application-level classification. Initially, floor plan images and their corresponding architectural attributes are preprocessed through resizing, normalization, and data augmentation to ensure consistency and improve generalization. All floor-plan images were resized to 224 × 224 pixels and normalized to the range [0, 1]. Data augmentation was applied during training using random horizontal flipping, rotation, zooming, and width/height shifting to improve model generalization and reduce overfitting. No vertical flipping was applied. Complete augmentation parameters and implementation details are provided in Supplementary File 1. The processed data were then used to train multiple deep learning models for feature extraction and prediction. All base models and the CARE-MIRV-Net meta-learner were trained using a consistent configuration, including data augmentation, early stopping, and adaptive learning-rate scheduling. Early stopping monitored validation loss (val_loss) with a patience value of 5 epochs, and the best model weights were restored automatically after training. Adaptive learning-rate scheduling was implemented using the ReduceLROnPlateau callback, which monitored validation loss and reduced the learning rate by a factor of 0.3 after 2 epochs without improvement, with a minimum learning rate of 1 × 10⁻7. Complete implementation details and parameter settings are provided in Supplementary File 1. The dataset was randomly divided into training and testing sets using an 80:20 split ratio. A fixed random seed (42) was used to ensure reproducibility. Complete implementation details are provided in Supplementary File 1.

Figure 1. Workflow of the CARE-MIRV-Net framework for residential floor plan analysis. Schematic overview of the proposed protocol. The workflow includes (1) dataset acquisition and preprocessing, (2) feature learning and prediction using MobileNetV2, InceptionV3, ResNet101, and VGG16, (3) stacking-based meta-ensemble prediction using CARE-MIRV-Net, (4) rule-based residential layout classification, (5) SHapley Additive exPlanations (SHAP)-based interpretability analysis, and (6) performance evaluation. Please click here to view a larger version of this figure.
In the second stage, four pretrained convolutional neural networks, MobileNetV2, InceptionV3, ResNet101, and VGG16, are employed as base learners. Each model is fine-tuned using transfer learning to predict key architectural attributes, including square footage, number of bedrooms, bathrooms, and garages. For each transfer-learning model, the lower pretrained layers were kept frozen, while the upper layers and the custom regression head were fine-tuned during training. Detailed model-specific fine-tuning configurations are provided in Supplementary File 1. These models capture different aspects of spatial information: MobileNetV2 provides efficient feature extraction, InceptionV3 captures multiscale spatial patterns, ResNet101 learns deep hierarchical representations, and VGG16 ensures stable and consistent feature learning. The diversity among these models enhances the overall representational capability of the framework.
To enhance the accuracy and robustness of prediction further, a stacking-based meta-ensemble model, denoted as CARE-MIRV-Net, is proposed. At this step, predictions from all base models are pooled together to create a higher-dimensional feature space, which is input to a meta-learner. Base-model predictions are first generated independently using the trained MobileNetV2, InceptionV3, ResNet101, and VGG16 models. These predictions are then concatenated to form the meta-feature vector used by the meta-learner. To prevent data leakage, the training and testing datasets are strictly separated, and the meta-learner is trained only on predictions generated from the training data. The meta-model, which is a fully connected neural network, is trained to learn the optimal combination of base-model outputs to produce refined predictions. The meta-model consists of two fully connected layers with 512 and 256 neurons using ReLU activation, followed by dropout layers (0.4 and 0.3) and a linear output layer. The model is trained using the Adam optimizer (learning rate = 0.0001), a batch size of 32, and up to 15 epochs. Early stopping was implemented by monitoring validation loss (val_loss) with a patience value of 5 epochs. The minimum improvement criterion (min_delta) was set to the TensorFlow default value of 0, and the best model weights were restored automatically after training. Adaptive learning-rate scheduling was implemented using the ReduceLROnPlateau callback, which monitored validation loss and reduced the learning rate by a factor of 0.3 after 2 consecutive epochs without improvement. The minimum learning rate was set to 1 × 10⁻7, and the cooldown parameter used the default TensorFlow value of 0. This ensemble method reduces individual model biases and improves generalization through the complementary strengths of multiple architectures. Detailed implementation information is provided in Supplementary File 1.
After prediction, an interpretation layer is added to convert the numerical outputs to application-level decisions. Residential layouts can be classified into three classes based on the predictions of architectural characteristics: elderly care, healthcare-integrated (medical care), and general residential use. This classification is performed using predefined threshold-based decision rules based on the predicted square footage, number of bedrooms, and number of bathrooms. The category with the highest score is assigned as the final classification, whereas ties are resolved by selecting the category satisfying the greater number of decision criteria. The complete scoring rules and classification thresholds are provided in Supplementary File 2 (Algorithm 1). This action allows the framework to provide practical information for residential housing design.
The framework uses explainable AI with SHAP to provide transparency and interpretability. This component examines the contribution of the predictions from each base model to the output of the meta-model. SHAP analysis was performed using SHAP KernelExplainer (SHAP version 0.51.0) with 100 randomly selected training samples as the background dataset and 50 test samples for explanation generation. The complete SHAP configuration, including background sample selection and implementation settings, is provided in Supplementary File 1. The explainability layer helps to understand the decision-making process by measuring feature importance and displaying contribution patterns, thereby improving model transparency and reliability. The proposed framework is evaluated using MAE and R2 across all target variables. For multioutput prediction, MAE was computed as the average absolute difference between actual and predicted values across all target variables, whereas R2 was calculated by comparing the explained variance of the predictions with the corresponding ground-truth values for each output. The quantitative and qualitative analyses indicate that the proposed CARE-MIRV-Net improves prediction accuracy and supports rule-based residential layout classification. Classification reliability was assessed based on the accuracy of the underlying regression predictions and the consistency of the rule-based decision layer. The framework is a suitable and scalable solution for intelligent floor plan analysis and can be applied to smart housing, elderly-care planning, and healthcare-oriented residential design. A complete list of datasets, software packages, libraries, hardware resources, and computational tools used in this study is provided in the Table of Materials. Source code, environment configuration information, software dependency specifications, and implementation