Ultrasound technology has been recognized as the mainstream approach for the identification of gas-liquid two-phase flow patterns, which holds great value in engineering domain. However, commercial rigid probes are bulky, limiting their adaptability to curved surfaces. Here, we propose a strategy for autonomous identification of flow patterns based on flexible ultrasound array and machine learning. The array features high-performance 1–3 piezoelectric composite material, stretchable serpentine wires, soft Eco-flex layers and a polydimethylsiloxane (PDMS) adhesive layer. The resulting ultrasound array exhibits excellent electromechanical characteristics and offers a large stretchability for an intimate interfacial contact to curved surface without the need of ultrasound coupling agents. We demonstrated that the flexible ultrasound array combined with machine learning can accurately identify gas-liquid two-phase flow patterns, in a circular pipeline. This work presents an effective tool for recognizing gas-liquid two-phase flow patterns, offering engineering opportunities in petroleum extraction and natural gas transportation.