YOLO-BP network-based navigation obstruction risk perception method for channel surface flow state characteristics
Through the YOLO-BP network method, the flow characteristics of the waterway surface are automatically identified and evaluated, which solves the problem of insufficient accuracy and timeliness caused by traditional methods relying on manual observation, and realizes real-time, accurate identification and risk of the waterway surface flow state. Assessment and support navigation safety.
Patent Information
- Application Number
- CN202411235818.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-01-10
AI Technical Summary
The traditional waterway surface fluidic feature recognition method relies on manual observation, with low accuracy and untimely accuracy. The existing machine vision technology is not used to extract waterway surface fluidic features, resulting in insufficient accuracy and timeliness of risk assessment.
Using the YOLO-BP network method, through the steps of image input, preprocessing, fluid feature extraction and risk assessment, the YOLOV5s network and BP neural network are used to realize automatic identification and risk assessment of fluid features on the surface of the waterway, instead of artificial Observation improves the accuracy and timeliness of identification.
Real-time, accurate and convenient identification of the flow characteristics of the waterway surface is achieved, providing stronger accuracy, versatility and ease of use, and can promptly detect and evaluate risks and hinder navigation flow conditions, supporting navigation safety.
Smart Images

Figure CN119295913A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of smart waterways, and specifically is a method for perceiving navigation obstruction risks based on flow characteristics on the surface of a waterway based on a YOLO-BP network. Background Art
[0002] Specific water flow conditions in waterways are necessary to ensure safe and efficient navigation of ships. Under high flow conditions, the navigation posture and route of ships are easily disturbed by the obstructive flow patterns on the waterway surface. The identification and risk perception of flow characteristics on the waterway surface are important aspects of studying smart waterways.
[0003] Traditional methods for identifying flow characteristics on the channel surface often rely on manual observation or empirical inference methods. The accuracy of flow characteristics identification is limited by the experience and observation conditions of different observers, and the accuracy and timeliness of flow risk assessment need to be improved. There are many existing machine vision-based image feature extraction technologies, but there are no cases of using them to extract flow characteristics on the channel surface. Further development is needed for the perception method of risk flow. Summary of the invention
[0004] In order to address the shortcomings of existing observation methods, the present invention proposes a method for perceiving navigation hazards based on the flow characteristics of the waterway surface based on the YOLO-BP network, so as to meet the needs of timely perceiving and avoiding risky flow states when ships are passing through. The method can obtain the waterway surface flow characteristic data in real time, accurately and conveniently, and eliminates the hysteresis, danger and error of manual observation, so that the method of the present invention has stronger accuracy, versatility and ease of use than previous technologies.
[0005] In order to achieve the above technical features, the purpose of the present invention is achieved as follows: a method for perceiving navigation risks based on the flow characteristics of a waterway surface based on a YOLO-BP network, comprising: Step 1, image input: Acquire image data of a target water area of a waterway, and input the acquired image data into a computer; Step 2, image pre-processing: The acquired image data is pre-processed through the OpenCV library to obtain the corrected binary image data; Step 3, flow pattern feature extraction: Use labelImg to select the flow characteristics of the binary image data and make training samples. Input the training samples into the YOLOV5s network framework for training and extract the flow characteristic data. Step 4: Risk assessment of flow obstruction: The training samples of flow pattern characteristic data after manual evaluation are input into the BP neural network for cyclic iterative training to obtain the optimal flow pattern data navigation obstruction risk assessment value.
[0006] Preferably, the specific steps in step 1 are: Step 1.1, install a camera near the target water area; Step 1.2, obtaining video image data of the target water area through a camera; Step 1.3, transfer the acquired video image data to a computer.
[0007] Preferably, the specific steps in step 2 are: Step 2.1, use the cv2.VideoCapture.read() function in the OpenCV library to extract each frame of the video, and use the cv2.undistort() function and cv2.warpPerspective() function to correct the image distortion; Step 2.2, perform grayscale, contrast and gamma correction on the image, and use the cv2.threshold() function to perform global threshold binarization of the image; Step 2.3, finally get the corrected binary image data, and use the cv2.imwrite() function to save the processed image data locally, ready for subsequent processing.
[0008] Preferably, the specific steps in step 3 are: Step 3.1, use labelImg to select and label the flow features of the binary image data; Step 3.2, after completing the annotation of all image data, the annotation files will be saved in the specified directory, and the training samples will be produced; In step 3.3, the training samples are input into the YOLOV5s network framework, and the samples are trained and verified based on the YOLOV5s framework to extract the flow characteristic data from the target water area image data, and the flow characteristics of the target water area are saved locally in the form of a data file for analysis.
[0009] Preferably, the specific steps in step 4 are: Step 4.1, based on the flow characteristic data obtained in step 3, perform manual evaluation of flow risk classification and prepare training samples; Step 4.2, input the training samples into the BP neural network for cyclic iterative training to obtain the optimal wij and bij, where wij and bij are the weight values and bias values of the neurons in the hidden layer of the BP neural network, and ij represents the i-th neuron in the j-th hidden layer; Step 4.3: The output value is the risk classification assessment value corresponding to the input flow state.
[0010] Preferably, the method further includes step 5, displaying the flow state obstruction risk assessment result: After going through the process from step 1 to step 4, the surface flow characteristic data of the target water area in the video screen and the risk grading assessment data corresponding to each flow state are obtained. At the same time, the obtained flow characteristic data and the risk grading assessment data corresponding to each flow state are published to any matching fixed or portable terminal device for real-time display.
[0011] The present invention has the following beneficial effects: 1. The present invention extracts flow characteristics based on YOLOV5s, uses BP neural network to evaluate the risk classification of different flow characteristics, and uses machine learning to replace manual identification of waterway surface flow states, so as to timely discover and evaluate risky obstructive flow states. It has the advantages of being able to efficiently and conveniently identify risky flow characteristics on the surface of target waters in real time, and can provide technical support for preventing and resolving navigation safety risks caused by obstructive flow states.
[0012] 2. The present invention installs a camera near the target water area to store the surface flow image data of the target water area locally and transmit it to a computer, and its range can cover a water area of hundreds of meters long × wide.
[0013] 3. The present invention extracts frame images from the video image data of the target water area in time sequence, and performs pre-processing, including image binarization, image noise reduction, distortion correction, etc., and uses labelImg to produce training samples.
[0014] 4. The present invention trains and verifies samples based on the YOLOV5s framework, extracts flow characteristic data from the target water area image data, and saves the flow characteristics of the target water area locally in the form of a data file for analysis.
[0015] 5. The present invention prepares risk classification training samples of flow characteristics of target waters based on flow characteristic data, and uses BP neural network to conduct flow risk assessment training, so as to accurately, quickly and in large quantities obtain risk flow information of target waters, and provide data support for the safety management and control of ship navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0017] Figure 1 A flow chart of the method steps.
[0018] Figure 2 Set up high-definition cameras for the scene.
[0019] Figure 3 is the frame image after pre-processing.
[0020] Figure 4 To extract flow feature data based on the YOLOV5s framework.
[0021] Figure 5 Flow pattern risk assessment based on BP neural network. DETAILED DESCRIPTION
[0022] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0023] Embodiment 1: See also Figure 1-5 , a navigation risk perception method based on YOLO-BP network based on waterway surface flow characteristics, including: Step 1, image input: Step 1.1, install a camera near the target water area; Step 1.2, obtaining video image data of the target water area through a camera; Step 1.3, transfer the acquired video image data to a computer.
[0024] Step 2, image pre-processing: Step 2.1, use the cv2.VideoCapture.read() function in the OpenCV library to extract each frame of the video, and use the cv2.undistort() function and cv2.warpPerspective() function to correct the image distortion; Step 2.2, perform grayscale, contrast and gamma correction on the image, and use the cv2.threshold() function to perform global threshold binarization of the image; Step 2.3, finally get the corrected binary image data, and use the cv2.imwrite() function to save the processed image data locally, ready for subsequent processing.
[0025] Step 3, flow pattern feature extraction: Step 3.1, use labelImg to select and label the flow features of the binary image data; Step 3.2, after completing the annotation of all image data, the annotation files will be saved in the specified directory, and the training samples will be produced; In step 3.3, the training samples are input into the YOLOV5s network framework, and the samples are trained and verified based on the YOLOV5s framework to extract the flow characteristic data from the target water area image data, and the flow characteristics of the target water area are saved locally in the form of a data file for analysis.
[0026] Step 4: Risk assessment of flow obstruction: Step 4.1, based on the flow characteristic data obtained in step 3, perform manual evaluation of flow risk classification and prepare training samples; Step 4.2, input the training samples into the BP neural network for cyclic iterative training to obtain the optimal wij and bij, where wij and bij are the weight values and bias values of the neurons in the hidden layer of the BP neural network, and ij represents the i-th neuron in the j-th hidden layer; Step 4.3: The output value is the risk classification assessment value corresponding to the input flow state.
[0027] Step 5: Presentation of flow obstruction risk assessment results: After going through the process from step 1 to step 4, the surface flow characteristic data of the target water area in the video screen and the risk grading assessment data corresponding to each flow state are obtained. At the same time, the obtained flow characteristic data and the risk grading assessment data corresponding to each flow state are published to any matching fixed or portable terminal device for real-time display.
[0028] Embodiment 2: The present invention is further described below by taking the flow pattern identification of the Shipai waterway between the two dams of the Three Gorges-Gezhouba Water Conservancy Project on the Yangtze River as an example: Step 1, such as Figure 2 As shown, the video image data of the target water area is obtained by a camera installed on the left bank of Shipai Bend, and the obtained image data is transmitted to a computer; Step 2, image preprocessing, preprocess the acquired image data through the OpenCV library. Use the cv2.VideoCapture.read() function to extract each frame of the video, use the cv2.undistort() function and cv2.warpPerspective() function to correct the image distortion, perform grayscale, contrast and gamma correction on the image, and use the cv2.threshold() function to perform global threshold binarization of the image. Finally, the corrected binary image data is obtained, and the cv2.imwrite() function is used to save the processed image data locally, ready for subsequent processing. The pre-processed image is as follows Figure 3 shown.
[0029] Step 3, such as Figure 4 As shown, the image data is framed with flow features using labelImg and training samples are produced. The training samples are input into the YOLOV5s network framework for training to extract flow feature data.
[0030] Step 4, such as Figure 5As shown, based on the flow pattern characteristic data obtained in step 3, manual evaluation of flow pattern risk classification is performed and training samples are produced. The training samples are input into the BP neural network for cyclic iterative training to obtain the optimal wij and bij, and the output value is the risk classification evaluation value corresponding to the input flow pattern.
[0031] Among them, wij and bij are the weight values and bias values of the neurons in the hidden layer of the BP neural network, and ij represents the i-th neuron in the j-th hidden layer.
[0032] So far, based on the original video image data of the target water area collected initially, after the above steps 1 to 4, the surface flow characteristic data of the target water area in the video screen and the risk grading assessment data corresponding to each flow state are obtained. The obtained flow characteristic data and the risk grading assessment data corresponding to each flow state can be published to any matching fixed or portable terminal device for real-time display.
Claims
1. A method for perceiving navigation risks based on the flow characteristics of waterway surface based on YOLO-BP network, characterized in that: include: Step 1, image input: Acquire image data of a target water area of a waterway, and input the acquired image data into a computer; Step 2, image pre-processing: The acquired image data is pre-processed through the OpenCV library to obtain the corrected binary image data; Step 3, flow pattern feature extraction: Use labelImg to select the flow characteristics of the binary image data and make training samples. Input the training samples into the YOLOV5s network framework for training and extract the flow characteristic data. Step 4: Risk assessment of flow obstruction: The training samples of flow pattern characteristic data after manual evaluation are input into the BP neural network for cyclic iterative training to obtain the optimal flow pattern data navigation obstruction risk assessment value.
2. According to claim 1, a method for sensing navigation obstruction risk based on flow characteristics on waterway surface based on YOLO-BP network, characterized in that: The specific steps in step 1 are: Step 1.1, install a camera near the target water area; Step 1.2, obtaining video image data of the target water area through a camera; Step 1.3, transfer the acquired video image data to a computer.
3. According to claim 1, a method for perceiving navigation risk based on flow characteristics of waterway surface based on YOLO-BP network, characterized in that: The specific steps in step 2 are: Step 2.1, use the cv2.VideoCapture.read() function in the OpenCV library to extract each frame of the video, and use the cv2.undistort() function and cv2.warpPerspective() function to correct the image distortion; Step 2.2, perform grayscale, contrast and gamma correction on the image, and use the cv2.threshold() function to perform global threshold binarization of the image; Step 2.3, finally get the corrected binary image data, and use the cv2.imwrite() function to save the processed image data locally, ready for subsequent processing.
4. According to claim 1, a method for perceiving navigation risk based on flow characteristics of waterway surface based on YOLO-BP network, characterized in that: The specific steps in step 3 are: Step 3.1, use labelImg to select and label the flow features of the binary image data; Step 3.2, after completing the annotation of all image data, the annotation files will be saved in the specified directory, and the training samples will be produced; In step 3.3, the training samples are input into the YOLOV5s network framework, and the samples are trained and verified based on the YOLOV5s framework to extract the flow characteristic data from the target water area image data, and the flow characteristics of the target water area are saved locally in the form of a data file for analysis.
5. According to claim 1, a method for perceiving navigation risk based on flow characteristics of waterway surface based on YOLO-BP network, characterized in that: The specific steps in step 4 are: Step 4.1, based on the flow characteristic data obtained in step 3, perform manual evaluation of flow risk classification and prepare training samples; Step 4.2, input the training samples into the BP neural network for cyclic iterative training to obtain the optimal wij and bij, where wij and bij are the weight values and bias values of the neurons in the hidden layer of the BP neural network, and ij represents the i-th neuron in the j-th hidden layer; Step 4.3: The output value is the risk classification assessment value corresponding to the input flow state.
6. According to claim 1, a method for perceiving navigation risk based on flow characteristics of waterway surface based on YOLO-BP network, characterized in that: It also includes step 5, presentation of flow obstruction risk assessment results: After going through the process from step 1 to step 4, the surface flow characteristic data of the target water area in the video screen and the risk grading assessment data corresponding to each flow state are obtained. At the same time, the obtained flow characteristic data and the risk grading assessment data corresponding to each flow state are published to any matching fixed or portable terminal device for real-time display.