A moving target detection method, device and medium based on deep learning

Through the motion object detection method based on deep learning, a Gaussian distribution model and real-time background frame recognition are established, and real-time tracking is carried out in combination with Kalman filtering, which solves the problem that traditional methods cannot recognize brightness changes and achieves high-accuracy motion object detection.

CN119625841BActive Publication Date: 2025-04-18EAST CHINA JIAOTONG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510155436.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-04-18
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

The traditional inter-frame differential method cannot recognize the brightness changes of the corresponding image of the moving target, resulting in the inability to track the moving target in real time, reducing the accuracy of the moving target detection.

Method used

Using a deep learning-based motion object detection method, by collecting motion video, establishing a video frame sequence and Gaussian distribution model of the motion object, identifying the background frame and motion area that are updated in real time, analyzing the motion area to obtain the predicted position, motion rate and motion direction, and real-time tracking is performed through Kalman filtering.

Benefits of technology

Accurate detection and real-time tracking of moving targets are achieved, the accuracy of moving target detection is improved, and the brightness changes of moving targets can be effectively handled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625841B_ABST
    Figure CN119625841B_ABST
Patent Text Reader

Abstract

The present invention discloses a motion target detection method, device and medium based on deep learning, relates to the field of deep learning technology, solves the problem that the motion state of a motion target cannot be accurately detected, and the method comprises: collecting motion video of a motion target within a detection range, processing the motion video to obtain a video frame sequence of the motion target; analyzing the video frame sequence of the motion target to obtain a Gaussian distribution model of each pixel point in the video frame sequence corresponding to the motion target; identifying the video frame sequence of the motion target to obtain a background frame updated in real time and a motion area of ​​the motion target; analyzing the motion area in the motion video frame to obtain a predicted position, predicted motion rate and predicted motion direction of the motion target; sending the predicted position, predicted motion rate and predicted motion direction of the motion target to a display interface for display, and the present invention realizes accurate detection of the motion state corresponding to the motion target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of deep learning technology, and specifically relates to a motion target detection method, device and medium based on deep learning. Background Art

[0002] Deep learning is a branch of machine learning and an important part of the field of artificial intelligence. It builds and trains deep neural network models to learn and extract features from data to achieve automated processing and decision-making of complex tasks. Moving target detection based on deep learning is an important research direction in the field of computer vision. It uses deep learning algorithms to automatically extract moving target features in images or videos and achieve accurate detection and tracking of moving targets.

[0003] However, at present, when detecting moving targets, the traditional inter-frame difference method cannot recognize the change in brightness of the image corresponding to the moving target, resulting in the inability to track the moving target in real time, thereby reducing the accuracy of moving target detection;

[0004] To this end, the present invention proposes a moving target detection method, device and medium based on deep learning. Summary of the invention

[0005] The purpose of the present invention is to propose a motion target detection method, device and medium based on deep learning to solve the problems raised in the above background technology.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] A moving target detection method based on deep learning, the method comprising:

[0008] Step S1, collecting a motion video of a moving target within a detection range, and processing the motion video to obtain a video frame sequence of the moving target;

[0009] Step S2, analyzing the video frame sequence of the moving target to obtain a Gaussian distribution model of each pixel point in the video frame sequence corresponding to the moving target;

[0010] Step S3, identifying the video frame sequence of the moving target to obtain a real-time updated background frame and a moving area of ​​the moving target;

[0011] Step S4, analyzing the motion area in the motion video frame to obtain the predicted position, predicted motion speed and predicted motion direction of the moving target;

[0012] Step S5, sending the predicted position, predicted movement speed and predicted movement direction of the moving target to a display interface for display.

[0013] Furthermore, the step S1 includes the following sub-steps:

[0014] Step S11, performing frame processing on the motion video to obtain multiple motion video frames of the motion target within the detection range;

[0015] Step S12, combining multiple video frames in time order to obtain a video frame sequence of the moving target.

[0016] Furthermore, the step S2 includes the following sub-steps:

[0017] Step S21, acquiring a video frame sequence of a moving target, obtaining a plurality of moving video frames of the moving target, and numbering the video frames as i, i=1, 2, ..., z, where z is a positive integer;

[0018] Step S22, reading the pixel values ​​of all pixels in the motion video frame, and obtaining the R value component RZ(i, j), the G value component GZ(i, j) and the B value component BZ(i, j) of the corresponding pixel values; wherein j is the number of different pixels in the motion video frame, j=1, 2, ..., x, where x is a positive integer;

[0019] Step S23, convert the motion video frame corresponding to the motion target from the RGB mode to the HSV color model. The conversion formula of the HSV mode is as follows:

[0020] ;

[0021] Wherein, MD(i, j) represents the brightness value of the corresponding pixel, SD(i, j) represents the hue value of the corresponding pixel, BH(i, j) represents the saturation value of the corresponding pixel, and F(i, j) is a variable calculated in the HSV color space for the corresponding pixel.

[0022] Furthermore, the step S2 further includes the following sub-steps:

[0023] Step S24, dividing the pixels with the same number into the same pixel set to obtain j pixel sets, adding the brightness values ​​of different pixels in the same pixel set and taking the average to obtain the brightness mean MJZj of the corresponding pixel set, and similarly calculating the brightness standard deviation MBZj of the corresponding pixel set using the standard deviation calculation formula;

[0024] Step S25, each pixel point set obeys its own Gaussian distribution. For any pixel point set, a Gaussian distribution model of the corresponding pixel point set is established. The Gaussian distribution model is specifically as follows:

[0025] ; Where GSj is the Gaussian value of the corresponding numbered pixel, π is the circumference of a circle, and e is a natural constant.

[0026] Furthermore, the step S3 includes the following sub-steps:

[0027] Step S31, acquiring a motion frame sequence of a moving target, obtaining a plurality of motion video frames of the moving target, and reading brightness values ​​of a plurality of pixel points in each motion video frame;

[0028] Step S32, performing differential processing on the brightness values ​​of different pixels corresponding to adjacent video frames to obtain brightness difference values ​​of the corresponding pixels;

[0029] Step S33, comparing the brightness difference of the pixel point with the change threshold, if the brightness difference of the pixel point is greater than or equal to the change threshold, the corresponding pixel point is divided into the first area; if the brightness difference of the pixel point is less than the change threshold, the corresponding pixel point is divided into the second area;

[0030] The calculation formula of the change threshold BY is as follows:

[0031] ; In the formula, CZ is the brightness difference threshold, and the added term at the end represents the change in the overall light of adjacent video frames.

[0032] Furthermore, the step S3 also includes the following sub-steps:

[0033] Step S34, identifying the moving target in the second area, the identification process is as follows:

[0034] Step S341, obtaining brightness values ​​of a plurality of pixels in the second area, fitting the brightness values ​​of the pixels with the Gaussian distribution model of the corresponding pixels to obtain Gaussian values ​​of the corresponding pixels;

[0035] Step S342, comparing the Gaussian value with the corresponding Gaussian threshold, if the Gaussian value of the pixel is greater than or equal to the Gaussian threshold, the corresponding pixel is recorded as a motion area, if the Gaussian value of the pixel is less than the Gaussian threshold, the corresponding pixel is recorded as a background area;

[0036] Step S343, background update is performed on the pixels in the background area, and the specific update rules are as follows:

[0037] MJZk=(1-a1)×MJZk+a1×MD(i,k);

[0038] BYZGR 2 =(1-a1)×MBZk 2 +a1×MD(i,k); where a1 is the first update rate, MD(i,k) is the brightness value of the pixel in the background area, and k is the number of the pixel in the background area;

[0039] Step S35, obtaining the brightness value MD(i, p) of the first area, and updating the background of the pixels in the first area. The specific updating rules are as follows:

[0040] MJZp=(1-a2)×MJZk+a2×MD(i, p);

[0041] BZ 2 = (1-a2) × MBZk 2 +a2×MD(i,p); where a2 is the second update rate, and p is the number of the pixel in the first area;

[0042] Step S36, and so on, identifying the motion areas of multiple motion video frames.

[0043] Furthermore, the step S4 includes the following sub-steps:

[0044] Step S41, obtaining a motion region of a motion video frame, and reading the position coordinates (Xi, Yi) of a center point corresponding to the motion region;

[0045] Step S42, calculating the real-time motion speed SSLi and the real-time motion direction SFXi of the moving target in the corresponding motion area by a formula, the specific formula is as follows;

[0046] ; where t is the length of the time frame, (X i-1 , Y i-1 ) represents the position coordinates of the center point of the motion area corresponding to the next motion video frame;

[0047] SFXi = arctan[(Yi-Y i-1 ) / (Xi-X i-1 )], wherein the real-time motion direction is the angle between the line connecting the moving target in the i motion video frame and the i-1 motion video frame and the horizontal direction;

[0048] Step S43, and so on, calculate the real-time motion rate and real-time motion direction of the motion area in all motion video frames.

[0049] Furthermore, the step S4 further includes the following sub-steps:

[0050] Step S44, converting the motion data of the corresponding motion video frame at any time into a state vector of [Xi, Yi, Xv, Yv, SFXi] and importing it into the Kalman filter, taking the motion data of the corresponding motion video frame at the next time as the result vector, and calculating the compensation matrix of the corresponding Kalman filter;

[0051] Step S45, and so on, import the motion data of the motion video frames at all times into the Kalman filter, update the compensation matrix in real time, and obtain the final compensation matrix of the moving target;

[0052] Step S46, obtain the real-time motion speed and real-time motion direction of the moving target at the current moment and import them into the Kalman filter, combine with the final compensation matrix of the Kalman filter to realize real-time tracking of the position of the moving target, and obtain the predicted motion speed and predicted motion direction of the moving target at the next moment; calculate the predicted position of the Kalman filter at the next moment through the predicted motion speed and predicted motion direction of the moving target at the next moment.

[0053] A computer device, comprising:

[0054] A memory storing a computer program;

[0055] A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the above method is implemented.

[0056] 10. A computer-readable storage medium having a computer program stored thereon, wherein the program implements the above method when executed by a processor.

[0057] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0058] 1. The present invention first collects a motion video of a moving target within a detection range, processes the motion video to obtain a video frame sequence of the moving target; then analyzes the video frame sequence of the moving target to obtain a Gaussian distribution model of each pixel point in the video frame sequence corresponding to the moving target; the present invention realizes the establishment of a Gaussian model of the pixel points of the moving target;

[0059] 2. The present invention first identifies the video frame sequence of the moving target to obtain the real-time updated background frame and the moving area of ​​the moving target; then analyzes the moving area in the moving video frame to obtain the predicted position, predicted movement rate and predicted movement direction of the moving target; finally, the predicted position, predicted movement rate and predicted movement direction of the moving target are sent to the display interface for display; the present invention realizes accurate detection of the moving target. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0061] Figure 1 is a flowchart of the method of the present invention;

[0062] Figure 2 It is a design diagram of the algorithm flow in the present invention;

[0063] Figure 3 It is a schematic diagram of the structure of the computer device in the present invention. DETAILED DESCRIPTION

[0064] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] Example 1, please refer to Figure 1 and Figure 2 As shown, the technical solution provided by the present invention is: a moving target detection method based on deep learning, which is used to construct a Gaussian distribution model of the moving target, and then divide the moving video frame corresponding to the moving target into a background area and a moving area, and finally analyze and track the moving area to achieve real-time detection of the moving target;

[0066] In a specific embodiment, the moving target detection method is as follows:

[0067] Step S1, collecting a motion video of a moving target within a detection range, and processing the motion video to obtain a video frame sequence of the moving target;

[0068] In the present invention, step S1 includes the following sub-steps:

[0069] Step S11, performing frame processing on the motion video to obtain multiple motion video frames of the motion target within the detection range;

[0070] Step S12, combining multiple video frames in time order to obtain a video frame sequence of the moving target.

[0071] Step S2, analyzing the video frame sequence of the moving target to obtain a Gaussian distribution model of each pixel point in the video frame sequence corresponding to the moving target;

[0072] In the present invention, step S2 includes the following sub-steps:

[0073] Step S21, acquiring a video frame sequence of a moving target, obtaining a plurality of moving video frames of the moving target, and numbering the video frames as i, i=1, 2, ..., z, where z is a positive integer;

[0074] Step S22, reading the pixel values ​​of all pixels in the motion video frame, and obtaining the R value component RZ(i, j), the G value component GZ(i, j) and the B value component BZ(i, j) of the corresponding pixel values; wherein j is the number of different pixels in the motion video frame, j=1, 2, ..., x, where x is a positive integer;

[0075] Step S23, convert the motion video frame corresponding to the motion target from the RGB mode to the HSV color model. The conversion formula of the HSV mode is as follows:

[0076] ;

[0077] In the formula, MD (i, j) represents the brightness value of the corresponding pixel, which is used to describe the brightness of the color corresponding to the pixel; SD (i, j) represents the hue value of the corresponding pixel, which is used to describe the coldness or warmth of the color corresponding to the pixel; BH (i, j) represents the saturation value of the corresponding pixel, which is used to describe the depth of the color corresponding to the pixel; F (i, j) is a variable calculated in the HSV color space for the corresponding pixel, which has no specific meaning;

[0078] It should be specifically noted that 0≤MD(i, j)≤1, 0°≤SD(i, j)≤360°, 0≤BH(i, j)≤1;

[0079] Step S24, dividing the pixels with the same number into the same pixel set to obtain j pixel sets, adding the brightness values ​​of different pixels in the same pixel set and taking the average to obtain the brightness mean MJZj of the corresponding pixel set, and similarly calculating the brightness standard deviation MBZj of the corresponding pixel set using the standard deviation calculation formula;

[0080] Step S25, each pixel point set obeys its own Gaussian distribution. For any pixel point set, a Gaussian distribution model of the corresponding pixel point set is established. The Gaussian distribution model is specifically as follows:

[0081] ; Where GSj is the Gaussian value of the corresponding pixel, π is the circumference of a circle, and e is a natural constant;

[0082] It should be noted that when modeling the Gaussian distribution model, the options include the brightness value or grayscale value of the pixel point. The default selection of the present invention is the brightness value; when the modeling is just started, the distribution of each pixel point is unknown. During initialization, the brightness value of the pixel point with the same number in the first frame is selected as MJZj, and MBZj is set to zero.

[0083] Step S3, identifying the video frame sequence of the moving target to obtain a real-time updated background frame and a moving area of ​​the moving target;

[0084] In the present invention, step S3 includes the following sub-steps:

[0085] Step S31, acquiring a motion frame sequence of a moving target, obtaining a plurality of motion video frames of the moving target, and reading brightness values ​​of a plurality of pixel points in each motion video frame;

[0086] Step S32, performing differential processing on the brightness values ​​of different pixels corresponding to adjacent video frames to obtain brightness difference values ​​of the corresponding pixels;

[0087] The difference processing is specifically as follows: subtracting the brightness value of the corresponding pixel point in the same video frame from the brightness value of the pixel point with the same number in another video frame;

[0088] Step S33, comparing the brightness difference of the pixel point with the change threshold, if the brightness difference of the pixel point is greater than or equal to the change threshold, the corresponding pixel point is divided into the first area; if the brightness difference of the pixel point is less than the change threshold, the corresponding pixel point is divided into the second area;

[0089] The calculation formula of the change threshold BY is as follows:

[0090] ; In the formula, CZ is the brightness difference threshold, and the added term at the end represents the change in the overall light of adjacent video frames;

[0091] Step S34, identifying the moving target in the second area, the identification process is as follows:

[0092] Step S341, obtaining brightness values ​​of a plurality of pixels in the second area, fitting the brightness values ​​of the pixels with the Gaussian distribution model of the corresponding pixels to obtain Gaussian values ​​of the corresponding pixels;

[0093] Step S342, comparing the Gaussian value with the corresponding Gaussian threshold, if the Gaussian value of the pixel is greater than or equal to the Gaussian threshold, the corresponding pixel is recorded as a motion area, if the Gaussian value of the pixel is less than the Gaussian threshold, the corresponding pixel is recorded as a background area;

[0094] Step S343, background update is performed on the pixels in the background area, and the specific update rules are as follows:

[0095] MJZk=(1-a1)×MJZk+a1×MD(i,k);

[0096] BYZGR 2 =(1-a1)×MBZk 2 +a1×MD(i,k); where a1 is the first update rate, MD(i,k) is the brightness value of the pixel in the background area, and k is the number of the pixel in the background area;

[0097] Step S35, obtaining the brightness value MD(i, p) of the first area, and updating the background of the pixels in the first area. The specific updating rules are as follows:

[0098] MJZp=(1-a2)×MJZk+a2×MD(i, p);

[0099] BZ 2 = (1-a2) × MBZk 2 +a2×MD(i,p); where a2 is the second update rate, and p is the number of the pixel in the first area;

[0100] Step S36, and so on, identifying the motion areas of multiple motion video frames.

[0101] Step S4, analyzing the motion area in the motion video frame to obtain the predicted position, predicted motion speed and predicted motion direction of the moving target;

[0102] In the present invention, step S4 includes the following sub-steps:

[0103] Step S41, obtaining a motion region of a motion video frame, and reading the position coordinates (Xi, Yi) of a center point corresponding to the motion region;

[0104] Step S42, calculating the real-time motion speed SSLi and the real-time motion direction SFXi of the moving target in the corresponding motion area by a formula, the specific formula is as follows;

[0105] ; where t is the length of the time frame, (X i-1 , Y i-1 ) represents the position coordinates of the center point of the motion area corresponding to the next motion video frame;

[0106] SFXi = arctan[(Yi-Y i-1 ) / (Xi-X i-1 )], wherein the real-time motion direction is the angle between the line connecting the moving target in the i motion video frame and the i-1 motion video frame and the horizontal direction;

[0107] Step S43, and so on, calculating the real-time motion rate and real-time motion direction of the motion area in all motion video frames;

[0108] Step S44, converting the motion data of the corresponding motion video frame at any time into a state vector of [Xi, Yi, Xv, Yv, SFXi] and importing it into the Kalman filter, taking the motion data of the corresponding motion video frame at the next time as the result vector, and calculating the compensation matrix of the corresponding Kalman filter;

[0109] It should be specifically noted that the compensation matrix is ​​the product of the observation matrix and the Kalman gain in the Kalman filter. The observation matrix is ​​used to convert the state vector into a matrix of the observation vector. The Kalman gain is used to calculate the value of the weight corresponding to the state vector and the result vector in the Kalman filter.

[0110] Step S45, and so on, import the motion data of the motion video frames at all times into the Kalman filter, update the compensation matrix in real time, and obtain the final compensation matrix of the moving target;

[0111] Step S46, obtaining the real-time motion speed and real-time motion direction of the moving target at the current moment and importing them into the Kalman filter, combining the final compensation matrix of the Kalman filter to realize real-time tracking of the position of the moving target, and obtaining the predicted motion speed and predicted motion direction of the moving target at the next moment; calculating the predicted position of the Kalman filter at the next moment through the predicted motion speed and predicted motion direction of the moving target at the next moment;

[0112] Kalman filtering is a linear minimum variance estimator. Kalman filtering is based on the state space representation of linear dynamic systems. Its core idea is to use the state equation of the linear dynamic system to gradually approach the true state through prediction and update steps to achieve real-time detection of moving targets.

[0113] Step S5, sending the predicted position, predicted movement speed and predicted movement direction of the moving target to a display interface for display.

[0114] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.

[0115] Embodiment 2: Figure 3The present invention is a structural diagram of a computer device, which may include: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute a moving target detection method based on deep learning, which includes: collecting a moving video of a moving target within a detection range, processing the moving video to obtain a video frame sequence of the moving target; analyzing the video frame sequence of the moving target to obtain a Gaussian distribution model of each pixel point in the video frame sequence corresponding to the moving target; identifying the video frame sequence of the moving target to obtain a real-time updated background frame and a moving area of ​​the moving target; analyzing the moving area in the moving video frame to obtain the predicted position, predicted movement rate and predicted movement direction of the moving target; sending the predicted position, predicted movement rate and predicted movement direction of the moving target to a display interface for display.

[0116] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0117] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a motion target detection method based on deep learning provided by the above methods, and the method includes: collecting motion video of the motion target within the detection range, processing the motion video to obtain a video frame sequence of the motion target; analyzing the video frame sequence of the motion target to obtain a Gaussian distribution model of each pixel point in the video frame sequence corresponding to the motion target; identifying the video frame sequence of the moving target to obtain a real-time updated background frame and a motion area of ​​the moving target; analyzing the motion area in the motion video frame to obtain the predicted position, predicted motion rate and predicted motion direction of the moving target; sending the predicted position, predicted motion rate and predicted motion direction of the moving target to a display interface for display.

[0118] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned method for detecting a moving target based on deep learning, the method comprising: collecting a motion video of the moving target within a detection range, processing the motion video to obtain a video frame sequence of the moving target; analyzing the video frame sequence of the moving target to obtain a Gaussian distribution model of each pixel in the video frame sequence corresponding to the moving target; identifying the video frame sequence of the moving target to obtain a real-time updated background frame and a moving area of ​​the moving target; analyzing the moving area in the motion video frame to obtain the predicted position, predicted motion rate and predicted motion direction of the moving target; and sending the predicted position, predicted motion rate and predicted motion direction of the moving target to a display interface for display.

[0119] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A moving target detection method based on deep learning, characterized in that: Methods include: Step S1, collecting a motion video of a moving target within a detection range, and processing the motion video to obtain a video frame sequence of the moving target; Step S2, analyzing the video frame sequence of the moving target to obtain a Gaussian distribution model of each pixel point in the video frame sequence corresponding to the moving target; Step S3, identifying the video frame sequence of the moving target to obtain a real-time updated background frame and a moving area of ​​the moving target; Wherein, the step S3 includes the following sub-steps: Step S31, acquiring a motion frame sequence of a moving target, obtaining a plurality of motion video frames of the moving target, and reading brightness values ​​of a plurality of pixel points in each motion video frame; Step S32, performing differential processing on the brightness values ​​of different pixels corresponding to adjacent video frames to obtain brightness difference values ​​of the corresponding pixels; Step S33, comparing the brightness difference of the pixel point with the change threshold, if the brightness difference of the pixel point is greater than or equal to the change threshold, the corresponding pixel point is divided into the first area; if the brightness difference of the pixel point is less than the change threshold, the corresponding pixel point is divided into the second area; The calculation formula of the change threshold BY is as follows: ; In the formula, CZ is the brightness difference threshold, and the added term at the end represents the change in the overall light of adjacent video frames; Step S34, identifying the moving target in the second area, the identification process is as follows: Step S341, obtaining brightness values ​​of a plurality of pixels in the second area, fitting the brightness values ​​of the pixels with the Gaussian distribution model of the corresponding pixels to obtain Gaussian values ​​of the corresponding pixels; Step S342, comparing the Gaussian value with the corresponding Gaussian threshold, if the Gaussian value of the pixel is greater than or equal to the Gaussian threshold, the corresponding pixel is recorded as a motion area, if the Gaussian value of the pixel is less than the Gaussian threshold, the corresponding pixel is recorded as a background area; Step S4, analyzing the motion area in the motion video frame to obtain the predicted position, predicted motion speed and predicted motion direction of the moving target; Step S5, sending the predicted position, predicted movement speed and predicted movement direction of the moving target to a display interface for display.

2. The method for detecting moving objects based on deep learning according to claim 1, characterized in that: The step S1 includes the following sub-steps: Step S11, performing frame processing on the motion video to obtain multiple motion video frames of the motion target within the detection range; Step S12, combining multiple video frames in time order to obtain a video frame sequence of the moving target.

3. The method for detecting moving objects based on deep learning according to claim 2, characterized in that: The step S2 includes the following sub-steps: Step S21, acquiring a video frame sequence of a moving target, obtaining a plurality of moving video frames of the moving target, and numbering the video frames as i, i=1, 2, ..., z, where z is a positive integer; Step S22, reading the pixel values ​​of all pixels in the motion video frame, and obtaining the R value component RZ(i, j), the G value component GZ(i, j) and the B value component BZ(i, j) of the corresponding pixel values; wherein j is the number of different pixels in the motion video frame, j=1, 2, ..., x, where x is a positive integer; Step S23, convert the motion video frame corresponding to the motion target from the RGB mode to the HSV color model. The conversion formula of the HSV mode is as follows: ; Wherein, MD(i, j) represents the brightness value of the corresponding pixel, SD(i, j) represents the hue value of the corresponding pixel, BH(i, j) represents the saturation value of the corresponding pixel, and F(i, j) is a variable calculated in the HSV color space for the corresponding pixel.

4. The method for detecting moving objects based on deep learning according to claim 3, characterized in that: The step S2 further comprises the following sub-steps: Step S24, dividing the pixels with the same number into the same pixel set to obtain j pixel sets, adding the brightness values ​​of different pixels in the same pixel set and taking the average to obtain the brightness mean MJZj of the corresponding pixel set, and similarly calculating the brightness standard deviation MBZj of the corresponding pixel set using the standard deviation calculation formula; Step S25, each pixel point set obeys its own Gaussian distribution. For any pixel point set, a Gaussian distribution model of the corresponding pixel point set is established. The Gaussian distribution model is specifically as follows: ; Where GSj is the Gaussian value of the corresponding numbered pixel, π is the circumference of a circle, and e is a natural constant.

5. The method for detecting moving objects based on deep learning according to claim 4, characterized in that: The step S3 also includes the following sub-steps: Step S343, background update is performed on the pixels in the background area, and the specific update rules are as follows: MJZk=(1-a1)×MJZk+a1×MD(i,k); BYZGR 2 =(1-a1)×MBZk 2 +a1×MD(i,k); where a1 is the first update rate, MD(i,k) is the brightness value of the pixel in the background area, and k is the number of the pixel in the background area; Step S35, obtaining the brightness value MD(i, p) of the first area, and updating the background of the pixels in the first area. The specific updating rules are as follows: MJZp=(1-a2)×MJZk+a2×MD(i, p); BZ 2 = (1-a2) × MBZk 2 +a2×MD(i,p); where a2 is the second update rate, and p is the number of the pixel in the first area; Step S36, and so on, identifying the motion areas of multiple motion video frames.

6. The method for detecting moving objects based on deep learning according to claim 5, characterized in that: The step S4 includes the following sub-steps: Step S41, obtaining a motion region of a motion video frame, and reading the position coordinates (Xi, Yi) of a center point corresponding to the motion region; Step S42, calculating the real-time motion speed SSLi and the real-time motion direction SFXi of the moving target in the corresponding motion area by a formula, the specific formula is as follows; ; where t is the length of the time frame, (X i-1 , Y i-1 ) represents the position coordinates of the center point of the motion area corresponding to the next motion video frame; SFXi = arctan[(Yi-Y i-1 ) / (Xi-X i-1 )], wherein the real-time motion direction is the angle between the line connecting the moving target in the i motion video frame and the i-1 motion video frame and the horizontal direction; Step S43, and so on, calculate the real-time motion rate and real-time motion direction of the motion area in all motion video frames.

7. The method for detecting moving objects based on deep learning according to claim 6, characterized in that: The step S4 also includes the following sub-steps: Step S44, converting the motion data of the corresponding motion video frame at any time into a state vector of [Xi, Yi, Xv, Yv, SFXi] and importing it into the Kalman filter, taking the motion data of the corresponding motion video frame at the next time as the result vector, and calculating the compensation matrix of the corresponding Kalman filter; Step S45, and so on, import the motion data of the motion video frames at all times into the Kalman filter, update the compensation matrix in real time, and obtain the final compensation matrix of the moving target; Step S46, obtain the real-time motion speed and real-time motion direction of the moving target at the current moment and import them into the Kalman filter, combine with the final compensation matrix of the Kalman filter to realize real-time tracking of the position of the moving target, and obtain the predicted motion speed and predicted motion direction of the moving target at the next moment; calculate the predicted position of the Kalman filter at the next moment through the predicted motion speed and predicted motion direction of the moving target at the next moment.

8. A computer device, characterized in that: The computer device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the method described in any one of claims 1 to 7 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Moving object detection method and system, computing device and storage medium

    CN109859236A

  • Moving target detection method and device based on improved Gaussian mixture model

    CN111383250A