Real-time identification of gas-liquid two-phase flow can help fluid systems maintain safe operating conditions. A flow pattern identification method based on a convolutional neural network (CNN) algorithm (after this referred to as liqnet) is proposed in this paper to realize automatic detection and real-time identification of two-phase flow patterns. This paper mainly focuses on solving two problems of CNN algorithm flow pattern identification (1): the experimental samples for two-phase flow classification are few, and (2): the existing methods do not fully consider the real-time nature of two-phase flow identification. Therefore, this paper constructs a two-phase flow database containing 6242 images using data enhancement, proposes a lightweight network liqnet, and compares it with six mainstream CNN models. The results show that liqnet can achieve the highest accuracy (98.65%), has the least amount of parameters (1.3708 M), and can achieve the purpose of real-time prediction (32.11FPS).