Water conservancy scene inspection method based on multi-temporal unmanned aerial vehicle image detection and comparison

By combining SIFT feature point matching and homography transformation with the YOLO deep learning target detection model, automated comparison of multi-temporal UAV images is achieved, solving the efficiency and accuracy problems of multi-temporal video target change analysis and adapting to the dynamic monitoring needs of water conservancy scenarios.

CN122090331APending Publication Date: 2026-05-26ANHUI HEQING INTELLIGENT ROBOT CO LTD +4
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI HEQING INTELLIGENT ROBOT CO LTD
Filing Date
2026-04-24
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, there is a lack of efficient and practical solutions for automatic comparison of target changes in multi-temporal and multi-view videos, resulting in inaccurate comparison results and making it difficult to meet the dynamic monitoring needs of water conservancy scenarios.

Method used

SIFT feature point matching and homography transformation are used for multi-video frame-level registration, and YOLO deep learning target detection model is used for target tracking. Multiple comparison modes are supported to realize automated comparison of multi-temporal UAV images.

Benefits of technology

It significantly improves the efficiency and accuracy of multi-temporal video target change analysis, is highly adaptable, supports multiple comparison modes, provides visualization results, and enhances the level of automation and intelligence in water conservancy scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122090331A_ABST
    Figure CN122090331A_ABST
Patent Text Reader

Abstract

The invention discloses a water conservancy scene inspection method based on multi-temporal unmanned aerial vehicle image detection and comparison, and relates to the technical field of computer vision and image processing, and the method comprises the steps: firstly, selecting a reference video, carrying out the frame-level registration of other videos through SIFT feature point matching and homography transformation, and building a space alignment basis; secondly, performing target detection and tracking on each input video by adopting a YOLO-based model, identifying and recording a target category, confidence, position information and a tracking ID, automatically comparing targets in the multi-temporal video by adopting multiple comparison modes (such as rectification supervision, comprehensive comparison and the like) based on registration and detection results, and identifying change types such as addition, reduction, rectification and the like; according to the method, multi-stage registration, target detection tracking and multi-mode comparison mechanisms are fused, and the efficiency and accuracy of multi-temporal video target change analysis are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision and image processing technology, specifically a water conservancy scene inspection method based on multi-temporal UAV image detection and comparison. Background Technology

[0002] With the widespread adoption of technologies such as video surveillance and drone patrols, the demand for dynamic monitoring in water conservancy scenarios is increasing. Traditional video comparison methods rely heavily on manual observation, which is inefficient, subjective, and difficult to implement for large-scale, automated target change detection. While existing technologies include target detection and tracking methods based on single videos, there is a lack of efficient and practical solutions for automatic comparison of target changes across multiple time phases and perspectives. There is a lack of automated identification of fine-grained changes such as target additions, disappearances, and displacements. Due to differences in shooting angles, positions, and times, direct comparison of targets across multiple videos can easily lead to spatial misalignment, resulting in inaccurate comparison results that fail to meet actual monitoring and analysis needs.

[0003] To address the aforementioned shortcomings, in recent years, with the continuous advancement of technologies such as deep learning and target tracking, automatic analysis of target changes across multiple videos and time phases has become a research hotspot. Current research trends mainly focus on the combination of deep learning-based target detection and multi-target tracking, video registration using feature point matching and homography transformation, and multi-modal, intelligent comparison analysis to meet regulatory needs in different scenarios. This invention addresses these challenges by proposing an automated multi-temporal UAV image comparison method that integrates target detection, video registration, and multi-modal comparison. This method significantly improves the efficiency, accuracy, and intelligence of multi-temporal video target change analysis, possessing broad application prospects and promotional value. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention aims to provide a method for water conservancy scene inspection based on multi-temporal UAV image detection and comparison. This method enables automatic detection, registration, and change comparison of targets in water conservancy scenes from multi-temporal UAV images, improving the automation and intelligence of target monitoring in scenarios such as water conservancy, transportation, and urban management. First, a benchmark video for comparison is determined. SIFT feature point matching and homography transformation are used to perform frame-level registration on other videos, ensuring spatial alignment and providing a foundation for subsequent target comparison. For each input video, a YOLO-based deep learning model is used for target detection and tracking, automatically identifying and recording the target category, confidence level, bounding box, and tracking ID in each frame. Based on the registration and detection results, various comparison modes (such as rectification supervision, comprehensive comparison, difference detection, cumulative change, and stepwise comparison) are used to automatically compare targets in multi-temporal images, identifying change types such as additions, reductions, and rectifications, and displaying the comparison results in a visual manner. The method of this invention has the advantages of high automation, strong adaptability, rich comparison modes, and user-friendly visualization, which can significantly improve the efficiency and accuracy of target change analysis in multi-temporal images.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A method for inspecting water conservancy scenes based on multi-temporal UAV image detection and comparison includes the following steps: (1) Acquire multi-temporal UAV images of the inspection scene, perform spatiotemporal registration of the multi-temporal UAV images with the reference video respectively, write the registered frames into a new video file, and output the registration result video with the same resolution and frame rate as the reference video. (2) Use a deep learning object detection model to perform object detection and tracking on each frame of the new video file, automatically identify various types of objects in the image, and output the category, tracking ID, confidence score, coordinate box and center point of each object, and save it in JSON format; (3) Load the detection results of each video in step (2), compare the changes of the target in multiple videos, match the target by tracking ID and IOU, automatically identify the changes of the target, and display them in a visual way on the interface or in the output video.

[0006] In this invention, multi-temporal UAV images are spatiotemporally registered with a reference video, specifically including: (1-1) Feature point detection and extraction The frame rate, resolution, and total number of frames of each video are obtained. Using the reference video as a reference, the corresponding frames of other videos are read frame by frame according to their frame number to achieve time synchronization. For each group of synchronized frames, the SIFT algorithm is used to extract key feature points and their descriptions on the reference frame and the frame to be registered, respectively. (1-2) Feature matching BFMatcher is used for feature point matching, and the matching feature point pairs are selected by the nearest neighbor distance ratio test. (1-3) Robust homography matrix estimation Based on the selected feature point pairs, the homography transformation matrix from the frame to be registered to the reference frame is calculated using the RANSAC algorithm. (1-4) Homography Matrix Verification Two methods, area ratio verification and condition number test, are used to verify geometric rationality and numerical stability respectively. If the verification does not meet the requirements, return to step (1-3) to recalculate the homography transformation matrix. (1-5) Constraining the time consistency of the transformation matrix To eliminate inter-frame jitter in the video, the calculated homography matrix is ​​subjected to temporal smoothing. (1-6) Perspective Transformation Using the calculated homography matrix, a perspective transformation is performed on the frame to be registered, transforming it to a spatial coordinate system consistent with the reference frame, thereby achieving spatial alignment of multiple videos and ensuring that the position of the same target in different videos corresponds.

[0007] In this invention, step (1-1) feature point detection and extraction specifically includes: Construct a Gaussian difference pyramid and use SIFT for feature point detection. The calculation formula is as follows: ; in, These represent the pixel coordinates of the image. Represents the scale spatial factor. Represents the Gaussian difference function. The scale is represented as Gaussian kernel function, Indicates the input image. This represents the scaling factor between adjacent scales. This represents the convolution operation; The formula for calculating the direction of feature points is as follows: ; in, This represents the pixel values ​​of the image after Gaussian smoothing. Represents the magnitude of the gradient. Indicates the direction of the gradient.

[0008] In this invention, the area ratio verification is set within a reasonable range of [0.1, 10], and its calculation index is the absolute value of the determinant: ; in, Representing the homography matrix The determinant of the matrix, which reflects the area scaling ratio before and after the transformation; The formula for the condition number test is: ; in, and Represent matrices respectively The maximum and minimum singular values.

[0009] In this invention, YOLO is used for target detection and tracking in step (2).

[0010] In this invention, step (3) supports multiple comparison modes during the comparison of changes in multiple video targets, including support for rectification supervision, comprehensive comparison, difference detection, cumulative change, and stepwise comparison.

[0011] In this invention, identifying target changes in step (3) includes: (3-1) For the detection results of each frame, according to the set confidence threshold, filter out targets with low confidence and retain targets with high reliability; (3-2) For different videos of the same frame, assign a unique tracking ID to each target. First, match the targets one by one according to the tracking ID. If the IDs cannot match, use IOU for spatial overlap matching. If the IOU is greater than the set threshold, it is considered a match. (3-3) Based on the target matching results, calculate the "new target" and "reduced target" of each video relative to the baseline video.

[0012] In this invention, the calculation formula for spatial overlap matching of two detection boxes A and B using IOU is as follows: ; in, Represents the area of ​​intersection. The union area represents the area of ​​the intersection; the intersection area and the union area are calculated using the coordinates of the detection box.

[0013] In this invention, target changes include "adding targets" and "reducing targets" relative to the baseline video; the determination logic for adding targets is: a target exists in the target video but has no corresponding target in the baseline video; the determination logic for reducing targets is: a target exists in the baseline video but has no corresponding target in the target video. Add target index = target video target set - matched target set Reduce target index = baseline video target set - matched target set .

[0014] In this invention, step (3) uses a graphical interface based on Tkinter for visualization, supporting functions such as video and JSON file selection, parameter setting, comparison mode switching, and result saving, thereby improving the user experience.

[0015] Compared with the prior art, the beneficial effects of the present invention are: (1) This invention achieves multi-temporal image registration and target detection and tracking through SIFT + homography matrix verification, followed by ID + IOU matching. Based on five comparison modes invented for real water conservancy inspection business, it realizes the engineering and practical application of UAVs in water conservancy inspection. Compared with the existing single inspection and single detection, it has a high degree of automation and strong adaptability, and can solve industry pain points by combining with the real business needs of water conservancy scenarios.

[0016] (2) The present invention first determines the reference video for comparison, and uses SIFT feature point matching and homography transformation to perform frame-level registration on other videos to ensure spatial alignment of multiple videos, providing spatially consistent multi-video data for subsequent target detection, comparison and other processing. This system achieves high-quality multi-video registration through rigorous mathematical methods and engineering implementation, and can handle video alignment tasks in complex scenarios.

[0017] (3) This invention supports multiple comparison modes (such as rectification supervision, comprehensive comparison, difference detection, cumulative change, step-by-step comparison, etc.). According to different scenario requirements, it can automatically compare targets in multi-temporal images, identify change types such as addition, reduction, and rectification, and display the comparison results in a visual way. It has the advantages of high automation, strong adaptability, rich comparison modes, and user-friendly visualization, which can significantly improve the efficiency and accuracy of target change analysis in multi-temporal images.

[0018] (4) The present invention provides a graphical interface based on Tkinter, which supports functions such as video and JSON file selection, parameter setting, comparison mode switching, and result saving, thereby improving the user experience. Attached Figure Description

[0019] Figure 1 This is a flowchart of the method of the present invention.

[0020] Figure 2 This is a diagram illustrating the changes in the rectification and supervision model of the present invention.

[0021] Figure 3 This is a diagram illustrating the changes in the rectification and supervision model of this invention.

[0022] Figure 4 This is a diagram showing the overall comparison of pattern changes in this invention.

[0023] Figure 5 This is a graph showing the changes in the difference detection mode.

[0024] Figure 6 This is a diagram illustrating the cumulative change pattern of the present invention.

[0025] Figure 7 This is a diagram showing the gradual changes in the comparative modes of the present invention. Detailed Implementation

[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0027] The present invention proposes a method for water conservancy scene inspection based on multi-temporal UAV image detection and comparison, the flowchart of which is shown below. Figure 1 As shown, it includes the following steps: (1) Multi-video spatiotemporal registration. SIFT feature point extraction and BFMatcher feature matching are used to calculate the homography matrix between videos. Perspective transformation is performed on the target video to achieve spatial alignment with the reference video. The registered video is used for subsequent target comparison to ensure spatial consistency of the comparison.

[0028] (1-1) Feature Point Detection and Extraction. Obtain basic information such as frame rate (FPS), resolution (width and height), and total number of frames for each video. Using the reference video as a guide, read the corresponding frames of other videos frame by frame according to their frame count to achieve temporal synchronization. For each set of synchronized frames, use algorithms such as SIFT (Scale Invariant Feature Transform) to extract key feature points and their descriptors from the reference frame and the frame to be registered, respectively.

[0029] Construct a Gaussian difference pyramid and use SIFT for feature point detection. The calculation formula is as follows: ; in, These represent the pixel coordinates of the image. Represents the scale spatial factor. Represents the Gaussian difference function. The scale is represented as Gaussian kernel function, Indicates the input image. This represents the scaling factor between adjacent scales. This represents the convolution operation.

[0030] The formula for calculating the direction of feature points is as follows: ; in, This represents the pixel values ​​of the image after Gaussian smoothing. Represents the magnitude of the gradient. Indicates the direction of the gradient.

[0031] As another implementation method, if ORB feature detection is used, then the orientation is calculated using the gray-scale centroid method (IntensityCentroid): ; in, Indicates the direction of the feature point. It is the geometric moment of the image, which is defined as .

[0032] (1-2) Feature matching BFMatcher (brute force matcher) is used for feature point matching, and nearest neighbor distance ratio test is performed to eliminate false matches. The calculation formula is as follows: ; in, It is the Euclidean distance between a feature point and its nearest neighbor. It is the Euclidean distance between a feature point and its second nearest neighbor feature point. The threshold value is used. A match is considered valid if the value (usually 0.75) meets the above conditions.

[0033] (1-3) Robust homography matrix estimation Based on the selected feature point pairs, the RANSAC (Random Sample Consensus) algorithm is used to calculate the homography matrix from the frame to be registered to the reference frame. .

[0034] The formula for estimating the number of RANSAC iterations is as follows: ; in, This represents the minimum number of iterations required for the theory. This indicates the confidence level (usually taken as 0.99). This represents the proportion of outliers in the dataset. This represents the minimum number of samples required to compute the model (when computing the homography matrix). ).

[0035] Calculate reprojection error E Its formula is: ; in, Represents the coordinates (homogeneous coordinates) of feature points in the image to be registered. This represents the coordinates of the corresponding feature point in the reference image. This represents the currently estimated homography matrix. The optimal spatial correspondence between two frames is found by minimizing the reprojection error, preparing for the calculation of the transformation matrix.

[0036] (1-4) Homography matrix verification: The homography matrix describes the planar projection transformation relationship between two frames and is crucial for achieving spatial alignment. Two verification methods are employed: area ratio verification and condition number testing, to ensure geometric rationality and numerical stability. If the verification fails (i.e., the matrix degenerates or is excessively distorted), the current solution is discarded, and the process returns to steps (1-3) to increase the iteration count or resample, or the matrix from the previous frame is used for a smooth transition.

[0037] Conduct area ratio verification and set a reasonable range. Its calculation index is the absolute value of the determinant: ;

[0038] in, Representing the homography matrix The determinant of the matrix reflects the area scaling ratio before and after the transformation.

[0039] The formula for the condition number test is: ; in, and Represent matrices respectively The maximum and minimum singular values. A condition number that is too large indicates that the matrix is ​​close to singular and its values ​​are unstable.

[0040] (1-5) Constraining the time consistency of the transformation matrix To eliminate inter-frame jitter in video, the calculated homography matrix is ​​subjected to temporal smoothing. The formula for temporal smoothing is: ; in, This represents the homography matrix after smoothing the current frame. This represents the original homography matrix calculated for the current frame. This represents the homography matrix after smoothing the previous frame. This represents the smoothing weight, which is typically set to 0.3.

[0041] (1-6) Perspective Transformation. Using the smooth homography matrix obtained in step (1-5), perform a perspective transformation on the frame to be registered, transforming it to a spatial coordinate system consistent with the reference frame. The transformation equation is calculated as follows: ; Final pixel coordinates The calculation is as follows: ; The registered frames are written to a new video file, outputting a registered video with the same resolution and frame rate as the reference video. This provides spatially consistent multi-video data for subsequent object detection, comparison, and other processing. Through rigorous mathematical methods and engineering implementation, this system achieves high-quality multi-video registration and can handle video alignment tasks in complex scenarios.

[0042] (2) Target detection and tracking. Advanced deep learning target detection models such as YOLO are used to detect and track targets in each frame of the image. The system automatically identifies various targets in the image (such as cars, motorcycles, people, tents, parasols, etc.) and outputs the category, tracking ID, confidence score, coordinate box and center point of each target. The data is saved in JSON format for easy processing later.

[0043] (3) Multi-video target change comparison. Load the detection results JSON of each video, support multiple comparison modes (such as rectification supervision, comprehensive comparison, difference detection, cumulative change, step-by-step comparison, etc.), and perform target matching by tracking ID and IOU (Intersection over Union), automatically identify target changes such as addition, reduction, and rectification, and display them in a visual way on the interface or in the output video. Support frame-level detailed information storage and statistical analysis, which is convenient for traceability and supervision.

[0044] (3-1) Target Filtering For each frame's detection results, targets with low confidence are filtered out according to a set confidence threshold. The determination formula is: ; in, For target confidence level, The set confidence threshold.

[0045] (3-2) Target matching For different video frames within the same frame, a unique tracking ID is assigned to each target. First, target-to-target matching is performed based on tracking IDs; if IDs cannot match, spatial overlap matching is used based on IoU. If the IoU is greater than a set threshold... If the match is successful, then the match is considered successful. The determination formula is: ; Specifically, let the two detection boxes be respectively and The formula for calculating IoU is: ; in, Represents the area of ​​intersection. The union area represents the area of ​​the intersection and the area of ​​the union, which can be calculated from the coordinates of the detection box.

[0046] Width of the intersection region and high The calculation is as follows: ; ; in , Detect the coordinates of the top left and bottom right points of box A respectively. , The coordinates of the top-left and bottom-right points of box B are detected respectively; the intersection area is... .

[0047] (3-3) Based on the target matching results, count the "new targets" and "removed targets" of each video relative to the base video. The judgment logic for new targets is: a target that exists in the target video but has no corresponding target in the base video (no match in ID or IOU); the judgment logic for removed targets is: a target that exists in the base video but has no corresponding target in the target video.

[0048] Add target index = target video target set - matched target set Reduce target index = baseline video target set - matched target set ; (3-4) Supports multiple comparison modes (such as rectification supervision, comprehensive comparison, difference detection, cumulative change, step-by-step comparison, etc.) to flexibly display target changes according to different scenario requirements.

[0049] To facilitate understanding, an example is given here: conducting a scenario experiment to observe how the target changes under different modes. For example... Figure 2 and Figure 3In the rectification and supervision mode, it can check whether problems have been fixed, while highlighting new problems. A cyan box marks all detected objects in the baseline video; a red box marks newly added objects in Target 1 video relative to the baseline video (i.e., discovered non-compliant objects); a blue box highlights rectified targets in Target 2 video; an orange box shows rectified and cleaned-up objects; and a dark red box marks uniquely added objects (i.e., newly discovered non-compliant objects). For example... Figure 4 In the full comparison mode, you can easily and intuitively view all detection results from the three videos. All detected objects in the baseline video, target 1 video, and target 2 video are marked with cyan boxes. For example... Figure 5 In difference detection mode, it quickly identifies the independent changes of each target video relative to the baseline, ignoring invariant parts, and simultaneously displays newly added and removed targets, facilitating the discovery of all changes and analysis of object disappearance patterns. Cyan boxes mark all detected objects in the baseline video, red boxes mark newly added objects in target 1 and target 2 videos relative to the baseline video, and blue boxes mark removed objects in target 1 and target 2 videos relative to the baseline video. Orange boxes mark objects present in both the baseline and target video 1 but disappearing in target video 2, helping to analyze the complete process of environmental change, identify which objects disappear in the time series, and provide a more comprehensive perspective on difference analysis. Figure 6 In cumulative change mode, multi-stage cumulative changes can be tracked, showing the increment from the baseline to Video 2, and then to the overall cumulative additions in Video 3. All detected objects in the baseline video are marked with cyan boxes. Target 1 video only displays newly added objects relative to the baseline video, marked with red boxes. Target 2 video displays newly added objects in Target 1 video relative to the baseline video, marked with red boxes. Newly added objects unique to Target 2 video are marked with dark red boxes, thus displaying the cumulative changes in Target 2 video. Figure 7 In the step-by-step comparison mode, the change process is analyzed step by step. First, the increment from the baseline to video 2 is observed, and then the further changes from video 2 to video 3 are observed, forming a chain comparison. All detected objects in the baseline video are marked with cyan boxes. In the target 1 video, only newly added objects relative to the baseline video are shown with red boxes. In the target 2 video, only changes relative to the target 1 video are shown, with newly added objects marked with red boxes and reduced objects marked with blue boxes.

[0050] Added and removed targets are marked with different colors, and the comparison results are overlaid on the video in a visual way. The number of changes in each type of target is statistically output, which makes it easier to understand the changes in targets and provides reliable technical support for water conservancy scenarios.

[0051] Visualization and Interaction. Provides a Tkinter-based graphical interface that supports video and JSON file selection, parameter settings, comparison mode switching, and result saving, enhancing the user experience.

[0052] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for inspecting water conservancy scenes based on multi-temporal UAV image detection and comparison, characterized in that, Includes the following steps: (1) Acquire multi-temporal UAV images of the inspection scene, perform spatiotemporal registration of the multi-temporal UAV images with the reference video respectively, write the registered frames into a new video file, and output the registration result video with the same resolution and frame rate as the reference video. (2) Use a deep learning object detection model to perform object detection and tracking on each frame of the new video file, automatically identify various types of objects in the image, and output the category, tracking ID, confidence score, coordinate box and center point of each object, and save it in JSON format; (3) Load the detection results of each video in step (2), compare the changes of the target in multiple videos, match the target by tracking ID and IOU, automatically identify the changes of the target, and display them in a visual way on the interface or in the output video.

2. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 1, characterized in that, Multi-temporal UAV images are spatiotemporally registered with reference videos, specifically including: (1-1) Feature point detection and extraction The frame rate, resolution, and total number of frames of each video are obtained. Using the reference video as a reference, the corresponding frames of other videos are read frame by frame according to their frame number to achieve time synchronization. For each group of synchronized frames, the SIFT algorithm is used to extract key feature points and their descriptions on the reference frame and the frame to be registered, respectively. (1-2) Feature matching BFMatcher is used for feature point matching, and the matching feature point pairs are selected by the nearest neighbor distance ratio test. (1-3) Robust homography matrix estimation Based on the selected feature point pairs, the homography transformation matrix from the frame to be registered to the reference frame is calculated using the RANSAC algorithm. (1-4) Homography Matrix Verification Two methods, area ratio verification and condition number test, are used to verify geometric rationality and numerical stability respectively. If the verification does not meet the requirements, return to step (1-3) to recalculate the homography transformation matrix. (1-5) Constraining the time consistency of the transformation matrix To eliminate inter-frame jitter in the video, the calculated homography matrix is ​​subjected to temporal smoothing. (1-6) Perspective Transformation Using the calculated homography matrix, a perspective transformation is performed on the frame to be registered, transforming it to a spatial coordinate system consistent with the reference frame, thereby achieving spatial alignment of multiple videos and ensuring that the position of the same target in different videos corresponds.

3. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 2, characterized in that, Step (1-1) Feature point detection and extraction specifically includes: Construct a Gaussian difference pyramid and use SIFT for feature point detection. The calculation formula is as follows: ; in, These represent the pixel coordinates of the image. Represents the scale spatial factor. Represents the Gaussian difference function. The scale is represented as Gaussian kernel function, Indicates the input image. This represents the scaling factor between adjacent scales. This represents the convolution operation; The formula for calculating the direction of feature points is as follows: ; in, This represents the pixel values ​​of the image after Gaussian smoothing. Represents the magnitude of the gradient. Indicates the direction of the gradient.

4. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 2, characterized in that, Area ratio verification, setting a reasonable range as follows Its calculation index is the absolute value of the determinant: ; in, Representing the homography matrix The determinant of the matrix, which reflects the area scaling ratio before and after the transformation; The formula for the condition number test is: ; in, and Represent matrices respectively The maximum and minimum singular values.

5. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 1, characterized in that, In step (2), YOLO is used for target detection and tracking.

6. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 1, characterized in that, In step (3), multiple comparison modes are supported during the comparison of changes in multiple video targets, including support for rectification supervision, comprehensive comparison, difference detection, cumulative change, and stepwise comparison.

7. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 1, characterized in that, Step (3) involves identifying target changes, including: (3-1) For the detection results of each frame, according to the set confidence threshold, filter out targets with low confidence and retain targets with high reliability; (3-2) For different videos of the same frame, assign a unique tracking ID to each target. First, match the targets one by one according to the tracking ID. If the IDs cannot match, use IOU for spatial overlap matching. If the IOU is greater than the set threshold, it is considered a match. (3-3) Based on the target matching results, calculate the "new target" and "reduced target" of each video relative to the baseline video.

8. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 7, characterized in that, The formula for calculating the spatial overlap matching of two detection boxes A and B using IOU is as follows: ; in, Represents the area of ​​intersection. The union area represents the area of ​​the intersection; the intersection area and the union area are calculated using the coordinates of the detection box.

9. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 7, characterized in that, Target changes include "new targets" and "removed targets" relative to the baseline video; the determination logic for new targets is: they exist in the target video but have no corresponding targets in the baseline video; the determination logic for removed targets is: they exist in the baseline video but have no corresponding targets in the target video. Add target index = target video target set - matched target set Reduce target index = baseline video target set - matched target set .

10. The water conservancy scene inspection method based on multi-temporal UAV image detection and comparison according to claim 1, characterized in that, Step (3) uses a Tkinter-based graphical interface for visualization, supporting video and JSON file selection, parameter settings, comparison mode switching, and result saving, thus improving the user experience.