The invention discloses a
sewage treatment
plant water level safety detection method based on an AI visual
algorithm, and the method comprises the following steps: S1, reading a video frame, carrying out the single-frame
water level recognition, carrying out the real-
time data cleaning optimization according to a single-frame
water level recognition result, and inhibiting the interference of liquid surface impurities and steam through multi-frame fusion and self-adaptive preprocessing; s2, generating
sewage pool area positioning by using a
mask, and extracting an effective area ROI in the
pool; s3,
water body features are recognized through HSV color filtering, liquid level segmentation is carried out, and the water level height is calculated; s4, the size relation between the current water level height and the warning threshold value and the size relation between the interval between the
current time and the last alarm and the anti-shake interval are judged, if the composite judgment logic is met at the same time, the step S5 is executed, and otherwise,
image labeling is normal; and S5, performing multi-mode alarm by using vision and voice broadcast. The water level identification accuracy of the
sewage pool in a complex scene can be improved, and the stability of water level abnormity judgment is improved.