Various fields, such as the paper industry, chemical engineering, and renewable energy, are faced with gas-liquid two-phase flows and are being studied by visualization and observation. Although it is necessary to quantitatively evaluate the characteristics of bubbles, there is a limitation in the amount of labor required for detection and measurement by human observation of images. There are no examples for bubbles in polymer electrolyte membrane water electrolysis (PEMWE), where the bubbles in PEMWE have heterogeneous backgrounds, unpatterned patterns, and unclear bubble contours. Existing methods for detecting these bubbles are not expected to be accurate enough. In this study, a deep learning-based bubble detection method using convolutional neural networks (CNN) was developed for bubbles in PEMWE. Our method has two novel approaches: first, we developed an algorithm that automatically draws a pseudo-bubble image based on an actual bubble image on an arbitrary background as a method for automatically generating training data for the CNNs. Second, we developed a CNN-based bubble detection method that uses the motion of bubbles, specifically, the difference between the bubble image and the image from one frame ago, as input. Finally, we tested the algorithm on bubble images in a PEMWE and achieved an F1 score of 0.83 or better for all current densities of 0.5, 1, 2, and 3 A/cm 2 , and an F1 score of 0.844 for the entire detection.