Investigating the Association between Streetscapes and Mental Health in Zhanjiang, China: Using Baidu Street View Images and Deep Learning

Mental health is one of the main factors that significantly affect one’s life. Previous studies suggest that streets are the main activity space for urban residents and have important impacts on human mental health. Existing studies, however, have not fully examined the relationships between streetscape characteristics and people’s mental health on a street level. This study thus aims to explore the spatial patterns of urban streetscape features and their associations with residents’ mental health by age and sex in Zhanjiang, China. Using Baidu Street View (BSV) images and deep learning, we extracted the Green View Index (GVI) and the street enclosure to represent two physical features of the streetscapes. Global Moran’s I and hotspot analysis methods were used to examine the spatial distributions of streetscape features. We find that both GVI and street enclosure tend to cluster, but show almost opposite spatial distributions. The Results of Pearson’s correlation analysis show that residents’ mental health does not correlate with GVI, but it has a significant positive correlation with the street enclosure, especially for men aged 31 to 70 and women over 70-year-old. These findings emphasize the important effects of streetscapes on human health and provide useful information for urban planning.


Introduction
Many countries have experienced dramatic urbanization, and more than half of the world's population now resides in urban areas [1,2]. With the rapid advancement of the new urbanization policy, China's urbanization rate has increased to 60.6% in 2019 [3]. At the same time, a series of problems have been brought about by urbanization, such as housing shortages [4], lack of resources [5], air and water pollution [6], Chronic diseases [7], mental health problems [8], and so on. Some of the literature has indicated that rural-to-urban migrants are likely to suffer from more mental health problems, due to the changes in living environment, housing conditions, and perceived neighborhood safety [6,9]. The proportion of the Chinese population with a burden of mental, neurological, and substance use disorders increased by 20% from 1990 to 2013 and is projected to increase by another 10% by 2025 [10]. Therefore, understanding the relationship between the urban environment and mental health is necessary for urban designers and managers to improve urban livability for human health and welfare.
Both street greenness and street enclosure have been recognized as two important features of the urban streetscape, influencing the perception of the urban environment and the mental health of humans [11,12]. Urban street greenness refers to various forms and a deep learning method, and (2) exploring the relationship between the features of urban streetscape and people's mental health by age and sex. Our results may be helpful to understand the situation of the existing streetscape and provide suggestions for future urban design.

Study Areas
The study area is located in Zhanjiang City, between 20°12′ and 21°35′ N latitude and 109°31′ and 110°55′ E longitude, with a total population of around 7.0 million in 2020. With its tropical monsoon climate, the average annual temperature is about 23° and the coldest monthly average temperature is 17.2°. Due to the high aesthetic quality of the urban green spaces, Zhanjiang was declared a "National Garden City" by the Chinese Ministry of Construction in 2005 [37]. In 2020, the gross domestic product (GDP) was about 6.46 trillion yuan (RMB) [38]. With rapid economic development and population growth, Zhanjiang has experienced rapid urban expansion and large areas of agricultural land have been converted to nonagricultural and urban land [39]. At the same time, the Zhanjiang government has added mental diseases into their health insurance coverage to support the development of local mental health services since 2015 [40]. The study mainly covers four municipal districts of Zhanjiang, namely Chikan District, Xiashan District, Potou District, and Mazhang District ( Figure 1).

Data
Street View Images Data To measure the urban streetscape features, we use street view images from Baidu Map in 2020, one of the most popular web-based maps in China [41]. It provides an open map platform service, through which users can acquire the BSV images at different street sites [42]. First of all, the road network of Zhanjiang City was downloaded from the Open StreetMap website. Before laying the sample points, this study used ArcGIS 10.6 to extract the centerline of all two-way roads into one-way roads. In terms of the spacing of sample points, to make each sample point's field of view as interconnected and non-overlapping as possible, combined with the existing literature [43], this study chose to set a sample point every 200 m along the road network, resulting in a total of 11,916 sample points. We obtained street view images of each sample as panorama images from the public API interface of Baidu Maps (https://map.baidu.com/ accessed on 20 December 2020). Based on these points, only 3780 panorama images were obtained. From Figure 2, we found that most samples are located in Chikan District and Xiashan District which is the central part of Zhanjiang. It may be because the information on the Baidu map is only available in the city center. We built a proxy for exposure with four distances (200 m, 500 m, 750 m, and 1000 m) to streetscape according to previous studies about environmental characteristics [44,45] and the sample distance in this study.

Data
Street View Images Data To measure the urban streetscape features, we use street view images from Baidu Map in 2020, one of the most popular web-based maps in China [41]. It provides an open map platform service, through which users can acquire the BSV images at different street sites [42]. First of all, the road network of Zhanjiang City was downloaded from the Open StreetMap website. Before laying the sample points, this study used ArcGIS 10.6 to extract the centerline of all two-way roads into one-way roads. In terms of the spacing of sample points, to make each sample point's field of view as interconnected and non-overlapping as possible, combined with the existing literature [43], this study chose to set a sample point every 200 m along the road network, resulting in a total of 11,916 sample points. We obtained street view images of each sample as panorama images from the public API interface of Baidu Maps (https://map.baidu.com/ accessed on 20 December 2020). Based on these points, only 3780 panorama images were obtained. From Figure 2, we found that most samples are located in Chikan District and Xiashan District which is the central part of Zhanjiang. It may be because the information on the Baidu map is only available in the city center. We built a proxy for exposure with four distances (200 m, 500 m, 750 m, and 1000 m) to streetscape according to previous studies about environmental characteristics [44,45] and the sample distance in this study. Mental health data Resident's mental health was assessed using hospitalization data of patients suffering from psychiatric disorders in general hospitals from 2014 to 2015 in Zhanjiang City, Guangdong Province, with a total of 813 patients. The disease data were Mental health data Resident's mental health was assessed using hospitalization data of patients suffering from psychiatric disorders in general hospitals from 2014 to 2015 in Zhanjiang City, Guangdong Province, with a total of 813 patients. The disease data were provided by Guangdong Medical University and included each patient's admission time, place of residence, and primary diagnosis. According to the International Classifi-cation of Diseases, 10th Revision [46], the primary diagnosis mainly included psychiatric disorders such as organic mental disorder, recurrent depressive disorder, partially undifferentiated schizophrenia, obsessive-compulsive schizophrenia, schizoaffective disorder, acute schizophrenia-like psychotic disorder, epileptic psychosis, mental retardation, and psychotic disorder. We found that 15 patients under were 5 years old. We removed these cases as we thought the effects of urban streetscape could be ignored. Finally, there were only 798 patients left, with 410 males and 388 females. There are 323 patients aged 11 to 30, 302 patients aged 31 to 50, 135 patients ranging from 51 years old to 70, and 38 patients aged between 70 and 90. Figure 3 shows the number of patients by age and sex. It was found that 119 patients live in Chikan District, 267 patients live in Xiashan District, 151 patients live in Potou District, and 280 patients live in Mazhang District.  Figure 3 shows the number of patients by age and sex. It was found that 119 patients live in Chikan District, 267 patients live in Xiashan District, 151 patients live in Potou District, and 280 patients live in Mazhang District.  Figure 4 shows the framework of this study. First, we obtained a panoramic street view image of each sample point from Baidu Maps, every 200 m along the road. Second, to extract SVF, panorama images were required to convert to fisheye images first. We then carried out the semantic segmentation of panorama images to extract GVI and the semantic segmentation of fisheye images to extract street enclosure using a deep learning method. We also obtained the addresses of 817 patients with mental health problems from Guangdong Medical University. Third, we divided the study area into small areas using the buffer method. We then measured GVI, street enclosure, and the level of mental health by age and sex for an area. Finally, we analyzed the spatial distribution characteristics of GVI and street enclosure using Global Moran's I and hotspots analysis. We also assessed the association between mental health and street features through Pearson correlation analysis.  Figure 4 shows the framework of this study. First, we obtained a panoramic street view image of each sample point from Baidu Maps, every 200 m along the road. Second, to extract SVF, panorama images were required to convert to fisheye images first. We then carried out the semantic segmentation of panorama images to extract GVI and the semantic segmentation of fisheye images to extract street enclosure using a deep learning method. We also obtained the addresses of 817 patients with mental health problems from Guangdong Medical University. Third, we divided the study area into small areas using the buffer method. We then measured GVI, street enclosure, and the level of mental health by age and sex for an area. Finally, we analyzed the spatial distribution characteristics of GVI and street enclosure using Global Moran's I and hotspots analysis. We also assessed the association between mental health and street features through Pearson correlation analysis.

Framework design
Green View Index (GVI): Yang et al. proposed an improved "Green View" index to evaluate the visibility of urban greenness. They defined GVI as the ratio of the number of pixels with vegetation per image [17]. This method has been used in many studies to calculate street greenness in many studies [15,17]. Green View Index (GVI): Yang et al. proposed an improved "Green View" index to evaluate the visibility of urban greenness. They defined GVI as the ratio of the number of pixels with vegetation per image [17]. This method has been used in many studies to calculate street greenness in many studies [15,17].
The street enclosure: The street enclosure is defined as the ratio of non-sky pixels in an image. According to Li et al., it can be calculated by using 1 minus Sky View Factor (SVF) [31,47]. As a dimensionless parameter of urban geometry, the Sky View Factor (SVF) indicates the degree of obstruction of the sky by buildings and trees. The SVF is zero when the sky is completely obstructed and 1 when the SVF is free of obstructions [31]. To extract SVF, panorama images were required to convert to fisheye images first. In this study, the panoramic image was converted into a fisheye image by PTgui (a software for processing images), and the process is shown in Figure 5. In this paper, we would use the enclosure of the street caused by both buildings and trees. The street enclosure: The street enclosure is defined as the ratio of non-sky pixels in an image. According to Li et al., it can be calculated by using 1 minus Sky View Factor (SVF) [31,47]. As a dimensionless parameter of urban geometry, the Sky View Factor (SVF) indicates the degree of obstruction of the sky by buildings and trees. The SVF is zero when the sky is completely obstructed and 1 when the SVF is free of obstructions [31]. To extract SVF, panorama images were required to convert to fisheye images first. In this study, the panoramic image was converted into a fisheye image by PTgui (a software for processing images), and the process is shown in Figure 5. In this paper, we would use the enclosure of the street caused by both buildings and trees.

Image Semantic Segmentation Based on Deep Learning
This study used a Fully Convolutional Network for semantic image segmentation (FCN), which can predict each pixel's semantic property in an image [48]. It has been widely used in some studies of street view image classification, including the recognition and extraction of elements such as sky, vegetation, and buildings for streetscape images [14,47]. We used a model built by Yao et al. [49]. A detailed description of this model can be found in Yao et al.'s study [49]. We used this model to extract the proportions of greenness and sky in the street view images.
Global Moran's I and Hotspot Analysis To examine the spatial distribution of the GVI and the street enclosure, Global Moran's I and hot spot analysis in ArcGIS were used to test the spatial dependence of the objects. For Moran's I index, the significance is calculated by p values and Z scores. If significant, a positive Moran's I index value indicates a positive relationship between the variables and their cluster distribution. A negative Moran's I index value indicates a negative relationship between the variables and the scattered distribution of these variables. If not significant, the distribution is random and there is no relationship between the variables [50]. The hot spot analysis tool in ArcMap identifies a significant hot/cold spot based on the attribute values of its neighbors. A significant hotspot is a feature with a high attribute value surrounded by other adjacent features that also have high values [51]. When implementing these methods in ArcGIS, an appropriate spatial relationship between features is needed to reflect the spatial and distributional circumstances of actual target features. Several different conceptualizations for spatial relationships are available, such as inverse distance, fixed distance band, and zone of indifference. For both methods, we used a fixed distance band which is a distance preset by the tool that determines which neighbors are to be included in the analysis. Previous research shows that it is appropriate to analyze point datasets [52].

Image Semantic Segmentation Based on Deep Learning
This study used a Fully Convolutional Network for semantic image segmentation (FCN), which can predict each pixel's semantic property in an image [48]. It has been widely used in some studies of street view image classification, including the recognition and extraction of elements such as sky, vegetation, and buildings for streetscape images [14,47]. We used a model built by Yao et al. [49]. A detailed description of this model can be found in Yao et al.'s study [49]. We used this model to extract the proportions of greenness and sky in the street view images.
Global Moran's I and Hotspot Analysis To examine the spatial distribution of the GVI and the street enclosure, Global Moran's I and hot spot analysis in ArcGIS were used to test the spatial dependence of the objects. For Moran's I index, the significance is calculated by p values and Z scores. If significant, a positive Moran's I index value indicates a positive relationship between the variables and their cluster distribution. A negative Moran's I index value indicates a negative relationship between the variables and the scattered distribution of these variables. If not significant, the distribution is random and there is no relationship between the variables [50]. The hot spot analysis tool in ArcMap identifies a significant hot/cold spot based on the attribute values of its neighbors. A significant hotspot is a feature with a high attribute value surrounded by other adjacent features that also have high values [51]. When implementing these methods in ArcGIS, an appropriate spatial relationship between features is needed to reflect the spatial and distributional circumstances of actual target features. Several different conceptualizations for spatial relationships are available, such as inverse distance, fixed distance band, and zone of indifference. For both methods, we used a fixed distance band which is a distance preset by Correlation analysis Firstly, grids of 200 m, 500 m, 750 m, and 1000 m size were created in ArcGIS in the study area to simulate the buffer zone at different distances. The grids data were merged with the disease data and the street sample point data, and only the grids with both street sample points and disease cases were retained. With the address of each patient, the number of patients within each grid was aggregated at different grid sizes by sex and age. It was used to represent the mental health status of residents within this certain area. It is notable that even if a patient could be hospitalized more than once, we only used the patient's address once. The average values of GVI and street enclosure were calculated to represent the physical features of the street within each grid. Table 1 is the statistical analysis of two street features and the number of patients at different buffer distances. Finally, Pearson's correlation was used to explore the relationship between residents' mental health and these two streetscape features at different buffer distances.

Spatial Patterns of GVI in the Whole Study Area
The average GVI for the sample sites in the study area is 7.03% (median: 4.79%, range: 0-53.54%). Figure 6 shows the histogram of GVI, suggesting that most sample sites have GVIs lower than 20%. Figure 7 reveals that there were a few high-value points of GVI, which are sporadically distributed in the study area, and most of the areas have a low GVI value. Global Moran's I is 0.36 (z-score: 77.02, p-value: 0.00). The results demonstrate GVI values tend to cluster. As shown in Figure 8, the cold spot is widely distributed while the hot spot areas of GVI are patchily distributed. To be specific, there is one hot spot in the southwest Mazhang District, an obvious one in the central Chikan District, and a big one in the southern Xiashan District.

Spatial Patterns of Streets Enclosure in the Whole Study Area
The average value of street enclosure for sample sites is 54.77% (median: 54.72%, range: 22-94%). Figure 9 shows most values of enclosure of the street range from 40% to 70%. Figure 10 shows that the values of the street enclosure are relatively high in the urban center area, and low values are distributed in the periphery of the city. Global Moran's I is 0.48 (z-score: 94.84, p-value: 0.00). The results indicate a statistically significant cluster of the street enclosure. Figure 11 indicates that the street enclosure had a different spatial pattern from the GVIs. The hot spot areas are mainly distributed in two major areas. One covers the whole area of Chikan District and northeast of Mazhang District, and the other locates in the east of Xiashan District and southwest of Potou District.

Spatial Patterns of Streets Enclosure in the Whole Study Area
The average value of street enclosure for sample sites is 54.77% (median: 54. range: 22-94%). Figure 9 shows most values of enclosure of the street range from 40 70%. Figure 10 shows that the values of the street enclosure are relatively high in the u center area, and low values are distributed in the periphery of the city. Global Mora is 0.48 (z-score: 94.84, p-value: 0.00). The results indicate a statistically significant clu of the street enclosure. Figure 11 indicates that the street enclosure had a different sp pattern from the GVIs. The hot spot areas are mainly distributed in two major areas. covers the whole area of Chikan District and northeast of Mazhang District, and the o locates in the east of Xiashan District and southwest of Potou District.      Table 2 demonstrates that there is no significant correlation between the GVI and mental health in Zhanjiang. The street enclosure is not correlated with the mental health of residents at the 200 m but shows a significant positive correlation with the number of cases with mental health problems from the 500 m buffer zone onward. Remarkably, the correlation coefficient increases with the distance of the buffer zone.   Table 2 demonstrates that there is no significant correlation between the GVI and mental health in Zhanjiang. The street enclosure is not correlated with the mental health of residents at the 200 m but shows a significant positive correlation with the number of cases with mental health problems from the 500 m buffer zone onward. Remarkably, the correlation coefficient increases with the distance of the buffer zone.  Table 3 shows that starting from a buffer zone of 750 m, the mental health of men aged 31 to 70 years was positively associated with the street enclosure. This relationship only appears in women over the age of 70.  Table 3 shows that starting from a buffer zone of 750 m, the mental health of men aged 31 to 70 years was positively associated with the street enclosure. This relationship only appears in women over the age of 70.

Discussion
This study explores the relationship between residents' mental health and the physical features of streetscapes in the city of Zhanjiang. A large number of streetscape images are used to assess the street greenness and street enclosure. The results reveal that most values of GVI are lower than 20%, while all the values of the street enclosure are higher than 20%. Most samples with relatively low GVI are in the city center, while those with relatively high GVI are located in the urban periphery. The distribution of the street enclosure values is almost opposite to that of GVI. Previous studies suggest that GVI has a strong correlation with the canopy coverage close to sample sites, and the street enclosure is affected by the number and size of trees along streets and the heights of buildings [18,33]. The reason why the values of GVI are high in periphery areas and some parks is that trees tend to grow more abundantly there. For the distribution of the street enclosure, the large number of tall buildings and skyscrapers in the city center maybe be the main factor contributing to the high values of the street enclosure.
Pearson's correlation analysis shows that there is no significant association between street greenness and people's mental health. However, street enclosure has a significantly positive correlation with the prevalence of mental health problems. After grouping patients by sex and age, the results show that street enclosure is positively associated with the mental health of men aged 31 to 70, and women aged over 70. Our findings on the effects of street greenness are inconsistent with some studies [53,54], but consistent with these studies [55][56][57]. One possible reason might be that the degree of urbanization and income is not taken into account. Mitchell and Popham [58] suggest that in higher income suburban and rural areas, green space has no impact on residents' health. Both the type and quality of green space rather than the quantity of green space [28,54,55] play an important role in the perception of the landscape. However, in this study, we do not consider these factors. In terms of the street enclosure, our study indicates that street enclosure contributes to the prevalence of mental health problems. Further, the mental health of 31-70-year-old men is affected by street enclosure, and this effect only occurs for women over 70 years old. Our findings are similar to those of Wang et al. [59], who measured walkability according to the visual enclosure of a neighborhood for assessing the mental health impacts. Their results showed that the proportion of sky contributed to the alleviation of anxiety and depression, especially for disadvantaged older adults.
This study provides an overview of Zhanjiang streetscapes using streetscape images and deep learning methods. As the complex impacts of urbanization on health have been increasingly recognized [60], our findings may provide useful information for the municipal government to design a more livable and healthier urban space. To be specific, future urban environmental management projects should consider how to lower the enclosure of city streets. For example, constructing low buildings and planting grass or shrubs instead of tall trees should be taken into account, which is helpful to encourage people to walk more and alleviate people's stress and anxiety.
There are some limitations in this study. Firstly, we do not consider the balance of the available samples of the patients in the four districts. Second, the mental health of residents in an area is represented by the number of cases in an area by establishing grids. It may be better to use the incidence of psychiatric disorders to represent the mental health situation of residents. Third, there are many other features of the street such as neatness and pedestrian flow that may also affect the mental health status of residents. Future research should distinguish between street enclosure caused by trees and that caused by buildings, which may lead to different results. Furthermore, we did not take into account other social group characteristics such as education level, income, and the frequency and duration of street activities. To summarize, future studies should highlight these points (1) more streetscape characteristics and more social group characteristics should be considered; and (2) try to find other indicators to represent human mental health.

Conclusions
In this study, we measured two street features, GVI, and street enclosure, in Zhanjiang using streetscape images and a deep learning method. Combined with mental health data, we assessed the associations between two features of the streetscape and residents' mental health. Our results indicate that GVI and street enclosure show an almost opposite spatial distribution trend in Zhanjiang. The street enclosure is correlated with residents' mental health, in particular for men aged 31 to 70 years while GVI has no significant correlation with it. This study shows the spatial distribution of street greenness and street enclosure in Zhanjiang city, which provides reference materials for future city design and construction programs. It also suggests the municipal government keep the street enclosure as low as possible to protect the mental health of city dwellers when designing urban streetscapes.