ADS Capstone Chronicles Revised

11

dataset for effective training and evaluation of the building localization model.

4.4 Data Preprocessing

Data preprocessing ensures that the input to our models is consistent and meaningful to accurately identify building footprints and classify damage levels in satellite imagery. Satellite images often vary in resolution, lighting, and scale, introducing noise that can hinder model performance. The process involves transforming raw satellite imagery and annotations into standardized formats suitable for ML models. For the two subtasks building localization and damage classification, preprocessing involves steps to prepare data for both binary and multi-class mask generation. These techniques enhance model reliability, reduce noise, and ensure alignment between input data and task-specific objectives. Additionally, multithreading was used to optimize preprocessing for large-scale satellite imagery, enabling parallel processing of images and annotations. This significantly reduced computational time by facilitating the simultaneous generation of binary and multi-class masks across multiple threads. The building localization task identifies building positions in pre-disaster satellite images and generates binary masks that serve as ground truth for training. To ensure data consistency, all pre disaster images were resized to a uniform resolution (e.g., 256x256 pixels) and normalized to a [0, 1] pixel value range, reducing variability across the dataset. Polygon annotations, provided in JSON format, were converted into binary masks where pixel values of 1 represent building footprints and 0 indicate the background. This transformation isolates relevant regions and simplifies the localization task. Finally, binary masks were visually validated against their corresponding images to ensure accurate alignment, minimizing errors and optimizing the 4.4.1 Preprocessing for Building Localization

4.4.2 Preprocessing for Damage Classification

The damage classification task involves creating multi-class masks to assign a damage level to each pixel within the localized building regions in post disaster satellite images. Binary masks from the building localization task were used to isolate building footprints, and damage annotations in polygon format were overlaid to generate multi class masks. Each pixel was classified into one of four damage categories: no-damage (0), minor damage (1), major damage (2), or destroyed (3). To facilitate efficient data input, data generators were used with the ImageDataGenerator to rescale pixel values to the [0, 1] range, ensuring consistency across the dataset and aiding model convergence. Separate generators were created for training and validation sets, utilizing the flow_from_dataframe method to load images and their corresponding one-hot encoded labels directly from the data frames. Images were resized to a standard 128x128 pixel size to ensure uniformity in input dimensions, preparing the data in a format suitable for the damage classification model. The dataset for localization modeling consists of pre-resized images and their corresponding mask images which were then split into a training (80%) and validation set (20%). The input images have dimensions of 256x256x3, representing RGB channels, while the corresponding masks are single-channel images (256x256x1). This totaled 1,219 images which enable the model to learn features of the buildings and their respective localization through pixel-wise segmentation. To address class imbalance within the damage classification model, the dataset was randomly selecting 17,000 samples from the "no damage" class (labeled '0') to match the size of the other 4.5 Modeling

277

Made with FlippingBook - Online Brochure Maker