Globalization and urbanization have caused unprecedented impacts in local identification and cultural protection, and rivers that cross administrative boundaries have attracted attention in the protection of local cultural heritage, resource integration and mobilization. This study selected several cities in the Yellow River Basin and the Rhine River Basin as examples, using street view images, combining locality theory with computer vision analysis methods, and proposing a framework for quantitative research on locality expression. Then the generation mechanism of the local characteristics was discussed. The results show that the cities in the two countries show significant differences, whereas some cities in the basin are similar. The images of the ‘Built Environment' and ‘Social Life' are more conducive to identifying the cities. The construction qualities of ‘Remains' and ‘Water' are the key built environmental factors for the coexistence of locality differences and similarities. The protection of historic buildings and less manual intervention in the water environment are of great significance to the local shaping of German cities and have reference value for developing Chinese cities. The research responds to the homogenization of the urban landscape, the symbiotic relationship between cities and water, and sustainable development in river basin cities.