In the multiple-phase pipelines in terms of the subsea oil and gas industry, the occurrence of slug flow would cause damage to the pipelines and related equipment. Therefore, it is very necessary to develop a real-time and high-precision slug flow identification technology. In this study, the Yolo object detection algorithm and embedded deployment are applied initially to slug flow identification. The annotated slug flow images are used to train seven models in Yolov5 and Yolov3. The high-precision detection of the gas slug and dense bubbles in the slug flow image in the vertical pipe is realized, and the issue that the gas slug cannot be fully detected due to being blocked by dense bubbles is solved. After model performance analysis, Yolov5n is verified to have the strongest comprehensive detection performance, during which, mAP0.5 is 93.5%, mAP0.5:0.95 is 65.1%, and comprehensive mAP (cmAP) is 67.94%; meanwhile, the volume of parameters and Flops are only 1,761,871 and 4.1 G. Then, the applicability of Yolov5n under different environmental conditions, such as different brightness and adding random obstructions, is analyzed. Finally, the trained Yolov5n is deployed to the Jetson Nano embedded device (NVIDIA, Santa Clara, CA, USA), and TensorRT is used to accelerate the inference process of the model. The inference speed of the slug flow image is about five times of the original, and the FPS has increased from 16.7 to 83.3.