Sensors (Aug 2024)

A Complex Environmental Water-Level Detection Method Based on Improved YOLOv5m

  • Jiadong Li,
  • Chunya Tong,
  • Hongxing Yuan,
  • Wennan Huang

DOI
https://doi.org/10.3390/s24165235
Journal volume & issue
Vol. 24, no. 16
p. 5235

Abstract

Read online

The existing methods for water-level recognition often suffer from inaccurate readings in complex environments, which limits their practicality and reliability. In this paper, we propose a novel approach that combines an improved version of the YOLOv5m model with contextual knowledge for water-level identification. We employ the adaptive threshold Canny operator and Hough transform for skew detection and correction of water-level images. The improved YOLOv5m model is employed to extract the water-level gauge from the input image, followed by refinement of the segmentation results using contextual priors. Additionally, we utilize a linear regression model to predict the water-level value based on the pixel height of the water-level gauge. Extensive experiments conducted in real-world environments encompassing daytime, nighttime, occlusion, and lighting variations demonstrate that our proposed method achieves an average error of less than 2 cm.

Keywords