Target optical flow determination method, device, computer equipment and storage medium
By performing forecast processing and comparison of multiple optical flow methods on the image sequence, the optical flow method with the highest degree of similarity is selected, which solves the problems of large calculation amount and low efficiency of the traditional optical flow method, and improves the accuracy and efficiency of weather forecast.
Patent Information
- Application Number
- CN202010996443.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-21
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-09-21
AI Technical Summary
The traditional optical flow method has a large amount of calculation and low efficiency in different weather evolution processes, and it is difficult to quickly and accurately determine the target optical flow method, resulting in limited weather forecast efficiency and accuracy.
By obtaining the image sequence, use multiple optical flow methods to predict and process it, compare the similarity between the predicted image and the real image, and select the optical flow method with the highest similarity as the target optical flow method to reduce the amount of calculation and improve efficiency.
It reduces the amount of radar echo data, improves the efficiency of target optical flow method determination and the accuracy of weather forecasts, and enables targeted selection of suitable optical flow methods for extrapolation forecasts.
Smart Images

Figure CN112184753B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of weather forecasting, and in particular to a method, device, computer equipment and storage medium for determining a target optical flow method. Background Art
[0002] Optical flow is a computer vision method that uses the changes in the time domain of pixels in an image sequence and the correlation between adjacent frames to find the corresponding relationship between the previous frame and the current frame, thereby calculating the motion information of objects between adjacent frames. In recent years, this method has been widely used in the field of weather forecasting.
[0003] There are many optical flow methods developed so far, each with its own characteristics, so each method has different applicability to different weather evolution processes. In traditional technology, the target optical flow method based on radar echoes in different weather evolution processes is determined. Due to the complexity of different weather evolution processes and the large amount of corresponding radar echo data, the process of determining the target optical flow method is computationally intensive and inefficient. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for determining a target optical flow method in response to the above technical problems.
[0005] A method for determining a target optical flow method, the method comprising:
[0006] Acquire an image sequence; wherein the image sequence includes a plurality of images for simulating the evolution process of the target weather;
[0007] Using a variety of different optical flow methods to perform prediction processing on the image sequence to obtain a prediction image;
[0008] The forecast image and the real image are compared, and a target optical flow method suitable for forecasting the target weather is determined according to the comparison result.
[0009] In one embodiment, acquiring the image sequence comprises:
[0010] The initial image is subjected to image processing to obtain the image sequence with time-series changes; wherein the image processing includes at least one of translation, rotation and scaling.
[0011] In one embodiment, the method of using a plurality of different optical flow methods to perform prediction processing on the image sequence to obtain the prediction image includes:
[0012] Performing prediction processing on at least two images that are sequentially continuous in time in the image sequence using the multiple different optical flow methods to obtain the predicted image of the subsequent sequential image;
[0013] Accordingly, the comparing the predicted image and the real image comprises:
[0014] The predicted image obtained by each optical flow method is compared with the subsequent time-series image in the image sequence corresponding to the time sequence.
[0015] In one embodiment, the comparing the predicted image obtained by each optical flow method with the subsequent time-series image in the image sequence corresponding to the time sequence comprises:
[0016] Obtaining the image similarity between the forecast image obtained by each optical flow method and the subsequent time series image corresponding to the time series;
[0017] The similarity of the images obtained by each optical flow method is compared.
[0018] In one embodiment, the obtaining of the image similarity between the forecast image obtained by each optical flow method and the subsequent time sequence image corresponding to the time sequence includes:
[0019] Calculating a target critical success index and a target structure similarity value between the prediction image obtained by each optical flow method and the subsequent time sequence image corresponding to the time sequence;
[0020] The target critical success index and the target structure similarity value are weightedly summed to obtain the image similarity degree obtained by each optical flow method.
[0021] In one embodiment, the calculating of the target critical success index and the target structure similarity value between the prediction image obtained by each optical flow method and the subsequent time sequence image corresponding to the time sequence includes:
[0022] Calculating the critical success index and the structural similarity value between each of the multiple prediction images obtained by the optical flow method and the multiple subsequent time sequence images corresponding to the time sequence;
[0023] averaging the critical success indexes to obtain the target critical success index;
[0024] The structural similarity values are averaged to obtain the target structural similarity value.
[0025] In one embodiment, determining the target optical flow method suitable for forecasting the target weather according to the comparison result includes:
[0026] The optical flow method that obtains the highest image similarity is selected as the target optical flow method.
[0027] A device for determining a target using an optical flow method, the device comprising:
[0028] An acquisition module, used for acquiring an image sequence; wherein the image sequence includes a plurality of images for simulating the evolution process of the target weather;
[0029] A prediction module, used for performing prediction processing on the image sequence using a plurality of different optical flow methods to obtain a prediction image;
[0030] The comparison module is used to compare the forecast image and the real image, and determine the target optical flow method suitable for forecasting the target weather according to the comparison result.
[0031] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0032] Acquire an image sequence; wherein the image sequence includes a plurality of images for simulating the evolution process of the target weather;
[0033] Using a variety of different optical flow methods to perform prediction processing on the image sequence to obtain a prediction image;
[0034] The forecast image and the real image are compared, and a target optical flow method suitable for forecasting the target weather is determined according to the comparison result.
[0035] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0036] Acquire an image sequence; wherein the image sequence includes a plurality of images for simulating the evolution process of the target weather;
[0037] Using a variety of different optical flow methods to perform prediction processing on the image sequence to obtain a prediction image;
[0038] The forecast image and the real image are compared, and a target optical flow method suitable for forecasting the target weather is determined according to the comparison result.
[0039] The above-mentioned target optical flow method determination method, device, computer equipment and storage medium obtain a forecast image by using a variety of different optical flow methods to perform forecast processing on an image sequence simulating the evolution process of the target weather. The image sequence simulating the evolution process of the target weather has a smaller data volume than the radar echo image, thereby reducing the amount of calculation for subsequent comparison to determine the target optical flow method, improving the overall efficiency of determining the target optical flow method, and then comparing the forecast image with the real image, and determining the target optical flow method suitable for forecasting the target weather based on the comparison result, which is conducive to the targeted selection of the optical flow method suitable for the target weather to be forecasted for extrapolation forecasting in meteorological forecasting, thereby ultimately improving the accuracy of the forecast. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of a flow chart of a method for determining a target optical flow method in one embodiment;
[0041] Figure 2 is a schematic diagram of a grayscale handwritten digital image in one embodiment;
[0042] Figure 3 is a schematic diagram of an image sequence in one embodiment;
[0043] Figure 4 A schematic diagram of performing prediction processing using different optical flow methods in one embodiment;
[0044] Figure 5 A schematic diagram of a process for obtaining image similarity in one embodiment;
[0045] Figure 6 A schematic diagram of a flow chart of a method for determining a target optical flow method in another embodiment;
[0046] Figure 7 is a structural block diagram of a device for determining a target optical flow method in one embodiment;
[0047] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] In one embodiment, Figure 1 As shown, a method for determining a target optical flow method is provided. This embodiment uses the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server can be implemented with an independent server or a server cluster composed of multiple servers. In this embodiment, the method includes the following steps:
[0050] S110: Acquire an image sequence.
[0051] The image sequence includes multiple images, which are used to simulate the evolution process of the target weather.
[0052] Furthermore, multiple images that are continuous in time sequence in the image sequence can be used to replace the radar echo images corresponding to the evolution process of the target weather, so as to simulate the evolution process of the target weather.
[0053] Specifically, the computer device performs image processing on the initial image to obtain multiple images with time-series changes derived from the initial image based on the image processing, and the derived multiple images constitute an image sequence. For example, the initial image is subjected to display processing, such as changing at least one display parameter of image brightness, grayscale, and contrast, and multiple images obtained by changing the display parameters of the initial image over time constitute an image sequence, which can be used to simulate the evolution process of the target weather being cloudy. The computer device obtains an image sequence derived from the initial image.
[0054] S120, using a variety of different optical flow methods to perform prediction processing on the image sequence to obtain a predicted image.
[0055] Among them, the optical flow method is an extrapolation algorithm for obtaining a forecast image by performing short-term forecasting based on images.
[0056] Specifically, the computer device uses images in the image sequence as input samples, and uses a variety of different optical flow methods to perform prediction processing on the input samples to obtain predicted images.
[0057] In this embodiment, the multiple different optical flow methods include LK_ex and LK_sprog in the pysteps system and Dense, DenseRotation, Sparse and SparseSD in the rainymotion system, for a total of at least six optical flow methods.
[0058] S130, comparing the forecast image and the real image, and determining a target optical flow method suitable for forecasting target weather according to the comparison result.
[0059] The real image is an image in the image sequence, specifically, a subsequent sequential image after the last sequential image to be processed for forecasting. For example, the obtained image sequence is images 1, 2, 3, 4, 5, and the computer device processes images 2 and 3 in the image sequence for forecasting, outputs forecast image 4', and the last sequential image to be processed for forecasting is image 3, then the real image here is the next sequential image of image 3, that is, image 4.
[0060] Specifically, the computer device compares the forecast image obtained by each optical flow method with the corresponding real image to obtain multiple comparison results, each comparison result corresponds to an optical flow method. The computer device determines the forecast image closest to the corresponding real image among the multiple comparison results, and uses the optical flow method obtained by the forecast image as the target optical flow method suitable for forecasting the target weather.
[0061] In this embodiment, the computer equipment uses a variety of different optical flow methods to perform forecast processing on an image sequence simulating the evolution process of the target weather to obtain a forecast image. The image sequence simulating the evolution process of the target weather has a smaller data volume than the radar echo image, thereby reducing the amount of calculation for subsequent comparison and determination of the target optical flow method, improving the overall efficiency of determining the target optical flow method, and then comparing the forecast image with the real image, and determining the target optical flow method suitable for forecasting the target weather based on the comparison results, which is conducive to the targeted selection of the optical flow method suitable for the target weather to be forecasted for extrapolated forecasting in meteorological forecasting, thereby ultimately improving the accuracy of the forecast.
[0062] In one embodiment, the initial image may also be subjected to movement processing to simulate the evolution of more types of target weather, so S110 includes:
[0063] The initial image is processed to obtain an image sequence with time sequence changes.
[0064] The image processing includes at least one of translation, rotation and scaling.
[0065] In this embodiment, the image in the MNIST dataset is used as the initial image. The MNIST dataset is a grayscale handwritten digital image with a size of 28*28 pixels ( Figure 2 ).
[0066] Specifically, the computer device performs movement processing on the initial image, such as at least one of translation, rotation and scaling, and multiple images obtained by the movement processing of the initial image over time constitute an image sequence. Figure 3 The image sequence is obtained by taking the picture of the handwritten number "7" in the MNIST dataset as the initial image and translating it over time.
[0067] Among them, the translation image sequence obtained by translating the initial image can be used to simulate the radar echo changes corresponding to stable layered cloud precipitation; the rotation image sequence and the rotation + translation image sequence obtained by rotating and rotating and translating the initial image can be used to simulate the radar echo changes corresponding to the typhoon; the enlarged image sequence and the enlarged + translation image sequence obtained by enlarging and enlarging and translating the initial image can be used to simulate the radar echo changes corresponding to the occurrence and development stage of convection; the reduced image sequence and the reduced + translation image sequence obtained by reducing and reducing and translating the initial image can be used to simulate the radar echo changes corresponding to the occurrence and disappearance stage of convection.
[0068] In this embodiment, the computer device performs image processing including at least one of translation, rotation and scaling on the initial image, simulates more types of target weather, and determines applicable target optical flow methods for more types of target weather through the above-mentioned target optical flow method determination method, thereby expanding the scope of application of the target optical flow method determination method and improving the applicability of the target optical flow method determination method.
[0069] In one embodiment, to further improve the accuracy of the optical flow prediction, S120 includes:
[0070] At least two images that are sequentially continuous in time in an image sequence are processed for prediction using a variety of different optical flow methods to obtain a prediction image for a subsequent sequential image.
[0071] Among them, different optical flow methods require different numbers of images for prediction processing, and the existing optical flow method requires at least two images for prediction processing.
[0072] Specifically, Figure 4 As shown, the image sequence used to simulate the target weather evolution process includes 40 images of time series change, which are numbered 1, 2, 3, 4...39, 40 in the order of time series change, and the time interval between images is t. The optical flow method A needs 2 images for forecasting processing. The computer equipment uses the optical flow method A to forecast the time series continuous images 1 and 2, specifically, the optical flow field between image 1 and image 2 is calculated, and the optical flow of image 2 is extrapolated by 1*t minutes using the calculated optical flow field to obtain the forecast image 3' of the next time series image 3, and the optical flow of image 2 is extrapolated by 2*t minutes using the calculated optical flow field to obtain the forecast image 4' of the next time series image 4... and so on, and finally the forecast images 3'~40' of the subsequent time series images 3~40 are obtained. The optical flow method B needs 20 images for prediction processing. The computer equipment uses the optical flow method B to perform prediction processing on the time-series continuous images 1 to 20, specifically, the optical flow field between images 1 to 20 is calculated, and the optical flow of image 20 is extrapolated by the calculated optical flow field for 1*t minutes to obtain the predicted image 21' of the next time-series image 21, and the optical flow of image 20 is extrapolated by the calculated optical flow field for 2*t minutes to obtain the predicted image 22' of the next time-series image 22... and so on, and finally the predicted images 21'~40' of the subsequent time-series images 21~40 are obtained.
[0073] Optionally, the computer device may select at least two images before time t0 that are continuous with time t0, such as images at time t0-1 and time t0-2, as prediction images using different optical flow methods to obtain a prediction image at time t0. Similarly, a prediction image for images after time t0 can be obtained.
[0074] Optionally, for the aforementioned six optical flow methods in this embodiment, each prediction process requires at least 2 images and at most 20 images.
[0075] The specific implementation process of the optical flow method can be implemented using existing codes. For example, the LK_ex method is used to perform prediction processing on at least two images in the image sequence, and the process of outputting the predicted image can be implemented by the following code:
[0076]
[0077]
[0078] Accordingly, S130 includes:
[0079] Compare the predicted image obtained by each optical flow method with the subsequent time series image in the image sequence corresponding to the time series.
[0080] Specifically, the computer device obtains the image similarity between the forecast image obtained by each optical flow method and the subsequent time-series images corresponding to the time sequence, and compares the image similarity obtained by each optical flow method. For example, the computer device obtains the image similarity between the forecast images 3'~40' obtained by the above optical flow method A and the subsequent time-series images 3~40 corresponding to the time sequence, that is, the image similarity between the forecast image 3' and the subsequent image 3, the image similarity between the forecast image 4' and the subsequent image 4... and the image similarity between the forecast images 21'~40' obtained by the above optical flow method B and the subsequent time-series images 21~40 corresponding to the time sequence, compares the image similarity obtained by the optical flow method A and the optical flow method B, and selects the optical flow method with the highest image similarity as the target optical flow method suitable for forecasting the target weather. Among them, the image similarity can be represented by the pixel matching percentage between images. The greater the pixel matching percentage between images, the greater the image similarity between images.
[0081] In this embodiment, the computer device uses a plurality of different optical flow methods to perform forecast processing on at least two images that are sequentially continuous in time in the image sequence. The sequentially continuous images can accurately reflect the correlation of changes between the images. The forecast processing based on the images with accurate correlation of changes is conducive to obtaining a predicted image that is closer to the real image, that is, the subsequent sequential image, and improves the accuracy of the optical flow method forecast. Further, the image similarity obtained according to each optical flow method is used as the basis for determining the target optical flow method from the plurality of optical flow methods. The image similarity can intuitively reflect whether the adopted optical flow method is accurate in forecasting the target weather, and improves the certainty of determining the target optical flow method.
[0082] In one embodiment, the image similarity can be characterized by a target critical success index and a target structure similarity value, such as Figure 5As shown, the image similarity between each predicted image obtained by the optical flow method and the subsequent time series image corresponding to the time series is obtained, including:
[0083] S510, calculating the target critical success index and target structure similarity value between each prediction image obtained by the optical flow method and the subsequent time sequence images corresponding to the time sequence.
[0084] Specifically, the computer device can calculate the critical success index and the structural similarity value between the multiple forecast images obtained by each optical flow method and the multiple subsequent time series images corresponding to the time series by the critical success index formula (1) and the structural similarity value formula (2), and obtain multiple critical success indexes and multiple structural similarity values. The computer device further averages the multiple critical success indexes obtained to obtain the target critical success index, and averages the multiple structural similarity values obtained to obtain the target structural similarity value.
[0085] In the two grayscale images, one is the actual image and the other is the forecast image. It is stipulated that if an echo appears on the grid point at a certain position in the actual situation and the forecast also appears, the point is judged to be successful; if an echo appears on the grid point in the actual situation and no echo appears in the forecast, the point is judged to be a failure; if an echo does not appear on the grid point in the actual situation and an echo appears in the forecast, the point is judged to be a false alarm. The critical success index (CSI) is the ratio of the number of successful grid points to the sum of the number of successful grid points, the number of failed grid points and the number of false alarm grid points.
[0086] CSI = (success) / (success + failure + false alarm) (1)
[0087] In this embodiment, the forecast image is a forecast image obtained by using the optical flow method, the actual image is a subsequent time series image corresponding to the forecast image time series, the grid points are areas pre-divided on the image, and the echoes are pixels of handwritten numbers.
[0088] Among them, structural similarity (SSIM) is an indicator to measure the similarity between two images (x and y) (the range of SSIM is 0 to 1), which consists of three parts: brightness contrast l(x, y), contrast contrast c(x, y) and structure contrast s(x, y).
[0089]
[0090]
[0091]
[0092]
[0093] Wherein, C3=C2 / 2 is simplified to obtain formula (2). x is the average grayscale of image x, μ yis the average grayscale of image y, σ x 2 is the grayscale variance of image x, σ y 2 is the grayscale variance of image y, σ xy is the covariance of the grayscale of image x and y, C1=(k1L) 2 , C2=(k2L) 2 is a constant used to maintain stability, L is the dynamic range of grayscale values. k1 = 0.01, k2 = 0.03.
[0094] S520 , performing weighted summation on the target critical success index and the target structure similarity value to obtain the image similarity degree obtained by each optical flow method.
[0095] Specifically, the computer device sets a first weight w1 for the target critical success index and a second weight w2 for the target structural similarity value, w1+w2=1. The target critical success index can more accurately reflect the similarity between images, so w1>w2 is set, and then the target critical success index and the target structural similarity value are weightedly summed to obtain the image similarity between the predicted image obtained using the corresponding optical flow method and the subsequent time series image corresponding to the time series, which is used as the final score of the corresponding optical flow method.
[0096] As shown in Table 1 below, in this embodiment, the following six optical flow methods are used to forecast the image sequence simulating the weather evolution process of a certain target, and the CSI and SSIM are obtained. The CSI and SSIM are weighted and summed to obtain the final score (SCORE).
[0097] Table 1 Scoring table of 6 optical flow methods
[0098] CSI SSIM SCORE Dense A1 B1 C1 DenseRotation A2 B2 C2 Sparse A3 B3 C3 SparseSD A4 B4 C4 lk_ex A5 B5 C5 Lk_sprog A6 B6 C6
[0099] In this embodiment, the computer device calculates the target critical success index and the target structure similarity value between the forecast image obtained by each optical flow method and the subsequent time-series image corresponding to the time sequence. The target critical success index can reflect the local similarity between the forecast image and the subsequent time-series image corresponding to the time sequence, and the target structure similarity value can reflect the overall similarity between the forecast image and the subsequent time-series image corresponding to the time sequence. The computer device then performs a weighted summation of the target critical success index and the target structure similarity value to take into account both the local similarity and the overall similarity, and obtains the image similarity as the final score of each optical flow method, thereby achieving a comprehensive score for each optical flow method, so as to improve the accuracy of determining the target optical flow method suitable for predicting the target weather among multiple optical flow methods based on the image similarity.
[0100] In a specific embodiment, Figure 6As shown, a method for determining a target optical flow method is provided, comprising:
[0101] S601, performing image processing on an initial image to obtain an image sequence with time-series changes; wherein the image processing includes at least one of translation, rotation and scaling.
[0102] S602: Perform prediction processing on at least two images that are sequentially continuous in time in the image sequence using a plurality of different optical flow methods to obtain a prediction image of a subsequent sequential image.
[0103] S603: Calculate the critical success index and the structural similarity value between each of the multiple prediction images obtained by the optical flow method and the multiple subsequent time-series images corresponding to the time sequence.
[0104] S604. Average the critical success indexes to obtain a target critical success index.
[0105] S605: averaging the structural similarity values to obtain a target structural similarity value.
[0106] S606 , performing weighted summation on the target critical success index and the target structure similarity value to obtain the image similarity degree obtained by each optical flow method.
[0107] S607 , comparing the image similarities obtained by each optical flow method, and selecting the optical flow method that obtains the highest image similarity as the target optical flow method.
[0108] In this embodiment, the computer device performs at least one of translation, rotation and scaling on the initial image to obtain an image sequence that can be used to simulate the target weather evolution process, thereby reducing the amount of calculation of the entire target optical flow method and improving efficiency. The computer device then uses a variety of different optical flow methods to forecast at least two images in the image sequence that are continuous in time, and obtains corresponding forecast images of subsequent time-series images. The image similarity between the forecast image obtained by each optical flow method and the subsequent time-series image corresponding to the time sequence is calculated. The image similarity is characterized by the weighted sum of the target critical success index and the target structure similarity value, taking into account the local similarity and the overall similarity, and achieving a comprehensive score for each optical flow method. Finally, the computer device selects the optical flow method that obtains the highest image similarity as the target optical flow method. The image similarity can intuitively reflect whether the adopted optical flow method is accurate in forecasting the target weather, thereby improving the certainty of determining the target optical flow method.
[0109] It should be understood that although Figure 1-6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-6 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0110] In one embodiment, Figure 7 As shown, a target optical flow method determination device is provided, comprising: an acquisition module 701, a prediction module 702 and a comparison module 703, wherein:
[0111] The acquisition module 701 is used to acquire an image sequence; wherein the image sequence includes multiple images for simulating the evolution process of the target weather; the forecast module 702 is used to perform forecast processing on the image sequence using a variety of different optical flow methods to obtain a forecast image; the comparison module 703 is used to compare the forecast image with the real image, and determine the target optical flow method suitable for forecasting the target weather based on the comparison result.
[0112] In one embodiment, the acquisition module 701 is specifically used for:
[0113] The initial image is subjected to image processing to obtain the image sequence with time-series changes; wherein the image processing includes at least one of translation, rotation and scaling.
[0114] In one embodiment, the forecast module 702 is specifically used to:
[0115] At least two images that are sequentially continuous in time in the image sequence are predicted using the multiple different optical flow methods to obtain the predicted images of subsequent sequential images; accordingly, the comparison module 703 is specifically used to compare the predicted images obtained by each optical flow method with the subsequent sequential images in the image sequence corresponding to the time sequence.
[0116] In one embodiment, the comparison module 703 is specifically used for:
[0117] Obtaining the image similarity between the forecast image obtained by each optical flow method and the subsequent time series image corresponding to the time series; and comparing the image similarity obtained by each optical flow method.
[0118] In one embodiment, the comparison module 703 is specifically used for:
[0119] Calculate the target critical success index and target structure similarity value between the predicted image obtained by each optical flow method and the subsequent time series image corresponding to the time series; perform weighted summation on the target critical success index and the target structure similarity value to obtain the image similarity degree obtained by each optical flow method.
[0120] In one embodiment, the comparison module 703 is specifically used for:
[0121] Calculate the critical success index and structural similarity value between each plurality of prediction images obtained by the optical flow method and a plurality of subsequent time series images corresponding to the time series; average the critical success index to obtain the target critical success index; average the structural similarity values to obtain the target structural similarity value.
[0122] In one embodiment, the comparison module 703 is specifically used for:
[0123] The optical flow method that obtains the highest image similarity is selected as the target optical flow method.
[0124] For the specific definition of the target optical flow method determination device, please refer to the definition of the target optical flow method determination method above, which will not be repeated here. Each module in the above-mentioned target optical flow method determination device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0125] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store target optical flow method determination data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a target optical flow method determination method is implemented.
[0126] Those skilled in the art will understand that Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0127] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0128] Acquire an image sequence; wherein the image sequence includes multiple images for simulating the evolution process of the target weather; use a variety of different optical flow methods to perform forecast processing on the image sequence to obtain a forecast image; compare the forecast image with the real image, and determine the target optical flow method suitable for forecasting the target weather according to the comparison result.
[0129] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0130] The initial image is subjected to image processing to obtain the image sequence with time-series changes; wherein the image processing includes at least one of translation, rotation and scaling.
[0131] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0132] At least two images that are sequentially continuous in time in the image sequence are processed for prediction using the multiple different optical flow methods to obtain the predicted images of subsequent sequential images; and the predicted images obtained by each optical flow method are compared with the subsequent sequential images in the image sequence.
[0133] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0134] Obtaining the image similarity between the forecast image obtained by each optical flow method and the subsequent time series image; and comparing the image similarity obtained by each optical flow method.
[0135] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0136] Calculate the target critical success index and target structure similarity value between the predicted image obtained by each optical flow method and the subsequent time series image corresponding to the time series; perform weighted summation on the target critical success index and the target structure similarity value to obtain the image similarity degree obtained by each optical flow method.
[0137] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0138] Calculate the critical success index and structural similarity value between each plurality of prediction images obtained by the optical flow method and a plurality of subsequent time series images corresponding to the time series; average the critical success index to obtain the target critical success index; average the structural similarity values to obtain the target structural similarity value.
[0139] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0140] The optical flow method that obtains the highest image similarity is selected as the target optical flow method.
[0141] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0142] Acquire an image sequence; wherein the image sequence includes multiple images for simulating the evolution process of the target weather; use a variety of different optical flow methods to perform forecast processing on the image sequence to obtain a forecast image; compare the forecast image with the real image, and determine the target optical flow method suitable for forecasting the target weather according to the comparison result.
[0143] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0144] The initial image is subjected to image processing to obtain the image sequence with time-series changes; wherein the image processing includes at least one of translation, rotation and scaling.
[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0146] At least two images that are sequentially continuous in time in the image sequence are processed for prediction using the multiple different optical flow methods to obtain the predicted images of subsequent sequential images; and the predicted images obtained by each optical flow method are compared with the subsequent sequential images in the image sequence.
[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0148] Obtaining the image similarity between the forecast image obtained by each optical flow method and the subsequent time series image corresponding to the time series; and comparing the image similarity obtained by each optical flow method.
[0149] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0150] Calculate the target critical success index and target structure similarity value between the predicted image obtained by each optical flow method and the subsequent time series image corresponding to the time series; perform weighted summation on the target critical success index and the target structure similarity value to obtain the image similarity degree obtained by each optical flow method.
[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0152] Calculate the critical success index and structural similarity value between each plurality of prediction images obtained by the optical flow method and a plurality of subsequent time series images corresponding to the time series; average the critical success index to obtain the target critical success index; average the structural similarity values to obtain the target structural similarity value.
[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0154] The optical flow method that obtains the highest image similarity is selected as the target optical flow method.
[0155] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0156] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0157] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for determining a target optical flow method, characterized in that: The method comprises: Acquire an image sequence; wherein the image sequence includes a plurality of images for simulating the evolution process of the target weather; Using a variety of different optical flow methods to perform prediction processing on the image sequence to obtain a prediction image; Comparing the forecast image with the real image, and determining a target optical flow method suitable for forecasting the target weather according to the comparison result; The method of using a plurality of different optical flow methods to perform forecast processing on the image sequence to obtain a forecast image includes: Using the multiple different optical flow methods to perform prediction processing on at least two images that are time-sequentially continuous in the image sequence to obtain the predicted image of the subsequent time-series image, wherein the multiple different optical flow methods include LK_ex and LK_sprog in the pysteps system and Dense, DenseRotation, Sparse and SparseSD in the rainymotion system, a total of at least six optical flow methods; Accordingly, the comparing the predicted image and the real image comprises: Comparing the predicted image obtained by each optical flow method with the subsequent time-series images in the image sequence; The comparing the predicted image obtained by each optical flow method with the subsequent time series image in the image sequence comprises: Obtaining the image similarity between the forecast image obtained by each optical flow method and the subsequent time series image corresponding to the time series; The similarity of the images obtained by each optical flow method is compared.
2. The method according to claim 1, characterized in that The acquiring of the image sequence comprises: The initial image is subjected to image processing to obtain the image sequence with time-series changes; wherein the image processing includes at least one of translation, rotation and scaling.
3. The method according to claim 1, characterized in that The obtaining of the image similarity between the forecast image obtained by each optical flow method and the subsequent time series image comprises: Calculating a target critical success index and a target structure similarity value between the prediction image obtained by each optical flow method and the subsequent time sequence image corresponding to the time sequence; The target critical success index and the target structure similarity value are weightedly summed to obtain the image similarity degree obtained by each optical flow method.
4. The method according to claim 3, characterized in that The calculating of the target critical success index and the target structure similarity value between the forecast image and the subsequent time series image obtained by each optical flow method includes: Calculating the critical success index and the structural similarity value between each of the multiple prediction images obtained by the optical flow method and the multiple subsequent time sequence images corresponding to the time sequence; averaging the critical success indexes to obtain the target critical success index; The structural similarity values are averaged to obtain the target structural similarity value.
5. The method according to claim 1, characterized in that The method of determining a target optical flow method suitable for forecasting the target weather according to the comparison result includes: The optical flow method that obtains the highest image similarity is selected as the target optical flow method.
6. A target optical flow determination device, characterized in that: The device comprises: An acquisition module, used for acquiring an image sequence; wherein the image sequence includes a plurality of images for simulating the evolution process of the target weather; A prediction module, used for performing prediction processing on the image sequence using a plurality of different optical flow methods to obtain a prediction image; A comparison module, used for comparing the forecast image and the real image, and determining a target optical flow method suitable for forecasting the target weather according to the comparison result; The method of using a plurality of different optical flow methods to perform forecast processing on the image sequence to obtain a forecast image includes: Using the multiple different optical flow methods to perform prediction processing on at least two images that are time-sequentially continuous in the image sequence to obtain the predicted image of the subsequent time-series image, wherein the multiple different optical flow methods include LK_ex and LK_sprog in the pysteps system and Dense, DenseRotation, Sparse and SparseSD in the rainymotion system, a total of at least six optical flow methods; Accordingly, the comparing the predicted image and the real image comprises: Comparing the predicted image obtained by each optical flow method with the subsequent time-series images in the image sequence; The comparing the predicted image obtained by each optical flow method with the subsequent time series image in the image sequence comprises: Obtaining the image similarity between the forecast image obtained by each optical flow method and the subsequent time series image corresponding to the time series; The similarity of the images obtained by each optical flow method is compared.
7. The device according to claim 6, characterized in that The acquisition module is specifically used to perform image processing on the initial image to obtain the image sequence with time sequence changes; wherein the image processing includes at least one of translation, rotation and scaling.
8. The device according to claim 6, characterized in that The comparison module is specifically used to calculate the target critical success index and the target structure similarity value between the predicted image obtained by each optical flow method and the subsequent time series image corresponding to the time series; and perform weighted summation on the target critical success index and the target structure similarity value to obtain the degree of image similarity obtained by each optical flow method.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
