## 2 Materials and Methods
### Image Segmentation  
Following the collection and evaluation of street images, this study employed SAM to generate segmentation masks for objects potentially impacting pedestrian safety. SAM, recently developed by [PERSON] et al. [28], constitutes a noteworthy advancement in computer vision by enabling real-time segmentation with minimal manual intervention. Designed as a foundation model for a broad range of segmentation tasks, SAM does not require an extensive training dataset and is therefore well suited to handling the complex nature of urban environments, where construction sites and pedestrians coexist [35; 36; 37]. As illustrated in Figure 4, SAM comprises three primary components: an image encoder, a prompt encoder, and a lightweight mask decoder. First, the image encoder processed each input image and transformed it into a high-dimensional embedding that captured global features such as color, texture, and object boundaries. Meanwhile, the prompt encoder accepted user-defined inputs indicating which elements to segment in the image. These prompts could range from a single point on the target object (point-prompt) to more sophisticated inputs like text descriptions (text-prompt). Finally, the lightweight mask decoder merged the outputs from both encoders and produced segmentation masks that outlined the specified objects. Because the goal of this study was to quantify how construction activity affects pedestrian safety, segmentation was applied to three object categories in each image: sidewalks, obstructions, and barriers. Sidewalks refer to continuous pedestrian walkways, forming the basis for evaluating the walkable environment (shown in green-colored masks in Figure 4). On the other hand, obstructions include materials, equipment, debris, or any other construction-related items encroaching on sidewalk space (shown in purple in Figure 4). Barrier walls and fences that separate pedestrian pathways from construction sites constitute the third category (shown in yellow in Figure 4). Although these barriers do not occupy sidewalk space in the same way as obstructions, they offer a degree of protection from adjacent hazards and may influence pedestrians' perceived risk. In this study, the prompt encoder adopted a point-prompt approach. By clicking a single point on a specific object in the image, SAM automatically produced colored segmentation masks for each object class. The subsequent step involved translating these masks into quantifiable measures that could be compared across images of varying sizes. Figure 4: Street images segmentation process using SAM. To achieve this, the total number of pixels in the corresponding mask was counted for each object class (sidewalk, obstruction, and barrier). Although pixel counts do not directly correspond to real-world object size, the perceived size of objects in the images is likely to be the key factor influencing individuals' perceived risk [38; 39]. Supporting this rationale, [PERSON] and [PERSON] [40] found that observers can reliably estimate object distances from 2D images with 94% accuracy, even though absolute distances tend to be underestimated. Accordingly, pixel-based measurements offer a theoretically sound proxy for perceived visual prominence. To facilitate comparisons across images of varying resolutions or captured from different camera angles, the raw pixel counts were normalized by the total pixel area of each image. This yielded percentages for each object class that could be directly compared, regardless of differences in the image size or perspective. Subsequently, building on these basic pixel-based measures, two additional indices were developed to quantify how obstructions and barriers diminish the available space for pedestrians. First, the obstruction-sidewalk ratio was defined as the proportion of the nominal sidewalk area occupied by obstructions. Since SAM only extracted the visible sidewalk (portions not covered by obstructions), the nominal sidewalk area was calculated as the sum of the visible sidewalk and obstruction areas.