A target detection method and system for dynamic complex scenes
By combining scene semantic awareness and target density adaptation mechanisms with small target boundary protection, the problems of supervision coverage radius and model convergence of Transformer detectors in dynamic and complex scenes are solved, achieving efficient and stable target detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGXIA UNIVERSITY
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-09
Smart Images

Figure CN122176470A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and in particular to a target detection method and system for dynamic and complex scenarios. Background Technology
[0002] Object detection, as one of the core tasks in computer vision and intelligent perception, plays a crucial role in many practical scenarios such as autonomous driving, intelligent monitoring, and medical image analysis. With the gradual application of the Transformer architecture in object detection tasks, end-to-end object detection models, represented by the fine-grained distributed refinement detector (D-FINE), have emerged. These Transformer-based detectors abandon the manually designed components of traditional methods, directly achieving end-to-end learning from the input image to object prediction through an "encode-decode" structure. This effectively reduces human intervention and has gradually become the mainstream technical solution in this field.
[0003] However, existing Transformer-based detectors still face significant technical bottlenecks during actual training: First, the one-to-one assignment strategy limits the diffusion range of the supervision signal in the high-dimensional feature space, resulting in a limited supervision coverage radius; second, pairing a single positive sample with only one prediction box significantly slows down the model's convergence speed; third, existing data augmentation methods are mostly static or staged strategies (such as Mosaic and MixUp), which neither fully consider the semantic clustering characteristics of the scene nor design dedicated augmentation logic for severely occluded targets and small targets, easily leading to problems such as excessive target overlap and scene semantic conflicts. Therefore, this invention proposes a dynamic scene-aware target detection method, aiming to expand the effective coverage radius of the supervision signal, thereby significantly improving the target detection accuracy in dynamic and complex scenes. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a target detection method for dynamic and complex scenarios to solve the problem that the one-to-one allocation strategy used limits the diffusion range of the supervision signal in the high-dimensional feature space, resulting in a limited supervision coverage radius.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a target detection method for dynamic and complex scenes, comprising: Obtain the raw dataset of image and video sequences; Based on convolutional neural networks and the Transformer architecture, multi-level features that combine local detail information and global semantic features are extracted. By parsing the core scene semantics of the input data through the scene semantic perception subunit, adaptive matching between the detection task and the scene semantics can be achieved. Based on the target density characteristics, the image enhancement strategy and corresponding parameters are dynamically adjusted to reduce the interference of the supervision signal in high-density areas; By using small target bounding boxes to protect sub-units, non-salient target regions are locked, preventing the small target supervision signal from being weakened during image enhancement and feature fusion.
[0007] As a preferred embodiment of the target detection method for dynamic and complex scenes described in this invention, the step of parsing the core scene semantics of the input data through a scene semantic perception subunit to achieve adaptive matching between the detection task and the scene semantics includes: Pre-trained convolutional neural networks are used to encode image and video data, and their features and semantic information are mined, thereby enhancing the representation and extraction of corresponding features; Based on the scene semantic guidance module, to eliminate the interference of feature scale differences on similarity calculation, the extracted scene feature vectors are... Perform L2 normalization.
[0008] ; ; For the candidate image set used for enhancement Similarly, scene features are extracted and normalized using L2 normalization. Then cosine similarity was used. This is used to measure the semantic similarity between the original image and the candidate enhanced image.
[0009] ; The closer the value is to 1, the stronger the semantic relationship between the two images.
[0010] As a preferred embodiment of the target detection method for dynamic and complex scenes described in this invention, the step of dynamically adjusting the image enhancement strategy and corresponding parameters based on target density characteristics to reduce interference from the supervision signal in high-density regions includes: Based on the target density adaptation module, an enhancement strategy is formulated by defining the target density and combining it with density grading. Obtain the set of bounding boxes of real objects in the original image, and then determine the density based on area proportion. With target quantity density The weighted fusion yields the comprehensive target density. The expression is: ; ; ; Finally, a low density threshold is set. With high threshold The normalized composite density The image enhancement methods are categorized into three levels: low, medium, and high, corresponding to three different types of methods: random cropping, blending enhancement, and local adjustment. The expression is as follows: ; in, This represents the normalized overall target density, used to measure the density of targets in an image; and These are preset low-density thresholds and high-density thresholds, used to classify density levels; function according to The enhancement method is dynamically selected based on the interval in which it is located.
[0011] As a preferred embodiment of the target detection method for dynamic and complex scenes described in this invention, the step of locking non-salient target regions through small target bounding box protection sub-units to prevent the small target supervision signal from being weakened during image enhancement and feature fusion includes: Based on the small target boundary protection module, the set of bounding boxes corresponding to the small targets is first filtered out. Then calculate the center coordinates of each small target. ; ; ; ; Considering that the characteristics of small targets are concentrated in the central area, its core protection area is defined as... Center of the circle A circular region with radius (where) (1 / 4 of the diagonal length of the small target), and set the corresponding protection area. The expression is: ; ; in, This represents the set of bounding boxes for the selected small targets; and They represent the first The center coordinates of the bounding boxes of each small target in the horizontal and vertical directions are calculated by taking the midpoints of the left and right boundaries and the top and bottom boundaries of the corresponding bounding boxes. Indicates the first The radius of the core protected area of a small target is equal to one-quarter of its diagonal length; Indicates the center point ( , ( ) is the center and radius is A circular protective area.
[0012] As a preferred embodiment of the target detection method for dynamic and complex scenes described in this invention, in the step of extracting multi-level features based on convolutional neural networks and Transformer architecture, the shallow feature map output by the convolutional neural network and the high-level feature map output by the Transformer encoder are fused across scales; the fusion process includes aligning the channel dimensions of features at different levels, dynamically adjusting the contribution weight of each level of features during fusion through a learnable attention mechanism, and then injecting high-level semantic information into the shallow features through upsampling and skip connections to generate a fused feature representation that takes into account both local details and global semantics.
[0013] As a preferred embodiment of the target detection method for dynamic and complex scenes described in this invention, wherein: the above.
[0014] As a preferred embodiment of the target detection method for dynamic and complex scenes described in this invention, in the model training phase, the supervision signal in the loss function is weighted based on the scene semantic matching result, target density classification result, and small target protection region determination result of the image. For predicted targets located in images with high semantic consistency, in low-density regions, or within the core protection area of small targets, higher loss weights are assigned to enhance their supervision during training, thereby mitigating the problems of high-density interference and small target weakening.
[0015] As a preferred embodiment of the target detection method for dynamic and complex scenes described in this invention, the method adopts an end-to-end training approach, simultaneously performing scene semantic parsing, target density estimation, small target region identification, and target detection tasks in a single forward propagation, and jointly optimizing the network parameters of the scene semantic perception subunit, the target density adaptation module, the small target bounding box protection subunit, and the detection head during the back propagation process. In each training batch, the corresponding image enhancement strategy is dynamically selected based on the semantic and density characteristics of the current input data, and the model is updated based on the enhanced samples to achieve synergistic optimization of enhancement strategy and detection performance.
[0016] Secondly, this invention provides a target detection system for dynamic and complex scenes, comprising, The system includes a multi-level feature extraction module, a scene semantic perception module, a target density adaptation module, a small target boundary protection module, and a dynamic supervision weighting module. The multi-level feature extraction module is used to encode features of input images or video frames using a hybrid architecture of convolutional neural networks and Transformers, extract multi-scale features that combine local detail information and global semantic information, and generate an enhanced fused feature representation through cross-scale fusion. The scene semantic perception module is used to perform scene semantic parsing on the input data, extract scene feature vectors and perform normalization processing, calculate the semantic similarity between the original image and the candidate enhanced image, and realize adaptive matching between the detection task and scene semantics. The target density adaptation module is used to fuse the area ratio density of the bounding boxes of real targets in the image with the target quantity density to obtain a comprehensive target density, and divide the density into three levels of low, medium and high according to a preset threshold, and dynamically select corresponding image enhancement strategies such as random cropping, hybrid enhancement or local adjustment. The small target boundary protection module is used to filter out small target bounding boxes that meet the scale conditions, calculate their center coordinates, and construct a circular core protection area with the center as the center and a radius of one-quarter of the diagonal length. This area is locked during image enhancement and feature fusion to prevent the small target supervision signal from being weakened. The dynamic supervision weighting module is used to assign differentiated weights to the supervision signals in the classification and localization loss during the model training phase, combining scene semantic matching results, target density level, and small target protection area determination information.
[0017] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the target detection method for dynamic complex scenes as described in the first aspect of the present invention.
[0018] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the target detection method for dynamic complex scenes as described in the first aspect of the present invention.
[0019] The beneficial effects of this invention are as follows: by introducing three collaborative mechanisms—scene semantic perception, target density adaptation, and small target boundary protection—the robustness and accuracy of target detection are improved in dynamic and complex scenes; enhanced samples are selected based on semantic similarity to ensure that the data enhancement is consistent with the semantics of the original scene; the enhancement strategy is dynamically adjusted according to the target density to effectively suppress supervision interference in high-density areas, while constructing a core protection region for small targets to prevent them from being weakened during enhancement and fusion; and by combining multi-level feature fusion and dynamic supervised weighted training, the model can retain the details of small targets while taking into account global semantic understanding, achieving efficient and stable detection in complex scenes such as sparse, dense, and drastically scaled scenes. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of the target detection method for dynamic and complex scenes in Example 1.
[0022] Figure 2 This is a model architecture diagram of the target detection method for dynamic scene perception in Example 1.
[0023] Figure 3 This is an example illustration of the computer vision and intelligent perception task in Example 1. Detailed Implementation
[0024] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0025] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0026] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0027] Example 1, referring to Figure 1 , Figure 2 and Figure 3 This is one embodiment of the present invention, which provides a target detection method for dynamic and complex scenes, including the following steps: S1. Obtain the raw dataset of image and video sequences.
[0028] Furthermore, the original dataset includes multi-source images and video frames from different scenes, lighting conditions, weather conditions, and target density distributions. During the acquisition process, the video sequences are processed by extracting frames at time intervals to generate static image samples with temporal diversity. At the same time, all image data undergo uniform format conversion, resolution normalization, and metadata annotation. The metadata includes timestamps, shooting device parameters, scene category labels, and corresponding real target bounding box annotations, providing basic data support for subsequent semantic parsing, density calculation, and small target protection.
[0029] It should be noted that by collecting and processing diverse image and video frames from multiple sources, the robustness and generalization ability of subsequent analysis models under different conditions can be ensured. Format uniformity, resolution normalization, and metadata annotation provide a solid foundation for accurate data parsing and feature extraction, and help improve the accuracy of tasks such as object detection and scene classification.
[0030] S2. Based on the convolutional neural network and Transformer architecture, extract multi-level features that combine local detail information and global semantic features.
[0031] Furthermore, in the step of extracting multi-level features based on convolutional neural networks and Transformer architecture, the shallow feature maps output by the convolutional neural network and the high-level feature maps output by the Transformer encoder are fused across scales. The fusion process includes aligning the channel dimensions of features at different levels, dynamically adjusting the contribution weights of each level of features during fusion through a learnable attention mechanism, and then injecting high-level semantic information into the shallow features through upsampling and skip connections to generate a fused feature representation that takes into account both local details and global semantics. During the model training phase, the supervision signal in the loss function is weighted based on the scene semantic matching results, target density classification results, and small target protection area determination results of the image. For predicted targets located in images with high semantic consistency, in low-density regions, or within the core protection area of small targets, higher loss weights are assigned to enhance their supervision strength during training, thereby alleviating the problems of high-density interference and small target weakening. The method adopts an end-to-end training approach, simultaneously performing scene semantic parsing, target density estimation, small target region recognition, and target detection tasks in a single forward propagation, and jointly optimizing the network parameters of the scene semantic perception subunit, target density adaptation module, small target bounding box protection subunit, and detection head during the back propagation process; In each training batch, the corresponding image enhancement strategy is dynamically selected based on the semantic and density characteristics of the current input data, and the model is updated based on the enhanced samples to achieve synergistic optimization of enhancement strategy and detection performance.
[0032] It should be noted that fusing shallow and high-level feature maps across scales and dynamically adjusting the contribution weights of features at each level through a learnable attention mechanism can effectively improve the model's ability to understand complex scenes. This fusion strategy not only enhances the model's ability to identify small targets, but also maintains high positioning accuracy and stability in high-density interference environments.
[0033] S3. The core scene semantics of the input data are parsed by the scene semantic perception subunit to achieve adaptive matching between the detection task and the scene semantics.
[0034] Furthermore, pre-trained convolutional neural networks are used to encode image and video data, mining their features and semantic information, thereby enhancing the representation and extraction of corresponding features; Based on the scene semantic guidance module, to eliminate the interference of feature scale differences on similarity calculation, the extracted scene feature vectors are... Perform L2 normalization.
[0035] ; ; For the candidate image set used for enhancement Similarly, scene features are extracted and normalized using L2 normalization. Then cosine similarity was used. This is used to measure the semantic similarity between the original image and the candidate enhanced image.
[0036] ; The closer the value is to 1, the stronger the semantic relationship between the two images.
[0037] It should be noted that using L2 normalization and cosine similarity calculation to measure the semantic correlation between images can effectively reduce misjudgment caused by differences in feature scale. The method improves the accuracy of scene understanding, enabling the model to better adapt to different application scenarios and improve the accuracy of object detection.
[0038] S4. Based on the target density characteristics, the image enhancement strategy and corresponding parameters are dynamically adjusted to reduce the interference of the supervision signal in the high-density area.
[0039] Furthermore, based on the target density adaptation module, an enhancement strategy is formulated by defining the target density and combining it with density grading; Obtain the set of bounding boxes of real objects in the original image, and then determine the density based on area proportion. With target quantity density The weighted fusion yields the comprehensive target density. The expression is: ; ; ; Finally, a low density threshold is set. With high threshold The normalized composite density The image enhancement methods are categorized into three levels: low, medium, and high, corresponding to three different types of methods: random cropping, blending enhancement, and local adjustment. The expression is as follows: ; in, This represents the normalized overall target density, used to measure the density of targets in an image; and These are preset low-density thresholds and high-density thresholds, used to classify density levels; function according to The enhancement method is dynamically selected based on the interval in which it is located.
[0040] It should be noted that by formulating corresponding image enhancement strategies based on target density grading, the target detection effect in different density regions can be optimized in a targeted manner. The method can not only reduce the interference caused by target overlap in high-density regions, but also improve the detection performance of small targets in low-density regions, thereby improving the overall detection accuracy and robustness of the model.
[0041] S5. Protect the non-salient target region by using small target bounding box protection sub-units to prevent the small target supervision signal from being weakened during image enhancement and feature fusion.
[0042] Furthermore, based on the small target boundary protection module, the set of bounding boxes corresponding to the small targets is first filtered out. Then calculate the center coordinates of each small target. ; ; ; ; Considering that the characteristics of small targets are concentrated in the central area, its core protection area is defined as... Center of the circle A circular region with radius (where) (1 / 4 of the diagonal length of the small target), and set the corresponding protection area. The expression is: ; ; in, This represents the set of bounding boxes for the selected small targets; and They represent the first The center coordinates of the bounding boxes of each small target in the horizontal and vertical directions are calculated by taking the midpoints of the left and right boundaries and the top and bottom boundaries of the corresponding bounding boxes. Indicates the first The radius of the core protected area of a small target is equal to one-quarter of its diagonal length; Indicates the center point ( , ( ) is the center and radius is A circular protective area.
[0043] It should be noted that defining the core protection area of small targets and calculating the radius of the protection area in a specific way can effectively protect small targets from being weakened or lost without affecting the detection of other targets. The method is particularly suitable for application fields such as monitoring and autonomous driving that require high attention to small targets, and improves the reliability of the system in complex environments.
[0044] This embodiment also provides a target detection system for dynamic and complex scenes, including: The system includes a multi-level feature extraction module, a scene semantic perception module, a target density adaptation module, a small target boundary protection module, and a dynamic supervision weighting module. The multi-level feature extraction module is used to encode features of input images or video frames using a hybrid architecture of convolutional neural networks and Transformers, extract multi-scale features that combine local detail information and global semantic information, and generate an enhanced fused feature representation through cross-scale fusion. The scene semantic perception module is used to perform scene semantic parsing on the input data, extract scene feature vectors and perform normalization processing, calculate the semantic similarity between the original image and the candidate enhanced image, and realize adaptive matching between the detection task and scene semantics. The target density adaptation module is used to obtain a comprehensive target density by statistically analyzing the area ratio density of the bounding boxes of real targets in the image and the target quantity density. Based on a preset threshold, the density is divided into three levels: low, medium, and high. The module dynamically selects corresponding image enhancement strategies such as random cropping, hybrid enhancement, or local adjustment. The small target boundary protection module is used to filter out small target bounding boxes that meet the scale conditions, calculate their center coordinates, and construct a circular core protection area with the center as the center and a radius of one-quarter of the diagonal length. This area is locked during image enhancement and feature fusion to prevent the small target supervision signal from being weakened. The dynamic supervision weighting module is used to assign differentiated weights to the supervision signals in the classification and localization loss during the model training phase, combining scene semantic matching results, target density level, and small target protection area determination information.
[0045] This embodiment also provides a computer device applicable to target detection methods for dynamic and complex scenes, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the target detection method for dynamic and complex scenes as proposed in the above embodiment.
[0046] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0047] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the target detection method for dynamic and complex scenes as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0048] In summary, this invention improves the robustness and accuracy of target detection in dynamic and complex scenes by introducing three collaborative mechanisms: scene semantic awareness, target density adaptation, and small target boundary protection. It selects enhanced samples based on semantic similarity to ensure that the data enhancement is consistent with the semantics of the original scene. It dynamically adjusts the enhancement strategy according to target density to effectively suppress supervision interference in high-density areas, while constructing a core protection region for small targets to prevent them from being weakened during enhancement and fusion. Furthermore, by combining multi-level feature fusion and dynamic supervised weighted training, the model retains details of small targets while also considering global semantic understanding, achieving efficient and stable detection in complex scenes such as sparse, dense, and drastically scaled scenes.
[0049] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A target detection method for dynamic and complex scenes, characterized in that: include: Obtain the raw dataset of image and video sequences; Based on convolutional neural networks and the Transformer architecture, multi-level features that combine local detail information and global semantic features are extracted. By parsing the core scene semantics of the input data through the scene semantic perception subunit, adaptive matching between the detection task and the scene semantics can be achieved. Based on the target density characteristics, the image enhancement strategy and corresponding parameters are dynamically adjusted to reduce the interference of the supervision signal in high-density areas; By using small target bounding boxes to protect sub-units, non-salient target regions are locked, preventing the small target supervision signal from being weakened during image enhancement and feature fusion.
2. The target detection method for dynamic and complex scenes as described in claim 1, characterized in that: The process of parsing the core scene semantics of the input data through the scene semantic perception subunit to achieve adaptive matching between the detection task and the scene semantics includes: Pre-trained convolutional neural networks are used to encode image and video data, and their features and semantic information are mined, thereby enhancing the representation and extraction of corresponding features; Based on the scene semantic guidance module, to eliminate the interference of feature scale differences on similarity calculation, the extracted scene feature vectors are... Perform L2 normalization; ; ; For the candidate image set used for enhancement Similarly, scene features are extracted and normalized using L2 normalization. Then cosine similarity was used. To measure the semantic similarity between the original image and the candidate enhanced image; ; The closer the value is to 1, the stronger the semantic relationship between the two images.
3. The target detection method for dynamic and complex scenes as described in claim 2, characterized in that: The method of dynamically adjusting the image enhancement strategy and corresponding parameters based on the target density characteristics to reduce interference from the supervision signal in high-density areas includes: Based on the target density adaptation module, an enhancement strategy is formulated by defining the target density and combining it with density grading. Obtain the set of bounding boxes of real objects in the original image, and then determine the density based on area proportion. With target quantity density The weighted fusion yields the comprehensive target density. The expression is: ; ; ; Finally, a low density threshold is set. With high threshold The normalized composite density The image enhancement methods are categorized into three levels: low, medium, and high, corresponding to three different types of methods: random cropping, blending enhancement, and local adjustment. The expression is as follows: ; in, This represents the normalized overall target density, used to measure the density of targets in an image; and These are preset low-density thresholds and high-density thresholds, used to classify density levels; function according to The enhancement method is dynamically selected based on the interval in which it is located.
4. The target detection method for dynamic and complex scenes as described in claim 3, characterized in that: The method of locking non-salient target regions using small target bounding box protection sub-units to prevent the small target supervision signal from being weakened during image enhancement and feature fusion includes: Based on the small target boundary protection module, the set of bounding boxes corresponding to the small targets is first filtered out. Then calculate the center coordinates of each small target. ; ; ; ; Considering that the characteristics of small targets are concentrated in the central area, their core protection area is defined as... Center of the circle A circular region with radius (where) (1 / 4 of the diagonal length of the small target), and set the corresponding protection area. The expression is: ; ; in, This represents the set of bounding boxes for the selected small targets; and They represent the first The center coordinates of the bounding boxes of each small target in the horizontal and vertical directions are calculated by the midpoints of the left and right boundaries and the top and bottom boundaries of the corresponding bounding boxes. Indicates the first The radius of the core protected area of a small target is equal to one-quarter of its diagonal length; Indicates the center point ( , ( ) is the center and radius is A circular protective area.
5. The target detection method for dynamic and complex scenes as described in claim 4, characterized in that: In the step of extracting multi-level features based on convolutional neural networks and Transformer architecture, the shallow feature map output by the convolutional neural network and the high-level feature map output by the Transformer encoder are fused across scales. The fusion process includes aligning the channel dimensions of features at different levels, dynamically adjusting the contribution weight of each level of features during fusion through a learnable attention mechanism, and then injecting high-level semantic information into the shallow features through upsampling and skip connections to generate a fused feature representation that takes into account both local details and global semantics.
6. The target detection method for dynamic and complex scenes as described in claim 5, characterized in that: During the model training phase, the supervision signal in the loss function is weighted based on the scene semantic matching results, target density classification results, and small target protection area determination results of the image. For predicted targets located in images with high semantic consistency, in low-density regions, or within the core protection area of small targets, higher loss weights are assigned to enhance their supervision during training, thereby mitigating the problems of high-density interference and small target weakening.
7. The target detection method for dynamic and complex scenes as described in claim 6, characterized in that: The method adopts an end-to-end training approach, simultaneously performing scene semantic parsing, target density estimation, small target region recognition, and target detection tasks in a single forward propagation, and jointly optimizing the network parameters of the scene semantic perception subunit, target density adaptation module, small target bounding box protection subunit, and detection head during the back propagation process. In each training batch, the corresponding image enhancement strategy is dynamically selected based on the semantic and density characteristics of the current input data, and the model is updated based on the enhanced samples to achieve synergistic optimization of enhancement strategy and detection performance.
8. A target detection system for dynamic and complex scenes, based on the target detection method for dynamic and complex scenes according to any one of claims 1 to 7, characterized in that: include: The system includes a multi-level feature extraction module, a scene semantic perception module, a target density adaptation module, a small target boundary protection module, and a dynamic supervision weighting module. The multi-level feature extraction module is used to encode features of input images or video frames using a hybrid architecture of convolutional neural networks and Transformers, extract multi-scale features that combine local detail information and global semantic information, and generate an enhanced fused feature representation through cross-scale fusion. The scene semantic perception module is used to perform scene semantic parsing on the input data, extract scene feature vectors and perform normalization processing, calculate the semantic similarity between the original image and the candidate enhanced image, and realize adaptive matching between the detection task and scene semantics. The target density adaptation module is used to fuse the area ratio density of the bounding boxes of real targets in the image with the target quantity density to obtain a comprehensive target density, and divide the density into three levels of low, medium and high according to a preset threshold, and dynamically select corresponding image enhancement strategies such as random cropping, hybrid enhancement or local adjustment. The small target boundary protection module is used to filter out small target bounding boxes that meet the scale conditions, calculate their center coordinates, and construct a circular core protection area with the center as the center and a radius of one-quarter of the diagonal length. This area is locked during image enhancement and feature fusion to prevent the small target supervision signal from being weakened. The dynamic supervision weighting module is used to assign differentiated weights to the supervision signals in the classification and localization loss during the model training phase, combining scene semantic matching results, target density level, and small target protection area determination information.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the target detection method for dynamic complex scenes as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the target detection method for dynamic complex scenes as described in any one of claims 1 to 7.