CN114529815A - Deep learning-based traffic detection method, device, medium and terminal - Google Patents

Deep learning-based traffic detection method, device, medium and terminal Download PDF

Info

Publication number
CN114529815A
CN114529815A CN202210127063.8A CN202210127063A CN114529815A CN 114529815 A CN114529815 A CN 114529815A CN 202210127063 A CN202210127063 A CN 202210127063A CN 114529815 A CN114529815 A CN 114529815A
Authority
CN
China
Prior art keywords
water flow
flow
image
detection model
data set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210127063.8A
Other languages
Chinese (zh)
Inventor
段凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202210127063.8A priority Critical patent/CN114529815A/en
Publication of CN114529815A publication Critical patent/CN114529815A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/30Assessment of water resources

Abstract

The invention discloses a flow detection method, a device, a medium and a terminal based on deep learning, comprising the following steps: acquiring a first water flow image to be identified; inputting the first water flow image into a preset flow detection model so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of the water flow to be identified, and outputting the first water flow of the water flow to be identified according to the first flow information as a flow detection result of the first water flow image; the flow detection model is obtained after the convolutional neural network is trained according to a first sample data set, and the first sample data set comprises a plurality of second water flow images and second water flow corresponding to each second water flow image. The method utilizes the sample data set to train and verify the convolutional neural network, obtains the flow detection model capable of accurately expressing the mapping relation between the water flow image and the water flow, inputs the first water flow image to be identified into the flow detection model, and realizes flow detection.

Description

Deep learning-based traffic detection method, device, medium and terminal
Technical Field
The invention relates to the field of water flow detection, in particular to a flow detection method, a flow detection device, a flow detection medium and a flow detection terminal based on deep learning.
Background
The conventional flow test method includes: a flow velocity-area method in which the cross-sectional area and the flow velocity are measured and the product of the two is calculated, a hydraulic method in which the flow rate is calculated by a hydraulic formula, a chemical method in which the flow rate is estimated by the diffusion concentration of an indicator, a volumetric method and a gravimetric method in which the flow is directly collected, and the like. The flow velocity-area method based on various flow velocity and section area measuring technologies is a conventional flow measuring method widely used in various countries in the world at present, and is also regarded as a standard for calibrating or checking other flow testing methods. Further, in addition to the conventional rotor current meter and ultrasonic method, electromagnetic method, optical method, etc., the digital flow measurement method based on river surface space-time image recognition is also attracting attention. The method obtains the river surface flow velocity information through the non-contact video image monitoring equipment, calculates the deep flow velocity and the total flow of the water cross section, and has the advantages of low cost, high speed, easy operation, no limitation of river sand content and the like. However, the existing image flow measuring method is generally applicable to large and medium rivers with large flow and gentle terrain change, the calculation of the water flow is based on the measurement and calculation of a fixed water cross section area and a one-dimensional time-averaged water flow velocity vector field on the cross section, and the mathematical expression of the correlation between the surface flow velocity and the deep flow velocity is difficult to apply to mountain creek flow with large specific drop and uneven cross section shape. On the other hand, the image flow measuring method depends on the accuracy of the image, and the existing method is difficult to effectively implement under adverse weather conditions such as overcast and rainy conditions, haze conditions and the like.
The existing flow detection method is limited by the terrain, and the flow in mountainous areas is usually calculated by measuring the overflow head at the top of a weir by means of a measuring weir and related canal system buildings. The design, construction and maintenance costs of the measuring weir are high, and for unconditional areas, the flow measurement usually adopts a chemical method or a volumetric method, and the methods have the defects of complicated steps, high labor cost and rich practical experience, and difficulty in realizing automatic continuous observation.
Disclosure of Invention
The invention provides a flow detection method, a flow detection device, a medium and a terminal based on deep learning, which are used for realizing automatic detection of water flow, reducing the limited degree of a detection environment and improving the detection accuracy.
In order to solve the above technical problem, an embodiment of the present invention provides a deep learning-based traffic detection method, including:
acquiring a first water flow image to be identified;
inputting the first water flow image into a preset flow detection model, so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of water flow to be identified, and outputting the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information; the flow detection model is obtained by training a convolutional neural network according to a first sample data set, wherein the first sample data set comprises a plurality of second water flow images and second water flow corresponding to each second water flow image.
By implementing the embodiment of the application, the constructed convolutional neural network is trained and verified by utilizing the second water flow image acquired on the spot and the corresponding second water flow, so as to obtain the flow detection model, the second water flow image to be recognized is subjected to feature extraction through the flow detection model, the feature extraction result is converted into flow data, the flow data is used as the flow detection result of the first water flow image, the automatic detection of the second water flow image to be recognized is realized, the limitation degree of adverse conditions such as uneven section shape, large specific reduction and the like is reduced, and the accuracy of flow detection is prevented from being influenced.
As a preferred scheme, the obtaining of the flow detection model specifically includes:
shooting the water flow to be identified to obtain a plurality of second water flow images, observing the water flow to be identified in real time by a preset observation method to obtain second water flow corresponding to the second water flow images, and taking all the second water flow images and the second water flow corresponding to each second water flow image as a first sample data set;
and constructing a convolutional neural network, and training and verifying the convolutional neural network by using the first sample data set to form a mapping relation between a water flow image and water flow so as to obtain a flow detection model.
By implementing the embodiment of the application, the water flow to be recognized is respectively shot and observed in real time, a plurality of second water flow images and the second water flow corresponding to each second water flow image are obtained and serve as the first sample data set, the training verification of the constructed convolutional neural network is realized, and the detection precision of the flow detection model is further improved.
As a preferred scheme, the building of a convolutional neural network, and performing training verification on the convolutional neural network by using the first sample data set to form a mapping relationship between a water flow image and a water flow rate, so as to obtain a flow detection model specifically comprises:
constructing a convolutional neural network, dividing the first sample data set into a first data set and a second data set, and then training the convolutional neural network by using the first data set to form an initial mapping relation between a water flow image and water flow so as to obtain an initial flow detection model;
inputting a second water flow image in the second data set to the initial flow detection model to obtain a current flow detection result of the second water flow image, and calculating to obtain flow detection precision of the initial flow detection model according to the current flow detection result of the second water flow image and a second water flow corresponding to the current second water flow image;
and when the flow detection precision reaches an expected value, finishing the training verification of the convolutional neural network, considering that the current initial mapping relation is the mapping relation between the water flow image and the water flow, and taking the initial flow detection model after the training verification as a flow detection model.
By implementing the embodiment of the application, the constructed convolutional neural network is trained and verified, the output result of the convolutional neural network is compared with field observation data, the precision of the output result is checked, network parameters are optimized and adjusted, the finally obtained flow detection model is more suitable for flow detection of water flow to be identified, and the accuracy of flow detection is further improved.
As a preferable scheme, before the inputting the first water flow image into a preset flow detection model to enable the flow detection model to perform feature extraction on the first water flow image, obtain first flow information of a water flow to be identified, and outputting the first water flow of the water flow to be identified according to the first flow information, as a flow detection result of the first water flow image, the method further includes:
selecting the second water flow image under a sunny weather condition as a clean image, selecting the second water flow image under a non-sunny weather condition as a blurred image, and using the clean image and the blurred image as a second sample data set from the first sample data set; the difference value between the second water flow corresponding to the clean image and the second water flow corresponding to the blurred image is smaller than a preset threshold value;
and constructing a denoising convolutional neural network based on a ReLU activation function, and training the denoising convolutional neural network by using the second sample data set to obtain a denoising model.
By implementing the embodiment of the application, the second water flow image under different weather conditions can be utilized to train the denoising convolutional neural network, and the accurate mapping relation between the fuzzy image and the clean image is established, so that the finally obtained denoising model can preprocess the water flow image under the non-clear weather, the water flow image details are recovered, and the flow detection model can better perform feature extraction on the water flow image.
As a preferred scheme, the inputting the first water flow image into a preset flow detection model to enable the flow detection model to perform feature extraction on the first water flow image, obtain first flow information of a water flow to be identified, and outputting the first water flow of the water flow to be identified according to the first flow information, as a flow detection result of the first water flow image, specifically includes:
judging whether the weather condition of the first water flow image is a clear weather condition or not;
if so, inputting the first water flow image to the flow detection model so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of the water flow to be identified, and outputting the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information;
if not, inputting the first water flow image to the denoising model so as to perform denoising pretreatment on the first water flow image to obtain a corresponding third water flow image, inputting the third water flow image to the flow detection model so as to perform feature extraction on the third water flow image by the flow detection model to obtain first flow information of the water flow to be recognized, and outputting the first water flow of the water flow to be recognized as a flow detection result of the first water flow image according to the first flow information.
By implementing the embodiment of the application, before the first water flow image is input into the flow detection model, whether the weather condition of the current first water flow image is a clear condition or not is judged, so that the first water flow image under adverse weather conditions such as overcast and rainy and haze is subjected to denoising pretreatment in advance, the image details are recovered, the interference of factors such as severe weather and air pollution to the image feature extraction process is reduced, and the accuracy of the flow detection model is further improved.
In order to solve the same technical problem, the invention also provides a flow detection device based on deep learning, which comprises:
the image acquisition module is used for acquiring a first water flow image to be identified;
the flow detection module is used for inputting the first water flow image into a preset flow detection model so as to enable the flow detection model to perform feature extraction on the first water flow image, obtain first flow information of water flow to be identified, and output the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information; the flow detection model is obtained by training a convolutional neural network according to a first sample data set, wherein the first sample data set comprises a plurality of second water flow images and second water flow corresponding to each second water flow image.
Preferably, the deep learning based flow rate detection apparatus further includes:
the denoising model training module is used for selecting the second water flow image under the sunny weather condition as a clean image, selecting the second water flow image under the non-sunny weather condition as a fuzzy image and taking the clean image and the fuzzy image as a second sample data set from the first sample data set; the difference value between the second water flow corresponding to the clean image and the second water flow corresponding to the blurred image is smaller than a preset threshold value; and constructing a denoising convolutional neural network based on a ReLU activation function, and training the denoising convolutional neural network by using the second sample data set to obtain a denoising model.
Preferably, the flow rate detecting module further includes:
the sample acquisition unit is used for shooting the water flow to be identified to obtain a plurality of second water flow images, observing the water flow to be identified in real time by a preset observation method to obtain second water flow corresponding to the second water flow images, and then taking all the second water flow images and the second water flow corresponding to each second water flow image as a first sample data set;
the flow detection model training unit is used for constructing a convolutional neural network, dividing the first sample data set into a first data set and a second data set, and then training the convolutional neural network by using the first data set to form an initial mapping relation between a water flow image and water flow so as to obtain an initial flow detection model; inputting a second water flow image in the second data set to the initial flow detection model to obtain a current flow detection result of the second water flow image, and calculating to obtain flow detection precision of the initial flow detection model according to the current flow detection result of the second water flow image and a second water flow corresponding to the current second water flow image; when the flow detection precision reaches an expected value, finishing the training verification of the convolutional neural network, considering the current initial mapping relation as the mapping relation between the water flow image and the water flow, and taking an initial flow detection model after the training verification as a flow detection model;
the flow detection unit is used for judging whether the weather condition of the first water flow image is a clear weather condition or not; if so, inputting the first water flow image to the flow detection model so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of the water flow to be identified, and outputting the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information; if not, inputting the first water flow image to the denoising model so as to perform denoising pretreatment on the first water flow image to obtain a corresponding third water flow image, inputting the third water flow image to the flow detection model so as to perform feature extraction on the third water flow image by the flow detection model to obtain first flow information of the water flow to be recognized, and outputting the first water flow of the water flow to be recognized as a flow detection result of the first water flow image according to the first flow information.
In order to solve the same technical problem, the present invention also provides a computer-readable storage medium including a stored computer program; and when the computer program runs, controlling the equipment where the computer readable storage medium is located to execute the deep learning-based flow detection method.
In order to solve the same technical problem, the invention also provides a terminal, which comprises a processor, a memory and a computer program stored in the memory; wherein the computer program is executable by the processor to implement the deep learning based traffic detection method.
Drawings
FIG. 1: the invention provides a flow chart of the steps of one embodiment of the deep learning-based flow detection method;
FIG. 2: the invention provides a structure schematic diagram of a flow detection device based on deep learning;
FIG. 3: the invention provides a structural schematic diagram of a flow detection module of a flow detection device based on deep learning.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
referring to fig. 1, a flow chart of steps of a deep learning-based traffic detection method according to an embodiment of the present invention includes steps S1 to S2, where the steps are as follows:
in step S1, a first water flow image to be recognized is acquired.
Specifically, the water flow to be identified can be shot by a civil camera so as to obtain a real-time on-site first water flow image.
Step S2, inputting the first water flow image into a preset flow detection model, so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of a water flow to be identified, and outputting a first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information; the flow detection model is obtained by training a convolutional neural network according to a first sample data set, wherein the first sample data set comprises a plurality of second water flow images and second water flow corresponding to each second water flow image.
By implementing the embodiment of the application, the constructed convolutional neural network is trained and verified by utilizing the second water flow image acquired on the spot and the corresponding second water flow, so as to obtain the flow detection model, the second water flow image to be recognized is subjected to feature extraction through the flow detection model, the feature extraction result is converted into flow data, the flow data is used as the flow detection result of the first water flow image, the automatic detection of the second water flow image to be recognized is realized, the limitation degree of adverse conditions such as uneven section shape, large specific reduction and the like is reduced, and the accuracy of flow detection is prevented from being influenced.
Preferably, the step S2 includes a step S21 to a step S23, and each step is as follows:
step S21, shooting the water flow to be identified to obtain a plurality of second water flow images, observing the water flow to be identified in real time by a preset observation method to obtain second water flow corresponding to the second water flow images, and then taking all the second water flow images and the second water flow corresponding to each second water flow image as a first sample data set.
Specifically, the terrain and the topography of water flow to be recognized are firstly surveyed, a certain section of the water flow to be recognized is selected as a shooting object, then an equipment support is erected on the bank, non-contact camera monitoring equipment is installed, the shooting angle of the camera monitoring equipment is adjusted and fixed, so that the picture captured by the camera can cover the water flow range in the high water level, and finally, a communication device is installed, so that the shot image can be transmitted to a computer terminal in real time. After all the equipment is installed, long-time acquisition of video samples is carried out so as to obtain water flow videos in different seasons and under meteorological conditions, and randomness and representativeness of the samples are guaranteed. And intercepting the video sample based on video clipping software to obtain a large amount of second water flow images and recording corresponding shooting time.
And simultaneously, observing the water flow to be identified in real time through a water measuring weir or other observation methods, and obtaining a plurality of second water flow rates of the video sample within the corresponding time.
By implementing the embodiment of the application, the water flow to be recognized is respectively shot and observed in real time, a plurality of second water flow images and the second water flow corresponding to each second water flow image are obtained and serve as the first sample data set, the training verification of the constructed convolutional neural network is realized, and the detection precision of the flow detection model is further improved.
And step S22, constructing a convolutional neural network, and training and verifying the convolutional neural network by using the first sample data set to form a mapping relation between a water flow image and water flow to obtain a flow detection model.
Preferably, the step S22 includes steps S221 to S223, and each step is as follows:
step S221, a convolutional neural network is built, the first sample data set is divided into a first data set and a second data set, then the convolutional neural network is trained by utilizing the first data set, an initial mapping relation between a water flow image and water flow is formed, and an initial flow detection model is obtained.
Step S222, inputting the second water flow image in the second data set to the initial flow rate detection model to obtain a current flow rate detection result of the second water flow image, and calculating the flow rate detection accuracy of the initial flow rate detection model according to the current flow rate detection result of the second water flow image and the second water flow rate corresponding to the current second water flow image.
Specifically, the convolutional neural network is trained by using the first data set to form an initial mapping relation between a water flow image and real-time water flow, that is, parameters of the convolutional neural network are adjusted to obtain an initial flow detection model, calibration of the model is realized, an analog value output by the initial flow detection model is compared with an actually measured value in the second data set, and then the precision of an output result of the current initial flow detection model is verified.
And step S223, finishing the training verification of the convolutional neural network when the flow detection precision reaches an expected value, considering that the current initial mapping relation is the mapping relation between the water flow image and the water flow, and taking the initial flow detection model after the training verification as a flow detection model.
Specifically, when the expected accuracy is not reached, a new sample is reselected, the first sample data set is expanded, namely the training amount is increased, and the training verification of the convolutional neural network is continued until the expected accuracy is reached; and when the expected precision is reached, finishing the training verification of the convolutional neural network, and taking the initial flow detection model after the training verification as a flow detection model.
By implementing the embodiment of the application, the constructed convolutional neural network is trained and verified, the output result of the convolutional neural network is compared with field observation data, the precision of the output result is checked, network parameters are optimized and adjusted, the finally obtained flow detection model is more suitable for flow detection of water flow to be identified, and the accuracy of flow detection is further improved.
Preferably, before the step S23, the method further includes a step S01 to a step S02, and each step is as follows:
step S01, selecting the second water flow image under a sunny weather condition as a clean image, selecting the second water flow image under a non-sunny weather condition as a blurred image, and using the clean image and the blurred image as a second sample data set from the first sample data set; and the difference value between the second water flow corresponding to the clean image and the second water flow corresponding to the blurred image is smaller than a preset threshold value.
Specifically, from the first sample data set, second water flow images under the conditions of sunny weather with similar flow and non-sunny weather such as overcast and rainy conditions and haze conditions are selected and respectively used as clean images and fuzzy images in one-to-one correspondence. As an example, the difference between the flow rates of the clean image and the blurred image should be less than 2m3/s。
And step S02, constructing a denoising convolutional neural network based on the ReLU activation function, and training the denoising convolutional neural network by using the second sample data set to obtain a denoising model.
Specifically, a clean image and a fuzzy image with similar flow are used as a comparison training set, image denoising training is carried out on a denoising convolutional neural network based on a ReLU activation function, a mapping relation between the fuzzy image and the clean image is established, namely parameters of the denoising convolutional neural network are adjusted, and a corresponding denoising model is obtained.
By implementing the embodiment of the application, the second water flow image under different weather conditions can be utilized to train the denoising convolutional neural network, and the accurate mapping relation between the fuzzy image and the clean image is established, so that the finally obtained denoising model can preprocess the water flow image under the non-clear weather, the water flow image details are recovered, and the flow detection model can better perform feature extraction on the water flow image.
Step S23, determining whether the weather condition of the first water flow image is a clear weather condition, if so, executing step S231, and if not, executing step S232.
Step S231, inputting the first water flow image to the flow detection model, so that the flow detection model performs feature extraction on the first water flow image, obtains first flow information of the water flow to be identified, and outputs the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information.
Step S232, inputting the first water flow image to the denoising model, so as to perform denoising preprocessing on the first water flow image, obtain a corresponding third water flow image, and inputting the third water flow image to the flow detection model, so as to perform feature extraction on the third water flow image by the flow detection model, obtain first flow information of the water flow to be recognized, and output the first water flow of the water flow to be recognized according to the first flow information, as a flow detection result of the first water flow image.
Specifically, the traffic detection model is composed of a feature extraction neural network and a classification neural network, wherein the feature extraction network comprises a pair of convolutional layers and pooling layers. When the water flow image is input to the flow detection model, the convolution layer of the feature extraction network extracts flow state information on a three-dimensional space and feature mapping of a flow coverage range from the water flow image, then the flow state information is input to the pooling layer to reduce image dimensionality, and finally signals output by the pooling layer are input to the classification neural network to be operated to generate a flow value.
By implementing the embodiment of the application, before the first water flow image is input into the flow detection model, whether the weather condition of the current first water flow image is a clear condition or not is judged, so that the first water flow image under adverse weather conditions such as overcast and rainy and haze is subjected to denoising pretreatment in advance, image noise is eliminated, image details are restored, interference of factors such as severe weather and air pollution to the image feature extraction process is reduced, and the accuracy of the flow detection model is further improved.
Example two:
accordingly, referring to fig. 2, a schematic structural diagram of a deep learning-based traffic detection device according to an embodiment of the present invention is shown, where the deep learning-based traffic detection device includes an image acquisition module and a traffic detection module, and each module specifically includes:
the image acquisition module 1 is used for acquiring a first water flow image to be identified;
the flow detection module 2 is configured to input the first water flow image to a preset flow detection model, so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of a water flow to be identified, and output the first water flow of the water flow to be identified according to the first flow information as a flow detection result of the first water flow image; the flow detection model is obtained by training a convolutional neural network according to a first sample data set, wherein the first sample data set comprises a plurality of second water flow images and second water flow corresponding to each second water flow image.
As a preferred scheme, the deep learning-based flow detection device further includes a denoising model training module, which specifically includes:
the denoising model training module 3 is configured to select the second water flow image under a clear weather condition as a clean image, select the second water flow image under a non-clear weather condition as a blurred image, and use the clean image and the blurred image as a second sample data set from the first sample data set; the difference value between the second water flow corresponding to the clean image and the second water flow corresponding to the blurred image is smaller than a preset threshold value; and constructing a denoising convolutional neural network based on a ReLU activation function, and training the denoising convolutional neural network by using the second sample data set to obtain a denoising model.
As a preferred scheme, referring to fig. 3, the flow detection module includes a sample obtaining unit, a flow detection model training unit, and a flow detection unit, and each unit is specifically configured to:
the sample acquisition unit is used for shooting the water flow to be identified to obtain a plurality of second water flow images, observing the water flow to be identified in real time by a preset observation method to obtain second water flow corresponding to the second water flow images, and then taking all the second water flow images and the second water flow corresponding to each second water flow image as a first sample data set;
the flow detection model training unit is used for constructing a convolutional neural network, dividing the first sample data set into a first data set and a second data set, and then training the convolutional neural network by using the first data set to form an initial mapping relation between a water flow image and water flow so as to obtain an initial flow detection model; inputting a second water flow image in the second data set to the initial flow detection model to obtain a current flow detection result of the second water flow image, and calculating to obtain flow detection precision of the initial flow detection model according to the current flow detection result of the second water flow image and a second water flow corresponding to the current second water flow image; when the flow detection precision reaches an expected value, finishing the training verification of the convolutional neural network, considering that the current initial mapping relation is the mapping relation between the water flow image and the water flow, and taking an initial flow detection model after the training verification as a flow detection model;
the flow detection unit is used for judging whether the weather condition of the first water flow image is a clear weather condition or not; if so, inputting the first water flow image to the flow detection model so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of the water flow to be identified, and outputting the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information; if not, inputting the first water flow image to the denoising model so as to perform denoising pretreatment on the first water flow image to obtain a corresponding third water flow image, inputting the third water flow image to the flow detection model so as to perform feature extraction on the third water flow image by the flow detection model to obtain first flow information of the water flow to be recognized, and outputting the first water flow of the water flow to be recognized as a flow detection result of the first water flow image according to the first flow information.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
EXAMPLE III
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program; when the computer program runs, the device where the computer-readable storage medium is located is controlled to execute the flow detection method based on deep learning according to the first embodiment.
Example four
The embodiment of the invention also provides a terminal, which comprises a processor, a memory and a computer program stored in the memory; wherein the computer program is executable by the processor to implement a deep learning based traffic detection method according to the first embodiment.
Preferably, the computer program may be divided into one or more modules/units (e.g., computer program) that are stored in the memory and executed by the processor to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program in the terminal.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, etc., a general purpose Processor may be a microprocessor, or the Processor may be any conventional Processor, the Processor is a control center of the terminal, and various interfaces and lines are used to connect various parts of the terminal.
The memory mainly includes a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like, and the data storage area may store related data and the like. In addition, the memory may be a high speed random access memory, may also be a non-volatile memory, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), and the like, or may also be other volatile solid state memory devices.
It is to be noted that the terminal may include, but is not limited to, a processor and a memory, and those skilled in the art will appreciate that the terminal is only an example and is not limited to the terminal, and may include more or less components, or combine some components, or different components.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. It should be understood that any modifications, equivalents, improvements and the like, which come within the spirit and principle of the invention, may occur to those skilled in the art and are intended to be included within the scope of the invention.

Claims (10)

1. A flow detection method based on deep learning is characterized by comprising the following steps:
acquiring a first water flow image to be identified;
inputting the first water flow image into a preset flow detection model, so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of water flow to be identified, and outputting the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information; the flow detection model is obtained by training a convolutional neural network according to a first sample data set, wherein the first sample data set comprises a plurality of second water flow images and second water flow corresponding to each second water flow image.
2. The deep learning-based flow detection method according to claim 1, wherein the obtaining of the flow detection model specifically includes:
shooting the water flow to be identified to obtain a plurality of second water flow images, observing the water flow to be identified in real time by a preset observation method to obtain second water flow corresponding to the second water flow images, and taking all the second water flow images and the second water flow corresponding to each second water flow image as a first sample data set;
and constructing a convolutional neural network, and training and verifying the convolutional neural network by using the first sample data set to form a mapping relation between a water flow image and water flow so as to obtain a flow detection model.
3. The deep learning-based flow detection method according to claim 2, wherein a convolutional neural network is constructed, the convolutional neural network is trained and verified by using the first sample data set, a mapping relationship between a water flow image and water flow is formed, and a flow detection model is obtained, specifically:
constructing a convolutional neural network, dividing the first sample data set into a first data set and a second data set, and then training the convolutional neural network by using the first data set to form an initial mapping relation between a water flow image and water flow so as to obtain an initial flow detection model;
inputting a second water flow image in the second data set to the initial flow detection model to obtain a current flow detection result of the second water flow image, and calculating to obtain flow detection precision of the initial flow detection model according to the current flow detection result of the second water flow image and a second water flow corresponding to the current second water flow image;
and when the flow detection precision reaches an expected value, finishing the training verification of the convolutional neural network, considering that the current initial mapping relation is the mapping relation between the water flow image and the water flow, and taking the initial flow detection model after the training verification as a flow detection model.
4. The method as claimed in claim 1, before the step of inputting the first water flow image into a preset flow detection model, so that the flow detection model performs feature extraction on the first water flow image, obtains first flow information of a water flow to be identified, and outputs a first water flow of the water flow to be identified according to the first flow information as a flow detection result of the first water flow image, the method further includes:
selecting the second water flow image under a sunny weather condition as a clean image, selecting the second water flow image under a non-sunny weather condition as a blurred image, and using the clean image and the blurred image as a second sample data set from the first sample data set; the difference value between the second water flow corresponding to the clean image and the second water flow corresponding to the blurred image is smaller than a preset threshold value;
and constructing a denoising convolutional neural network based on a ReLU activation function, and training the denoising convolutional neural network by using the second sample data set to obtain a denoising model.
5. The deep learning-based flow rate detection method according to claim 4, wherein the inputting the first water flow image into a preset flow rate detection model to enable the flow rate detection model to perform feature extraction on the first water flow image to obtain first flow state information of the water flow to be identified, and outputting the first water flow rate of the water flow to be identified according to the first flow state information, as a flow rate detection result of the first water flow image, specifically:
judging whether the weather condition of the first water flow image is a clear weather condition or not;
if so, inputting the first water flow image to the flow detection model so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of the water flow to be identified, and outputting the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information;
if not, inputting the first water flow image to the denoising model so as to perform denoising pretreatment on the first water flow image to obtain a corresponding third water flow image, inputting the third water flow image to the flow detection model so as to perform feature extraction on the third water flow image by the flow detection model to obtain first flow information of the water flow to be recognized, and outputting the first water flow of the water flow to be recognized as a flow detection result of the first water flow image according to the first flow information.
6. A flow detection device based on deep learning is characterized by comprising:
the image acquisition module is used for acquiring a first water flow image to be identified;
the flow detection module is used for inputting the first water flow image into a preset flow detection model so as to enable the flow detection model to perform feature extraction on the first water flow image, obtain first flow information of water flow to be identified, and output the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information; the flow detection model is obtained by training a convolutional neural network according to a first sample data set, wherein the first sample data set comprises a plurality of second water flow images and second water flow corresponding to each second water flow image.
7. The deep learning-based flow rate detection device according to claim 6, further comprising:
the denoising model training module is used for selecting the second water flow image under the sunny weather condition as a clean image, selecting the second water flow image under the non-sunny weather condition as a fuzzy image and taking the clean image and the fuzzy image as a second sample data set from the first sample data set; the difference value between the second water flow corresponding to the clean image and the second water flow corresponding to the blurred image is smaller than a preset threshold value; and constructing a denoising convolutional neural network based on a ReLU activation function, and training the denoising convolutional neural network by using the second sample data set to obtain a denoising model.
8. The deep learning-based flow detection device of claim 7, wherein the flow detection module further comprises:
the sample acquisition unit is used for shooting the water flow to be identified to obtain a plurality of second water flow images, observing the water flow to be identified in real time by a preset observation method to obtain second water flow corresponding to the second water flow images, and then taking all the second water flow images and the second water flow corresponding to each second water flow image as a first sample data set;
the flow detection model training unit is used for constructing a convolutional neural network, dividing the first sample data set into a first data set and a second data set, and then training the convolutional neural network by using the first data set to form an initial mapping relation between a water flow image and water flow so as to obtain an initial flow detection model; inputting a second water flow image in the second data set to the initial flow detection model to obtain a current flow detection result of the second water flow image, and calculating to obtain flow detection precision of the initial flow detection model according to the current flow detection result of the second water flow image and a second water flow corresponding to the current second water flow image; when the flow detection precision reaches an expected value, finishing training and verification of the convolutional neural network, considering that the current initial mapping relation is a mapping relation between a water flow image and water flow, and taking an initial flow detection model after training and verification as a flow detection model;
the flow detection unit is used for judging whether the weather condition of the first water flow image is a clear weather condition or not; if so, inputting the first water flow image to the flow detection model so that the flow detection model performs feature extraction on the first water flow image to obtain first flow information of the water flow to be identified, and outputting the first water flow of the water flow to be identified as a flow detection result of the first water flow image according to the first flow information; if not, inputting the first water flow image to the denoising model so as to perform denoising pretreatment on the first water flow image to obtain a corresponding third water flow image, inputting the third water flow image to the flow detection model so as to perform feature extraction on the third water flow image by the flow detection model to obtain first flow information of the water flow to be recognized, and outputting the first water flow of the water flow to be recognized as a flow detection result of the first water flow image according to the first flow information.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored computer program; wherein the computer program controls the device on which the computer readable storage medium is executed to execute a deep learning-based traffic detection method according to any one of claims 1 to 5.
10. A terminal comprising a processor, a memory, and a computer program stored in the memory; wherein the computer program is executable by the processor to implement a deep learning-based traffic detection method according to any one of claims 1 to 5.
CN202210127063.8A 2022-02-10 2022-02-10 Deep learning-based traffic detection method, device, medium and terminal Pending CN114529815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210127063.8A CN114529815A (en) 2022-02-10 2022-02-10 Deep learning-based traffic detection method, device, medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210127063.8A CN114529815A (en) 2022-02-10 2022-02-10 Deep learning-based traffic detection method, device, medium and terminal

Publications (1)

Publication Number Publication Date
CN114529815A true CN114529815A (en) 2022-05-24

Family

ID=81623473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210127063.8A Pending CN114529815A (en) 2022-02-10 2022-02-10 Deep learning-based traffic detection method, device, medium and terminal

Country Status (1)

Country Link
CN (1) CN114529815A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115546561A (en) * 2022-10-25 2022-12-30 中山大学 Intermontane stream measurement and inspection method based on water body coverage characteristic identification

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1097829A (en) * 1993-06-17 1995-01-25 东芝株式会社 Apparatus for predicting flow of water supplying
CN108759973A (en) * 2018-04-28 2018-11-06 南京昊控软件技术有限公司 A kind of water level measurement method
CN108765334A (en) * 2018-05-24 2018-11-06 北京飞搜科技有限公司 A kind of image de-noising method, device and electronic equipment
CN110969282A (en) * 2019-10-17 2020-04-07 天津大学 Runoff stability prediction method based on LSTM composite network
CN111860970A (en) * 2020-06-29 2020-10-30 浪潮电子信息产业股份有限公司 River flow prediction method and device, electronic equipment and storage medium
CN111881982A (en) * 2020-07-30 2020-11-03 北京环境特性研究所 Unmanned aerial vehicle target identification method
US20210327031A1 (en) * 2020-04-15 2021-10-21 Tsinghua Shenzhen International Graduate School Video blind denoising method based on deep learning, computer device and computer-readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1097829A (en) * 1993-06-17 1995-01-25 东芝株式会社 Apparatus for predicting flow of water supplying
CN108759973A (en) * 2018-04-28 2018-11-06 南京昊控软件技术有限公司 A kind of water level measurement method
CN108765334A (en) * 2018-05-24 2018-11-06 北京飞搜科技有限公司 A kind of image de-noising method, device and electronic equipment
CN110969282A (en) * 2019-10-17 2020-04-07 天津大学 Runoff stability prediction method based on LSTM composite network
US20210327031A1 (en) * 2020-04-15 2021-10-21 Tsinghua Shenzhen International Graduate School Video blind denoising method based on deep learning, computer device and computer-readable storage medium
CN111860970A (en) * 2020-06-29 2020-10-30 浪潮电子信息产业股份有限公司 River flow prediction method and device, electronic equipment and storage medium
CN111881982A (en) * 2020-07-30 2020-11-03 北京环境特性研究所 Unmanned aerial vehicle target identification method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
余开华;: "小波神经网络模型在河道流量水位预测中的应用" *
王伟;: "基于遥感图像的船舶目标检测方法综述" *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115546561A (en) * 2022-10-25 2022-12-30 中山大学 Intermontane stream measurement and inspection method based on water body coverage characteristic identification

Similar Documents

Publication Publication Date Title
CN110796048B (en) Ship target real-time detection method based on deep neural network
CN110728658A (en) High-resolution remote sensing image weak target detection method based on deep learning
CN111798386B (en) River channel flow velocity measurement method based on edge identification and maximum sequence density estimation
Yang et al. Deep learning‐based bolt loosening detection for wind turbine towers
CN105628951A (en) Method and device for measuring object speed
CN111141653B (en) Tunnel leakage rate prediction method based on neural network
CN112487900B (en) SAR image ship target detection method based on feature fusion
Bai et al. An intelligent water level monitoring method based on SSD algorithm
CN114067019A (en) Urban waterlogging risk map rapid prefabricating method coupling deep learning and numerical simulation
Chen et al. A wavelet based deep learning method for underwater image super resolution reconstruction
CN113901927B (en) Underwater object shape recognition method based on flow field pressure time course
KR20230132686A (en) A method for damage identification and volume quantification of concrete pipes based on PointNet++ neural network
CN114529815A (en) Deep learning-based traffic detection method, device, medium and terminal
CN113963314A (en) Rainfall monitoring method and device, computer equipment and storage medium
CN109272484B (en) Rainfall detection method based on video image
House et al. Using deep learning to identify potential roof spaces for solar panels
CN111242017A (en) Multi-marking-line pavement crack identification method, device, equipment and storage medium
CN113469097B (en) Multi-camera real-time detection method for water surface floaters based on SSD network
CN113781513B (en) Leakage detection method and system for water supply pipeline of power plant
CN115375925A (en) Underwater sonar image matching algorithm based on phase information and deep learning
CN113870224A (en) Flood monitoring method, system, equipment and medium
CN115015904A (en) Speed measurement method, system and equipment based on fusion of radar and camera and storage medium
CN113989632A (en) Bridge detection method and device for remote sensing image, electronic equipment and storage medium
CN113313689A (en) Pavement structure depth measuring method, system, equipment and storage medium
CN110222632A (en) A kind of waterborne target detection method of gray prediction auxiliary area suggestion

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220524

RJ01 Rejection of invention patent application after publication