The intelligent advancement of agricultural machinery is a key focus in current agricultural engineering research. While machine vision technology has made preliminary progress in applications such as harvesting, breeding, and other crop-related fields, its use in defect detection for agricultural machinery remains limited. This study focused the airtightness defect detection of the agricultural machine pump, and presented a novel approach for automated detection based on machine vision. A deep learning algorithm based on MobileNetV3 convolutional neural network (CNN) was employed for the bubble recognition. In the airtightness detection experiment, the original bubble images were first processed by a bubble region extraction algorithm to reduce the image resolution. The post-processed images were then used for deep learning by MobileNetV3 CNN. The trained neural network model could recognize the bubble and its location in the airtightness detection. For performance evaluation, the recognition results could be compared with manually marked results to calculate the missing bubble recognition rate of the algorithm. The experiment results indicated that the missing recognition rate of the bubble algorithm is closely related with average diameter of the bubbles. The smaller of the average bubble diameter, the higher of the missing recognition rate, and the average bubble diameter was proportional to the leakage hole size on the pump. When the average bubble diameter was larger than 0.2 mm, the missing bubble recognition rate was below 2%, and when the average bubble diameter was smaller than 0.2 mm, the missing bubble recognition rate fluctuated between 5% and 10%. In this paper, the proposed bubble recognition algorithm effectively identifies and marks bubbles in images, enabling the detection of airtightness in agricultural pumps. However, further optimization is required to improve the algorithm's ability to recognize smaller bubbles and enhance its sensitivity to minute features in future work.