In the 16th and 17th centuries, under the influence of the Portuguese Empire’s overseas expansion and cultural integration, the island city of Macau became an important international trading port in the Eastern Sea, with close ties to the Asian port cities governed by Portugal. This study introduces a new method for comparing urban morphological layouts using machine learning and investigates the potential benefits of combining urban morphological analysis with machine learning techniques. In addition, a combination of urban morphology theory and machine learning is used to excise samples of urban morphology from Portuguese urban geographical information maps. The morphological characteristics of port city areas are further extracted, and training labels for typical Portuguese urban textures are established. Using the YOLOv4 object detection algorithm, the results are compared with the urban textures of typical island and port cities of the Asian Silk Road—Goa in India, Malacca in Malaysia, Macau in China, and Dili in Timor-Leste—revealing the similarities and differences among the port cities in Asia influenced by traditional Portuguese urban practices. The results reveal the relationship between maritime trade and urban form.