## 2 Materials and Methods
### SCP-Net: Streetscape-Correction Network  
SCP-Net is a deep learning algorithm specifically designed for segmentation correction of street view images, designed to correct errors in segmentation results generated by the SAM. SCP-Net is trained by using streetscape data from labeled false segmentation points and correct but unsegmented points to achieve accurate correction of segmentation results. The training data of SCP-Net consists of two parts. The training dataset is expressed as \(D=\{(x_{i}y_{i})\}_{i=1}^{N}\), where \(x_{i}\) is the input image and \(y_{i}\) is the corresponding correction label (binary mask). In the correction label \(y_{i}\), 0 represents the region of the \(P\) set in Equation (1), and 1 represents the region of the \(T\) set in Equation (2). SCP-Net uses an encoder-decoder structure, and the encoder is partly based on ResNet, a pretrained convolutional neural network used to extract multiscale features from input images. The decoder part consists of multiple upper sampling layers and skip connections, which are used to gradually recover the spatial resolution and generate the corrected segmentation mask. The loss function of SCP-Net consists of two parts: cross-entropy loss and Dice loss, which are used to deal with the class imbalance problem and improve the accuracy of segmentation boundary, respectively. Cross-entropy loss is calculated by Equation (13) and Dice loss is calculated by Equation (14), where \(\hat{y}_{i}\) is the result of prediction correction of the input image \(x_{i}\). \[\mathcal{L}_{\text{CE}}=-\frac{1}{N}\sum_{i=1}^{N}[y_{i}\log(\hat{y}_{i})+(1-y _{i})\log(1-\hat{y}_{i})] \tag{13}\]  
\[\mathcal{L}_{\text{Dice}}=1-\frac{2\sum_{i=1}^{N}y_{i}\hat{y}_{i}}{\sum_{i=1}^ {N}y_{i}+\sum_{i=1}^{N}\hat{y}_{i}} \tag{14}\]  
Equation (15) shows the definition of the total loss function, where \(\lambda\) is the weight coefficient that balances the effects of the two losses. \[\mathcal{L}=\lambda\cdot\mathcal{L}_{\text{CE}}+(1-\lambda)\cdot\mathcal{L}_{ \text{Dice}} \tag{15}\]  
SCP-Net optimizes network parameters \(\theta\) through backpropagation algorithms. Specifically, the update rules of network parameters are shown in Equation (16), where \(\eta\) is the learning rate and \(\
abla_{\theta}\mathcal{L}\) is the gradient of the loss function over the network parameters. \[\theta\leftarrow\theta-\eta\
abla_{\theta}\mathcal{L} \tag{16}\]  
In the training process, the Adam optimizer is used to update the parameters, and the learning rate attenuation strategy is set to improve the training stability. In addition, data enhancement techniques (random rotation, scaling, and flipping) are applied to the training data to enhance the generalization ability of the model. After SCP-Net completes training, it is set after the SAM decoder. The defogged streetscape data \(Sw_{size\times size}^{k_{i}}\) is input into the visual encoder of the SAM, forming the feature vector \(I_{n\times tokens}\), as shown in Equation (17). \[I_{n\times tokens}\ =\ VisualEncoder\left(Sw_{size\times size}^{k_{i}}\right) \tag{17}\]  
The SAM possesses a specialized prompt encoder capable of accepting various forms of prompt information (point, text, box) to assist the model in segmenting specified areas. We configure the text prompt parameter \(text\) with vegetation-related cue words (tree, grass, vegetation), which are then fed into the prompt encoder according to Equation (18), resulting in the prompt feature vector \(P_{n\times tokens}\). \[P_{n\times tokens}\ =\ PromptEncoder(text) \tag{18}\]  
The SAM ultimately outputs the segmentation result through the decoder. In Equation (19), it generates the initial segmentation mask \(M_{\text{SAM}}\), where \(M_{\text{SAM}}\) represents the vegetation region. \[M_{SAM}\ =\ MaskDecoder(I_{n\times tokens},\ P_{n\times tokens}) \tag{19}\]  
SCP-Net corrects the initial segmentation mask \(M_{\text{SAM}}\). The encoder part of SCP-Net extracts multiscale features from \(M_{\text{SAM}}\).