Learning Urban Morphological Transformations Using Pix2Pix GANs: An Applied Study on Barcelona
DOI:
https://doi.org/10.71229/fs45rr66Keywords:
Pix2Pix, GAN, generative urban model, urban systems, Space Syntax , image-to-image translationAbstract
This study develops an applied urban-generation workflow using the Pix2Pix conditional Generative Adversarial Network (cGAN) for learning and reconstructing urban systems with paired before/after visual data. The first case study was chosen to be Barcelona due to the morphological clarity of the Eixample district. This is because of the presence of a legible grid, the repetition of urban blocks, the consistency in street orientation and the definition of relationships between blocks, streets and open spaces. The urban data was taken from OpenStreetMap and visually checked with Google Earth Pro before being transformed into a standardised black and white learning representation. A red intervention layer was included in the dataset to represent the urban project as the main transformative variable. The data were then sorted as Before-After (AB) image pairs, linking the current urban condition to the desired urban response after the insertion of the new project. The Pix2Pix model was trained in a Google Colab/PyTorch environment with a U-Net generator and a Patch GAN discriminator. The generated outputs were evaluated through visual comparison, morphological interpretation and theoretical analysis informed by Space Syntax, Christopher Alexander’s structural approach and Nikos Salingaros’ principles of urban networks. The results indicate that the model was most stable in regular grid-based sectors, where it was able to maintain street continuity and produce relatively coherent internal subdivisions. However, its performance was reduced in morphologically complex sectors, where visual noise, simplification and weaker internal spatial relationships were observed. The results indicate that generative models can be used to assist in urban design research by providing a means for identifying tendencies in urban transformations. However, their reliability remains linked to dataset clarity, consistent visual representation, and clearly defined spatial relations in the training samples.
References
[1] Carta, S. (Ed.). Machine Learning and the City: Applications in Architecture and Urban Design. Wiley-Blackwell, 2022.
[2] As, I., Basu, P., & Talwar, P. (Eds.). Artificial Intelligence in Urban Planning and Design: Technologies, Implementation, and Impacts. Elsevier, 2022.
[3] Leach, N. Architecture in the Age of Artificial Intelligence: An Introduction to AI for Architects. Bloomsbury Visual Arts, 2022.
[4] Stojanovski, T. Urban morphology and artificial intelligence. Urban Morphology, 26(1), 65-68, 2022.
[5] Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., & Bengio, Y. Generative adversarial nets. In Advances in Neural Information Processing Systems, 27, 2014.
[6] Goodfellow, I., Bengio, Y., & Courville, A. Deep Learning. MIT Press, 2016.
[7] Mirza, M., & Osindero, S. Conditional generative adversarial nets. arXiv:1411.1784, 2014.
[8] Isola, P., Zhu, J.-Y., Zhou, T., & Efros, A. A. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1125-1134, 2017.
[9] Ronneberger, O., Fischer, P., & Brox, T. U-Net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention (MICCAI), pp. 234-241. Springer, 2015.
[10] Cerda, I. Teoria General de la Urbanizacion. Imprenta Espanola, 1867.
[11] Busquets, J. Barcelona: The Urban Evolution of a Compact City. Harvard University Graduate School of Design, 2005.
[12] Urbano, J. The Cerda Plan for the Expansion of Barcelona: A model for modern city planning. FOCUS, 12, 48-53, 2016.
[13] Conzen, M. R. G. Alnwick, Northumberland: A Study in Town-Plan Analysis. Institute of British Geographers, 1960.
[14] Moudon, A. V. Urban morphology as an emerging interdisciplinary field. Urban Morphology, 1(1), 3-10, 1997.
[15] Oliveira, V. Urban Morphology: An Introduction to the Study of the Physical Form of Cities. Springer, 2016.
[16] Kropf, K. The Handbook of Urban Morphology. Wiley, 2017.
[17] Hillier, B., & Hanson, J. The Social Logic of Space. Cambridge University Press, 1984.
[18] Hillier, B. Space is the Machine: A Configurational Theory of Architecture. Cambridge University Press, 1996.
[19] Turner, A. Depthmap: A program to perform visibility graph analysis. In Proceedings of the 3rd International Space Syntax Symposium, 2001.
[20] Al-Sayed, K., Turner, A., Hillier, B., Iida, S., & Penn, A. Space Syntax Methodology. Bartlett School of Architecture, University College London, 2014.
[21] Alexander, C., Ishikawa, S., & Silverstein, M. A Pattern Language: Towns, Buildings, Construction. Oxford University Press, 1977.
[22] Salingaros, N. A. Theory of the urban web. Journal of Urban Design, 3(1), 53-71, 1998.
[23] Salingaros, N. A. Principles of Urban Structure. Techne Press, 2005.
[24] Haklay, M., & Weber, P. OpenStreetMap: User-generated street maps. IEEE Pervasive Computing, 7(4), 12-18, 2008.
[25] Haklay, M. How good is volunteered geographical information? A comparative study of OpenStreetMap and Ordnance Survey datasets. Environment and Planning B: Planning and Design, 37(4), 682-703, 2010.
[26] Chollet, F. Deep Learning with Python. Manning, 2018.
[27] Zhu, J.-Y., Park, T., Isola, P., & Efros, A. A. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pp. 2223-2232, 2017.
[28] Quan, S. J., Park, J., Economou, A., & Lee, S. Urban-GAN: An artificial intelligence-aided computation system for plural urban design. Environment and Planning B: Urban Analytics and City Science, 49(9), 2500-2515, 2022.
[29] Gan, W., Lin, Y., Chen, Z., et al. UDGAN: A new urban design inspiration approach driven by using generative adversarial networks. Journal of Computational Design and Engineering, 11(1), 305-329, 2024.
[30] Alexander, C. The Nature of Order: An Essay on the Art of Building and the Nature of the Universe, Book One: The Phenomenon of Life. Center for Environmental Structure, 2002.
[31] Tokgoz, O., & Altin, M. A. Generative Adversarial Networks (GANs), and architecture: Investigating quality in architectural plan generation. Journal of Computational Design, 6(1), 191-210, 2025.
[32] Batty, M. The New Science of Cities. MIT Press, 2013.
[33] Terzidis, K. Algorithmic Architecture. Architectural Press, 2006.
[34] W. Gan, Z. Zhao, Y. Wang, et al., "UDGAN: A New Urban Design Inspiration Approach Driven by Using Generative Adversarial Networks," Journal of Computational Design and Engineering, vol. 11, no. 1, pp. 305–324, 2024.
[35] F. Jiang, J. Ma, C. J. Webster, X. Li, and V. J. L. Gan, "Building Layout Generation Using Site-Embedded GAN Model," Automation in Construction, 2023.
[36] X. Xu et al., "Design of Conditional Control Generation Based on Regional Feature Quantification: Practical Investigation of Diffusion Models in Developed Urban Areas," Frontiers in Built Environment, vol. 12, 2026.
[37] Q. Wang, Y. Liang, Y. Zheng, K. Xu, J. Zhao, and S. Wang, "Generative AI for Urban Planning: Synthesizing Satellite Imagery via Diffusion Models," arXiv preprint arXiv:2505.08833, 2025.
[38] "Human-Guided Urban Form Generation Using Multimodal Diffusion Models," Building and Environment, vol. 287, Art. no. 113892, 2026.
[39] "Constrained Topology Diffusion Transformer for Urban Architectural Landscape Layout Generation," Alexandria Engineering Journal, vol. 146, pp. 349–361, 2026.
[40] "Generative AI for Urban Planning and Design: Progress Review and Future Perspectives," Engineering, 2026.
[41] Z. Cai, "Urban Spatial Dynamic Modeling in Transition: Hybrid, Human-Centric, and Scalable Futures," Ambio, 2026.
[42] D. Wang, C.-T. Lu, and Y. Fu, "Towards Automated Urban Planning: When Generative and ChatGPT-like AI Meets Urban Planning," arXiv preprint arXiv:2304.03892, 2023.
[43] D. Mo, M. Sun, C. Yin, R. Tian, Y. Wu, and L. Xu, "RECITYGEN: Interactive and Generative Participatory Urban Design Tool with Latent Diffusion and Segment Anything," arXiv preprint, 2026.
[44] "The Application of Deep Generative Models in Urban Form Generation Based on Topology: A Review," Architectural Science Review, vol. 67, no. 3, pp. 250–268, 2023.
[45] R. Li, W. Li, Y. Yang, H. Wei, J. Jiang, and Q. Bai, "Swinv2-Imagen: Hierarchical Vision Transformer Diffusion Models for Text-to-Image Generation," Neural Computing and Applications, vol. 36, pp. 17245–17260, 2024.
[46] S. Bengesi et al., "Advancements in Generative AI: A Comprehensive Review of GANs, GPT, Autoencoders, Diffusion Models, and Transformers," arXiv preprint arXiv:2311.10242, 2023.
[47] O. Tokgoz and M. Altin, "Generative Adversarial Networks and Architecture: Investigating Quality in Architectural Plan Generation," Journal of Computational Design, vol. 6, no. 1, pp. 191–210, 2025.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Al-Noor Journal of Engineering Management and Computer Science

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.





