Airport foreign object detection enhancement method based on generative model and three-stage fusion
Through the generation model and the three-stage fusion method, the data acquisition difficulties and insufficient detection accuracy in the detection of external objects in the airport runway are solved, and images of external objects that are suitable for the scene are generated, which improves the accuracy and generalization ability of the detection model, especially the detection effect of small targets.
Patent Information
- Application Number
- CN202510528357.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-12
AI Technical Summary
In the prior art, the detection of external objects on the airport runway faces problems such as difficulty in data collection, geometric constraint deviation between foreign objects and real scenes, insufficient dimensional matching degree and insufficient detection accuracy of small targets, resulting in poor generalization ability and engineering implementation effect of detection models.
Using a method based on the generative model and three-stage fusion, foreign object images are generated through the diffusion model, combined with size transformation, seamless fusion and style migration, an alien object detection model with similar distance loss optimization is constructed, an airport foreign object image data set is generated that meets the scene adaptation, and the loss function of the detection model is optimized.
High-fidelity conversion and fusion of foreign object images and airport scenes is realized, the accuracy and generalization capabilities of the detection model are improved, especially the detection accuracy of small targets, and the missed detection rate is reduced.
Smart Images

Figure CN120472259A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and aviation safety technology, and in particular to a data enhancement method for airport runway foreign object detection based on a generative model and three-stage image fusion. Background Art
[0002] The existing technology for detecting foreign objects on airport runways faces multiple technical bottlenecks. First, there are significant difficulties in acquiring real-world data. Since airports are located in air traffic control areas and have strict security restrictions, the acquisition of high-precision, multi-scene runway images is limited, and the actual sample library is insufficient in size and diversity. Second, traditional data augmentation methods (such as geometric transformation and color perturbation) can only generate surface deformation data and cannot solve the problem of perspective projection adaptation of foreign objects. As a result, the generated foreign objects deviate significantly from the geometric constraints of the real runway scene (such as vanishing point alignment and proportional relationship). At the same time, the size of the synthetic data and the real scene is not well matched. The scaling error of existing fusion methods generally exceeds 15% (for example, a foreign object with a diameter of 5 cm will appear to fluctuate between 3.4 and 6.8 cm in the image), which directly affects the reliability of the detection system's judgment of the foreign object threat level. In addition, the lack of accuracy in small target detection has become a core pain point, especially for metal parts with an average size of less than 3 cm (such as screws and washers). The existing models have a missed detection rate of over 30% under complex background interference. These problems jointly restrict the generalization ability and engineering implementation effect of the airport foreign object detection model. Summary of the Invention
[0003] The purpose of the present invention is to provide an intelligent detection method for airport pavement status based on image recognition, so as to solve the problem that the existing technology is difficult to detect airport pavement in real time.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] According to one aspect of the present invention, a method for enhancing airport foreign object detection based on a generative model and three-stage fusion is provided, comprising the following steps:
[0006] Deploy foreign objects in the actual airport environment and use properly set up optical equipment to collect images of foreign objects and airport scene maps in key areas such as runways, taxiways, and aprons;
[0007] Generate various types of foreign object images and airport surveillance area images under different environmental conditions through a diffusion model, and further enhance the airport scene images through a generative adversarial network;
[0008] The real and generated foreign object images and airport scenes are combined through a three-stage image fusion method that combines scale transformation, seamless fusion, and style transfer to generate a large number of scene-adapted airport foreign object images, forming an enhanced foreign object dataset.
[0009] A foreign object detection model optimized with similarity distance loss is constructed to achieve better detection results in enhanced datasets and actual tests.
[0010] Furthermore, the rationally set up optical equipment is specifically as follows: when collecting data on the runway or taxiway, the optical equipment is set up at the position of the runway edge light, no more than 40 cm, and the selected optical equipment should capture the centerline of the runway or taxiway, and the imaging quality requirement is to meet the requirement that 2 cm foreign objects are not less than 5×5 pixels in the imaging picture; when collecting data on the apron, the optical equipment should be set up on a facility with a certain height near the area to be monitored to ensure that the monitoring image covers the monitoring area, and the imaging quality requirement is to meet the requirement that 2 cm foreign objects are not less than 5×5 pixels in the imaging picture.
[0011] Furthermore, the diffusion model is used to generate various types of foreign object images and airport monitoring area images under different environmental conditions. Specifically, the perceptual compression encoder ε(x) is first used to map the image to a low-dimensional latent space, and the adversarial loss is combined with divergence and vector regularization to filter out high-frequency noise while retaining the semantic details of the foreign object, and high-fidelity reconstruction is achieved through decoder control; secondly, a diffusion model is constructed in the latent space, and the objective function L is optimized. LDM Training a temporal conditional UNet denoising network ∈ θ ; Finally, design the multimodal conditional control input encoder τ θ The cross-layer attention mechanism dynamically integrates external conditions such as foreign object description text, depth information, and images into the generation process, enabling the model to accurately control the spatial layout and attributes of generated foreign objects based on input constraints. The cross-layer attention mechanism is shown in Equation 1, and the latent space optimization objective function is shown in Equation 2.
[0012]
[0013] in, Represents the UNet denoising network ∈ θ The intermediate representation of is the learnable projection matrix, τ θ (y) is the external input condition encoder.
[0014]
[0015] Where E is the expectation, ∈ θ is the time-conditional UNet denoising network at diffusion step t.
[0016] Furthermore, the three-stage image fusion method described in step 3 is specifically as follows: first, the real and generated foreign objects are resized, then the resized foreign objects are seamlessly fused with the real and generated airport scenes, and finally the fused image is style-transformed.
[0017] Furthermore, the size transformation is specifically described as follows: Foreign objects at airports are typically lying flat, meaning their height is typically their smallest three-dimensional dimension. When solving the depth and size estimation problem for foreign object detection from wide-angle monocular images, the three-dimensional problem is simplified to a two-dimensional problem. The longest dimension of an object is approximated as the length of its bottom edge in the image, and its position is simplified to the midpoint of this bottom edge. In real-world scenes, foreign objects primarily appear within the red-marked area. Therefore, when performing size transformation, the transformation is primarily focused on the central area of the image. The red-marked area is divided into 4×16 small square blocks, each with a side length of 240 pixels. Based on the camera placement and tilt angle, the perspective transformation matrix of these 64 small square blocks relative to the actual scene is calculated. Based on the fusion position, the corresponding perspective transformation matrix for the specified area is determined. The source image and its mask, as well as the size of the foreign object, are input and a projective transformation is applied to align them with the actual scene, generating a resized source image and its corresponding mask.
[0018] Furthermore, the seamless fusion described above specifically eliminates visible seams between the foreign object image and the airport scene image by employing an improved method combining gradient blending and multi-resolution blending. This method smoothes the transition region between images to eliminate foreign object seams and fuses foreign object image details at multiple scales to avoid artifacts. This method formalizes the image blending problem as an interpolation optimization problem based on a guided vector field, as shown in Equation 3.
[0019]
[0020] in, is the Laplace gradient operator, f is the synthetic image function, f * is the target function image, v is the guide vector field, Ω is the mixing area, It's a mixed boundary.
[0021] For each color channel of the RGB image, it is discretized into a quadratic optimization problem on the pixel grid, as shown in Equation 4.
[0022]
[0023] The pixel point p at the boundary of the mixed region Ω must satisfy Equation 5.
[0024]
[0025] For a pixel point p completely located inside Ω, the equation is simplified to Equation 6.
[0026]
[0027] Among them, N p is the four-connected neighborhood of pixel p,<p,q> is a pair of adjacent pixels, v pq =g p -g q is the source image gradient difference.
[0028] Furthermore, the style transfer described herein specifically utilizes StyleDiffusion to enhance the fusion of foreign object images under different lighting and weather conditions. This framework comprises three core components: First, the style removal module uses a diffusion model to remove style elements from the image, extract content features, decouple the geometric structure of foreign objects from the background environment, and preserve the integrity of the foreign object's morphology. Second, the style transfer module, based on a pre-trained diffusion model and a CLIP-driven loss function, learns the disentangled style information and transfers it to the target image. Leveraging CLIP's multimodal alignment capabilities, it establishes a mapping between text descriptions and visual style. Through a diffusion process, the target style is gradually infused, achieving controllable stylized rendering. Finally, the style disentanglement loss and reconstruction prior combine L1 and directional constraints to ensure alignment of the learned style with the target style domain. Style feature reconstruction optimizes the transfer process and improves style fidelity. Through decoupled control, high-quality output, and cross-modal alignment, this framework provides high-fidelity and diverse training data for airport foreign object detection models, significantly improving the model's generalization capabilities in complex environments.
[0029] Furthermore, the formation of the enhanced foreign object dataset is specifically as follows: a total of 4,800 high-resolution images were taken at three fixed locations in the airport using a fixed-angle camera, including 3,200 during the day and 1,600 at night. The dataset contains 15 categories of foreign objects and is manually annotated. Through the proposed data enhancement method, 19,200 foreign object images were generated, covering a variety of environmental conditions, such as rainy days, foggy days, low light, etc. The ratio of synthetic images to real images is set to 3:1 to ensure the balance of the dataset. In the dataset, 70% is used for training, 20% is used for verification, and 10% is used for testing, and when dividing, it is ensured that there is no overlap between the foreign object categories and environmental conditions in different sets.
[0030] Furthermore, the foreign object detection model optimized by similarity distance loss is constructed as follows: in order to further improve the bounding box regression accuracy of small-sized foreign objects, a similarity distance strategy is introduced in the loss function optimization. Similarity distance aims to more accurately reflect the similarity between different bounding boxes. It consists of two parts: position similarity and shape similarity, as shown in Equations 7-11. This measurement method normalizes the influence of different object sizes by incorporating the bounding box size into the similarity calculation, making it adaptable to datasets of multi-scale objects. The normalization parameters are extracted from the entire training set to ensure its robustness under different data distributions. In addition, the similarity distance is mapped to a value between 0 and 1 through an exponential function, where a higher value indicates a higher similarity between the bounding boxes.
[0031]
[0032]
[0033] Among them, (x g ,y g ) and (x p ,y p ) represent the center coordinates of the real box and the predicted box, w g ,w p ,h g ,h p Represents the width and height of the true box and anchor box respectively. a represents the average ratio of the distance in the x direction of all true boxes and anchor boxes in each image in the entire training set to the sum of their widths, and b represents the average ratio of the distance in the y direction of all true boxes and anchor boxes in each image in the entire training set to the sum of their widths. M represents the number of images in the training set, N i ,Q i Represents the number of real boxes and predicted boxes in the i-th image. ij ,x ik They represent the x coordinates of the center points of the jth real box and the kth predicted box in the i-th image, respectively, and w ij ,w ik Respectively represent the width of the jth true box and the kth predicted box in the i-th image. ij ,y ik They represent the y coordinates of the center points of the jth real box and the kth predicted box in the i-th image, respectively, and h ij ,h ik They represent the width of the jth true box and the kth predicted box in the i-th image respectively.
[0034] According to one aspect of the present invention, a storage medium is provided, in which instructions are stored. When a computer reads the instructions, the computer is caused to execute any of the above-mentioned methods for enhancing airport runway foreign object detection data based on a generative model and three-stage image fusion.
[0035] According to another aspect of the present invention, an electronic device is provided, comprising a processor and the above-mentioned storage medium, wherein the processor executes instructions in the storage medium.
[0036] Compared with the existing technology, the beneficial effects of the present invention are as follows: the present invention realizes the controlled generation of foreign objects and airport scenes and the conversion of airport scenes under different environments; and through a three-stage fusion method considering size transformation, seamless fusion, and style conversion, the foreign object image and the airport scene map are fused into an airport foreign object image that is more in line with the actual distribution; a foreign object detection model optimized by similarity distance loss function is proposed, and the detection accuracy is further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] To make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0038] Unless otherwise defined, technical or scientific terms used herein shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0039] Figure 1 is a method flow chart of a preferred embodiment of the present invention;
[0040] Figure 2 Schematic diagram of the capture of real foreign objects and airport scene images according to a preferred embodiment of the present invention: (a) Schematic diagram of the capture points of the foreign object and airport scene; (b) Schematic diagram of the image of the foreign object and airport scene;
[0041] Figure 3 1. A preferred embodiment of the present invention is a model architecture for generating images of foreign objects and airport scenes, and a schematic diagram of the generated images. (a) Schematic diagram of the model architecture for generating images of foreign objects and airport scenes, (b) Schematic diagram of the generated foreign object image, (c) Schematic diagram of the generated airport scene image.
[0042] Figure 4 Figure 1 is a schematic diagram of an airport scene image enhancement model architecture and enhanced images according to a preferred embodiment of the present invention. (a) Schematic diagram of the model architecture for generating foreign object and airport scene images, (b) Schematic diagram of image enhancement from night to day, and (c) Schematic diagram of image enhancement from day to night.
[0043] Figure 5 This is a schematic diagram of the size transformation of a foreign object image according to a preferred embodiment of the present invention;
[0044] Figure 6 This is a schematic diagram of seamless fusion of a foreign object and an airport scene image according to a preferred embodiment of the present invention;
[0045] Figure 7 Figure 1 is a model architecture for style conversion of images of foreign objects and airport scenes, and a schematic diagram of style conversion, according to a preferred embodiment of the present invention. (a) Schematic diagram of the style conversion model architecture, (b) Schematic diagram of style conversion of foreign object images.
[0046] Figure 8 It is a schematic diagram of the detection results of a trained foreign object detection model according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings. In the present invention, various aspects of the present invention are described with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present invention are not limited to those described in the accompanying drawings. It should be understood that the present invention is implemented by any of the various concepts and embodiments introduced above, as well as the concepts and implementation methods described in detail below, because the concepts and embodiments disclosed in the present invention are not limited to any implementation method. In addition, some aspects disclosed in the present invention can be used alone or in any appropriate combination with other aspects disclosed in the present invention.
[0048] like Figure 1-8 A method for enhancing airport foreign object detection based on a generative model and three-stage fusion is shown, comprising the following steps:
[0049] Step 1: Place foreign objects in the actual airport environment and use properly set up optical equipment to collect images of foreign objects in key areas such as runways, taxiways, aprons, and airport scene maps. Figure 2 Figure 2 shows a schematic diagram of foreign objects and airport scene images collected on an airport runway, service lane, and apron. The characteristics of the foreign object images are summarized as text, and depth information maps of airport scene images in different areas are extracted.
[0050] Step 2: Generate various types of foreign object images and airport monitoring area images under different environmental conditions through the diffusion model, and further enhance the airport scene image through the generative adversarial network. Take the foreign object description text, scene depth information map, foreign object and airport scene image as prompt input, and generate richer foreign object images and airport scene images through the diffusion model, such as Figure 3As shown in Figure 2. The real and generated images are input into the generative adversarial network model, and prompt words of different environments are added to generate more images of foreign objects and airport scenes in different environments, such as Figure 4 shown.
[0051] Step 3: Combine the real and generated foreign object images and airport scenes through a three-stage image fusion method that combines size transformation, seamless fusion, and style transfer to generate a large number of scene-matched airport foreign object images to form an enhanced foreign object dataset. First, the size of the foreign objects is transformed, and the transformation is mainly concentrated in the red marked area, such as Figure 4 As shown. The red marked area is divided into 4×16 small square blocks, each with a side length of 240 pixels. According to the placement and tilt angle of the camera, the perspective transformation matrix of these 64 small square blocks relative to the actual scene is calculated. According to the fusion position, the corresponding perspective transformation matrix of the specified area is determined. The source image and its mask, the size of the foreign object are input, and the projection transformation is applied to align it with the actual scene, thereby generating the resized source image and its corresponding mask, as shown in Figure 5 Then the foreign objects are seamlessly integrated with the airport scene image, as shown in Figure 6 As shown in the figure, the foreign object image and the real airport scene are seamlessly fused to generate the airport scene. Finally, the fused image is style-transformed, as shown in the figure. Figure 7 Figure 2 shows the different style transfer effects of the fused image at night, at night with heavy rain, and at night with light rain. Combining the above image enhancement methods, 19,200 images of foreign objects were generated, covering a variety of environmental conditions, such as rain, fog, and low light, encompassing 15 categories of foreign objects. The ratio of synthetic images to real images was set to 3:1 to ensure a balanced dataset. The dataset was divided into 70% for training, 20% for validation, and 10% for testing. This division ensured that there was no overlap in foreign object categories or environmental conditions across the different sets.
[0052] Step 4: Build a foreign object detection model optimized with similarity distance loss, achieving good detection results on the augmented dataset and in actual testing. The foreign object detection model was trained on the dataset, and the results are shown in the following table.
[0053] Table 1 Foreign object detection model indicators
[0054]
[0055] As can be seen from the table, data enhancement and similarity distance optimization can effectively improve the accuracy of foreign object detection. The detection effect of the YOLOv11 model in actual scenes is as follows: Figure 8 shown.
[0056] Example 2:
[0057] The computer-readable storage medium of this embodiment stores a computer program thereon, which, when executed by a processor, implements the steps of the airport runway foreign object detection data enhancement method based on a generative model and three-stage image fusion in Example 1.
[0058] The computer-readable storage medium of this embodiment may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal; the computer-readable storage medium of this embodiment may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped on the terminal; further, the computer-readable storage medium may also include both an internal storage unit of the terminal and an external storage device.
[0059] The computer-readable storage medium of this embodiment is used to store computer programs and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0060] Example 3:
[0061] The computer device of this embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for enhancing data for detecting foreign objects on an airport runway based on a generative model and three-stage image fusion in Example 1 are implemented.
[0062] In this embodiment, the processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The memory can include read-only memory and random access memory, and provide instructions and data to the processor. A part of the memory can also include non-volatile random access memory. For example, the memory can also store information about the device type.
[0063] Those skilled in the art will appreciate that the disclosed contents of the embodiments may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.
[0064] The present invention is described with reference to the flowcharts and / or block diagrams of the methods and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as the combination of the processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions; these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0065] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0067] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0068] The examples described in the present invention are merely descriptions of the preferred embodiments of the present invention and are not intended to limit the concept and scope of the present invention. Without departing from the design concept of the present invention, various modifications and improvements made to the technical solutions of the present invention by engineers and technicians in this field should fall within the scope of protection of the present invention.
Claims
1. A method for enhancing airport foreign object detection based on generative model and three-stage fusion, characterized by: The steps include: Place foreign objects in the actual airport environment and obtain images of the foreign objects and airport scene maps; Generate various types of foreign object images and airport surveillance area images under different environmental conditions through a diffusion model, and further enhance the airport scene images through a generative adversarial network; The real and generated foreign object images and airport scenes are combined through a three-stage image fusion method that combines scale transformation, seamless fusion, and style transfer to generate a large number of scene-adapted airport foreign object images, forming an enhanced foreign object dataset. Constructing a foreign object detection model with similarity distance loss optimization.
2. The enhanced airport foreign object detection method based on generative model and three-stage fusion according to claim 1 is characterized in that: The method of generating various types of foreign object images and airport monitoring area images under different environmental conditions by using the diffusion model is as follows: First, a perceptual compression encoder ε(x) is used to map the image into a low-dimensional latent space. The adversarial loss is combined with divergence and vector regularization to filter out high-frequency noise while preserving the semantic details of foreign objects. High-fidelity reconstruction is achieved through decoder control. Secondly, a diffusion model is constructed in the latent space by optimizing the objective function L LDM Training a temporal conditional UNet denoising network ∈ θ ; Finally, design the multimodal conditional control input encoder τ θ ,The external conditions of the foreign objects are dynamically ,integrated into the generation process through the cross-layer attention mechanism, ,enabling the model to precisely control the spatial layout and ,attributes of the generated foreign objects based on the input constraints; Among them, the latent space optimization objective function is as follows: in, Represents the UNet denoising network ∈ θ The intermediate representation of is the learnable projection matrix, τ θ (y) is the external input condition encoder; Where E is the expectation, ∈ θ is the time-conditional UNet denoising network at diffusion step t.
3. The enhanced airport foreign object detection method based on generative model and three-stage fusion according to claim 1 is characterized in that: The airport scene images are further enhanced by generative adversarial networks, specifically: CycleGAN is used to quickly generate airport scene images under different lighting and weather conditions; based on the potential diffusion model, low-rank adapters are introduced in multiple layers of U-Net, and the pre-trained diffusion model is fine-tuned through the low-rank matrix; a direct path is established between the input image and the output image of the foreign object scene to ensure the consistency of the scene structure, and a convolution layer with near-zero initialization is used as a conditional input interface to achieve effective control of the diffusion process while minimizing the disturbance to the pre-trained model; and the first convolution layer of U-Net is retrained to make the model better adapt to the unique lighting and weather characteristics of the airport scene.
4. The enhanced airport foreign object detection method based on generative model and three-stage fusion according to claim 1 is characterized in that: The three-stage image fusion method specifically comprises the following steps: firstly performing size transformation on the real and generated foreign objects, then seamlessly integrating the transformed foreign objects with the real and generated airport scenes, and finally performing style transformation on the fused images.
5. The enhanced airport foreign object detection method based on generative model and three-stage fusion according to claim 4 is characterized in that: The resizing process specifically involves simplifying a three-dimensional problem into a two-dimensional problem, approximating the longest dimension of an object to the length of its bottom edge in the image, and simplifying the object's position to the midpoint of the bottom edge. In real scenes, foreign objects primarily appear within the marked area, so when performing resizing, the transformation is primarily concentrated in the middle area of the image. The marked area is divided into 4×16 small square blocks, each with a side length of 240 pixels. Based on the camera's placement and tilt angle, the perspective transformation matrix of these 64 small square blocks relative to the actual scene is calculated. According to the fusion position, determine the corresponding perspective transformation matrix of the specified area; Taking as input the source image and its mask, as well as the size of the foreign object, a projective transformation is applied to align the foreign object with the actual scene, thereby generating a resized source image and its corresponding mask.
6. The enhanced airport foreign object detection method based on generative model and three-stage fusion according to claim 4 is characterized in that: The seamless fusion specifically adopts an improved method combining gradient blending and multi-resolution blending to eliminate foreign object seams by smoothing the transition areas between images and to fuse foreign object image details at multiple scales; The image blending problem is formalized as an interpolation optimization problem based on the guided vector field, as follows: in, is the Laplace gradient operator, f is the synthetic image function, f * is the target function image, v is the guide vector field, Ω is the mixing area, It is a mixed boundary; For each color channel of the RGB image, it is discretized into a quadratic optimization problem on the pixel grid as follows: The pixel point p at the boundary of the mixed area Ω must satisfy the following formula: For a pixel point p completely inside Ω, the equation is simplified to the following equation 6: Among them, N p is the four-connected neighborhood of pixel p,<p,q> is a pair of adjacent pixels, v pq =g p -g q is the source image gradient difference.
7. The enhanced airport foreign object detection method based on generative model and three-stage fusion according to claim 4 is characterized in that: The style conversion is specifically: using StyleDiffusion to enhance the fusion of foreign object images under different lighting and weather conditions; First, the style removal module uses a diffusion model to remove style elements from the image, extract content features, decouple the geometric structure of foreign objects from the background environment, and preserve the morphological integrity of foreign objects. Secondly, the style transfer module, based on a pre-trained diffusion model and a CLIP-driven loss function, learns the disentangled style information and transfers it to the target image. It leverages CLIP's multimodal alignment capabilities to establish a mapping between text descriptions and visual styles, and gradually injects the target style through a diffusion process, achieving controllable stylized rendering. Finally, the style disentanglement loss and reconstruction prior are combined with L1 constraints and directional constraints to ensure that the learned style is aligned with the target style domain and optimize the migration process through style feature reconstruction.
8. The enhanced airport foreign object detection method based on generative model and three-stage fusion according to claim 1 is characterized in that: The foreign object detection model optimized by similarity distance loss is constructed as follows: a similarity distance strategy is introduced in the loss function optimization. The similarity distance strategy includes position similarity and shape similarity, as shown in the following formula: Among them, (x g ,y g ) and (x p ,y p ) represent the center coordinates of the real box and the predicted box, w g ,w p ,h g ,h p Represent the width and height of the true box and anchor box respectively; a represents the average ratio of the distance in the x direction of all true boxes and anchor boxes in each image in the entire training set to the sum of their widths; b represents the average ratio of the distance in the y direction of all true boxes and anchor boxes in each image in the entire training set to the sum of their widths; M represents the number of images in the training set, N i ,Q i Represents the number of real boxes and predicted boxes in the i-th image; x ij ,x ik Represents the x coordinates of the center points of the jth real box and the kth predicted box in the i-th image, w ij ,w ik Respectively represent the width of the jth real box and the kth predicted box in the i-th image; y ij ,y ik They represent the y coordinates of the center points of the jth real box and the kth predicted box in the i-th image, respectively, and h ij ,h ik Respectively represent the width of the jth true box and the kth predicted box in the i-th image; By incorporating the bounding box size into the similarity calculation, the influence of different object sizes is normalized. The normalization parameters are extracted from the entire training set, and the similarity distance is mapped to a value between 0 and 1 through an exponential function, where higher values indicate greater similarity between bounding boxes.
9. A storage medium, characterized in that: The storage medium stores instructions, and when a computer reads the instructions, the computer is caused to execute the airport runway foreign object detection data enhancement method based on a generative model and three-stage image fusion according to any one of claims 1 to 8.
10. An electronic device, characterized in that: The device comprises a processor and the storage medium according to claim 9, wherein the processor executes instructions in the storage medium.