Night target detection method and system based on multi-auxiliary task feature enhancement

By introducing a multi-auxiliary task feature enhancement method, a target detection network was constructed, which solved the problem of low detection accuracy in nighttime environments, improved detection performance and context awareness, and achieved more robust detection results.

CN120997554APending Publication Date: 2025-11-21YANGTZE DELTA REGION INST OF UNIV OF ELECTRONICS SCI & TECH OF CHINE (HUZHOU)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510867784.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing target detection algorithms have low detection accuracy in nighttime environments, and existing detection models lack the ability to model and utilize contextual information, which limits the improvement of detection performance.

Method used

A multi-aid task feature enhancement method is adopted, which introduces target mask prediction, target category prediction and target co-occurrence relationship prediction branches, and combines low-pass filtering and multi-scale feature fusion to construct a target detection network. In the training stage, a multi-task joint optimization mechanism is introduced to enhance feature learning and context awareness capabilities.

Benefits of technology

It significantly improves the accuracy and robustness of target detection at night, especially the detection performance of small targets and complex scenes, and achieves simultaneous improvement in detection accuracy and model interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997554A_ABST
    Figure CN120997554A_ABST
Patent Text Reader

Abstract

The invention discloses a night target detection method and system based on multi-auxiliary task feature enhancement, and the method comprises the steps: introducing a context-related auxiliary learning task into a trunk of a target detection network, constructing loss, and carrying out the prediction of a target mask prediction branch, a target category prediction branch and a target symbiotic relationship prediction branch, performing feature representation optimization on a main task in a synergistic manner, and strengthening context sensing and semantic relationship modeling between targets in a training stage; and based on the night image and the annotation thereof, weight fusion is carried out through a loss function of backbone network target detection and loss of the auxiliary learning task, and a target detection network is trained for detection of the night image. According to the invention, by designing the pluggable auxiliary learning module and the low-pass filtering feature noise reduction module, the feature learning ability and detection performance of the detection network under the condition of low visibility at night are significantly improved, and the problems of insufficient target detection precision and insufficient context information utilization in the existing night scene are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of image processing, and particularly relates to a night target detection method and system based on multi-assistant task feature enhancement. BACKGROUND

[0002] When target detection is performed in a real-world night scene, due to various objective factors such as extreme lack of light, complex background noise, and decreased imaging quality, the collected images often have problems such as low contrast, serious noise interference, and blurred feature details. These problems directly lead to a significant decrease in the detection accuracy of traditional target detection algorithms in night environments, and the existing detection models lack the ability to model and utilize context information when facing night images, further limiting the improvement of detection performance. Therefore, under the condition of night low-visibility, improving the image feature learning ability and context perception ability has become a key research direction to improve detection effect.

[0003] At present, many studies are devoted to improving the performance of target detection in night scenes through image enhancement and feature optimization. One common method is to introduce low-light image enhancement technology to preprocess the image before detection to improve visibility and detail clarity. By enhancing night images for target detection, certain effects can be achieved, however, such methods mainly focus on human visual perception optimization, and the enhanced images may not necessarily effectively improve the feature learning and detection performance of the detection network, because the visual characteristics focused on by human perception and the discriminative features required by the target detection network are not completely consistent. Another approach is to use domain adaptation technology, which alleviates the data distribution shift between day and night scenes through adversarial learning or image-to-image conversion, thereby improving the robustness of night detection. By aligning the domain features and candidate box features in layers, the distribution difference between the source domain and the target domain is effectively reduced, however, domain adaptation methods usually rely on a large amount of source domain data (such as daytime images) for training, which is limited by the conditions of data collection and adaptation in practical applications. SUMMARY

[0004] To solve the problems of the prior art and achieve the purpose of improving the feature learning ability and detection performance of the detection network under night low-visibility conditions, the present application adopts the following technical solution:

[0005] The night target detection method based on multi-assistant task feature enhancement comprises the following steps:

[0006] Step S1: Obtain night images and their label box information, and perform preprocessing to obtain a training data set;

[0007] Step S2: constructing a target detection network, and introducing a context-related auxiliary learning task in the backbone network thereof, respectively from a target mask prediction branch, a target category prediction branch and a target co-occurrence relationship prediction branch, to synergistically act on the feature representation optimization of the main task, and to strengthen the context perception and semantic relationship modeling between targets in the training stage; the target mask prediction branch takes the target label corresponding region mask in the image as the output of the target mask prediction branch, in the training stage, the rectangular region mask automatically generated according to the target detection label frame is taken as the supervision label, and the loss function is used for optimization; the target category prediction branch takes the target category attribute as the output of the category prediction branch, in the training stage, the loss function is used for supervised learning of classification; the target co-occurrence relationship prediction branch takes the co-occurrence matrix constructed by any two target co-occurrence relationships in the image as the output of the target co-occurrence relationship prediction branch, in the training stage, the loss function is used for optimization of the co-occurrence relationship matrix;

[0008] Step S3: in order to realize effective synergy between the main detection task and each auxiliary learning task, the application introduces a unified multi-task joint optimization mechanism in the training stage, the loss function of the target detection branch of the backbone network is weighted and fused with the loss functions of the target mask prediction branch, the target category prediction branch and the target co-occurrence relationship prediction branch, and the overall optimization target is constructed; based on the differentiated weight distribution, the interference of the auxiliary task on the training dominance of the main task is effectively avoided, and at the same time, the model can improve the target detection performance while obtaining richer context expression ability, so as to realize more stable detection effect in complex scenes such as night or low illumination;

[0009] Step S4: in the inference stage, the night image to be detected is obtained, and the final target category and position detection result is output by the trained target detection.

[0010] Further, in the step S2, the target mask prediction branch generates a mask label from a rectangular region corresponding to a real target label frame in the image, combines a multi-scale feature after low-pass filtering processing, obtains a single-channel mask output with the same size as the original image through a multi-scale fusion module and an up-sampling operation, and generates a target existence probability of each pixel after Sigmoid activation; the target category prediction branch takes a target detection frame (Region of Interest) region as input, determines the category of each target through a lightweight convolution structure, takes a target category attribute as a supervision signal for training, and generates a category prediction probability; the target co-occurrence relationship prediction branch is used to model the co-occurrence relationship between any two targets in the image, a co-occurrence matrix between target pairs is constructed according to the labeled data, the input is a pair of semantic features of all targets, and the output is the probability of co-occurrence between each pair of targets.

[0011] Furthermore, in step S2, the target mask prediction branch aims to characterize the spatial location of the target in the image at the pixel level through an independent mask prediction branch, enhancing the model's ability to model contextual spatial relationships. This is particularly suitable for complex scenes with poor visibility, such as low light conditions. Multi-scale features are acquired and input into the Multi-Scale Fusion Module (MSFM). Information from different semantic levels is fused through operations such as concatenation and convolutional integration to improve contextual awareness. The fused features are further refined through double convolution, and bilinear interpolation is used to upsample the feature map to the same size as the original image, generating a single-channel mask prediction map to represent the probability distribution of each pixel belonging to the target region. The output is normalized using the Sigmoid activation function to obtain normalized probability values ​​as the mask prediction result. During the training phase, the rectangular region mask automatically generated based on the target detection bounding box is used as a supervision label, and optimization is performed using a loss function.

[0012] During the training phase, Focal Loss is used as the loss function for optimization, and its form is as follows:

[0013] L mask =-α(1-p t ) γ log(p t )

[0014] Where, p t This indicates the consistency between the predicted value and the true label. By setting hyperparameters such as α=0.8 and γ=2, the imbalance between positive and negative samples is effectively alleviated, and the system focuses on difficult-to-predict sample regions, thereby significantly improving the accuracy and robustness of target mask prediction. During the training phase, this module guides the learning of core features to achieve stronger spatial structure awareness, and during the inference phase, it can be pruned to ensure the overall efficiency of the detection system.

[0015] Further, the target class prediction branch in the step S2, this step realizes the fine determination of the target class in the detection frame in the image by introducing an independent target class prediction branch, further improves the modeling ability of the model to semantic information, first, according to the label frame coordinates, the multi-scale feature maps output by the feature pyramid network (FPN) of the backbone network are regionally cropped, and the region of interest pooling ROIPooling operation is adopted to uniformly adjust the cropped features to fixed multiple sizes (such as 32×32, 16×16 or 8×8), so as to eliminate the difference of different scale features in spatial resolution, lay a foundation for subsequent feature fusion and classification processing, then, the ROI features under each scale are fused to form a unified semantic representation, and input to the multi-layer perceptron (Multi-Layer Perceptron, MLP) composed of two fully connected layers (Fully Connected Layers), the feature transformation and discrimination output are carried out through the nonlinear activation function, and finally the class prediction score corresponding to each detection frame is generated, in the training stage, the loss function is used for supervised learning of classification.

[0016] In the training stage, the cross-entropy loss function (Cross-Entropy Loss) is used for supervised learning of classification, which is defined as:

[0017]

[0018] Wherein, N represents the number of training samples, C represents the total number of classes, z i represents the original output score (logits) of the i-th class, y i is the real label (taking value 0 or 1), the loss function effectively improves the classification accuracy by maximizing the prediction probability of the model to the real class, and strengthens the discrimination ability of the model to the target class in the complex environment. This module can also be cropped in the inference stage, without affecting the efficiency and deployment lightness of the backbone detection network, while providing accurate semantic supervision for the training stage, improving the context understanding ability and multi-task collaborative learning effect of the model.

[0019] Further, the target co-occurrence prediction branch in step S2 is introduced to enhance the model's ability to model the semantic association between targets in the scene. This branch explicitly captures the co-occurrence patterns between different targets in the image, especially suitable for scenes with scarce semantic cues in low-light environments. The module takes the multi-scale features processed by the low-pass filter module (LPFM) as input. First, it integrates information at different semantic levels through the multi-scale fusion module (MSFM). Then, it extracts the spatial context relationship between targets through convolution layers. The fused features are input into a multi-layer perceptron (MLP) composed of two fully connected layers to generate the target co-occurrence matrix A relation , which is a symmetric N x N structure, where N represents the number of detected target instances in the image. Each element of the matrix represents the co-occurrence probability between a pair of targets. Considering the symmetry of the matrix, only the lower triangular part is supervised to reduce computational redundancy. During the training phase, the co-occurrence matrix is optimized using a loss function.

[0020] During training, the co-occurrence matrix is optimized using a binary cross-entropy loss function (Binary Cross-Entropy Loss). The loss function is as follows:

[0021]

[0022] where y i represents the true label of whether the i-th pair of objects co-occurs (0 or 1), z i represents the unnormalized co-occurrence score output by the MLP, and σ(·) represents the Sigmoid activation function. By minimizing the loss function, the model can learn the co-occurrence dependency between objects and improve the target association reasoning ability in complex scenes.

[0023] Further, the multi-scale features output by the backbone network are low-pass filtered and denoised in step S2 to suppress the interference of high-frequency noise on subsequent processing. Through average pooling operations, the feature maps output by multiple levels of the backbone network are smoothed to reduce the influence of local activation anomalies and background noise. After concatenating the pooling results along the channel dimension, multi-scale information fusion is performed through convolution operations to integrate multi-scale information and improve expression ability. To maintain information integrity and optimize gradient propagation paths, residual connection mechanisms are introduced in the pooling branches at each scale and the overall output path to enhance the stability and robustness of feature representation.

[0024] Further, the noise reduction processing of the step S2 is used for the pretreatment stage after the output of the backbone network and before the fusion of the feature pyramid, and is also used for forming two-stage noise reduction structures before and after the fusion of the feature pyramid, so as to provide more clean and semantic clear feature input for subsequent mask prediction or detection head.

[0025] Further, in the step S2, the features relied on by each auxiliary learning task are subjected to low-pass filtering noise reduction processing, which further improves the stability and robustness of the context learning, and the three auxiliary learning tasks are embedded into the backbone network or the detection head as a modular structure.

[0026] Further, in the step S4, in the inference stage, the auxiliary learning task branch of the trained target detection network is pruned to maintain the inference efficiency and lightweight characteristics of the overall system.

[0027] The total loss function expression is as follows:

[0028] L=w1*L mask +w2*L c +w3*L Co_Occ +L det

[0029] Wherein, L det is the detection loss of the main detection branch, L mask , L Co_Occ correspond to the loss terms of the mask prediction, class prediction and co-occurrence relationship prediction branches respectively; w1, w2, w3 are the weighting coefficients of the auxiliary task loss, used to adjust the contribution proportion of different tasks in the training process.

[0030] The night target detection system based on multi-assistant task feature enhancement comprises a data acquisition module, a target detection network module and a loss calculation module, the target detection network is constructed according to the night target detection method based on multi-assistant task feature enhancement, and the target detection network is trained through loss calculation based on the acquired training data, and the trained target detection network is used for night target detection.

[0031] The advantages and beneficial effects of the present application are as follows:

[0032] The present application proposes a multi-task auxiliary module integrating mask prediction, category prediction and co-occurrence relationship prediction based on a typical detection network, combines low-pass filtering and multi-scale feature fusion mechanism, significantly enhances the contextual relevance and robustness of detection features, and effectively improves the target detection performance in small target and complex scene. In addition, the present application designs a mask prediction branch to accurately depict the target region boundary and improve the detection positioning accuracy; designs a category prediction branch to optimize the category recognition accuracy through unified scale feature cropping and classification enhancement; designs a co-occurrence relationship prediction branch to model the semantic association between objects and further improve the detection reasoning ability in complex scenes. Through end-to-end joint optimization training, the method of the present application ensures the reasoning speed while realizing the synchronous improvement of detection accuracy and model explainability, which can effectively solve the problems of insufficient semantic association modeling, small target detection, occlusion interference and the like in the existing target detection methods. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 is a flowchart of the method in the embodiment of the present application.

[0034] Figure 2 is a night target detection effect diagram processed by using the existing YOLOX.

[0035] Figure 3 is a night target detection effect diagram processed by using the method in the embodiment of the present application.

[0036] Figure 4 is a structural schematic diagram of the system in the embodiment of the present application. DETAILED DESCRIPTION

[0037] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application.

[0038] As shown in Figure 1 , the night target detection method based on multi-assistant task feature enhancement includes the following steps:

[0039] Step S1: Obtain night images and their bounding box information, and perform preprocessing to obtain a training data set;

[0040] Specifically, download the RGB mode color night images and their corresponding bounding box information from the public night image data set (such as ExDark). Perform preprocessing operations on the images, including uniformly scaling the image size to 640x640 pixels, performing random horizontal flipping, scale scaling, color jittering and other data enhancement processing to improve the robustness and generalization ability of the model. The processed image data is input to the subsequent deep neural network in tensor format (1x3x640x640).

[0041] Step S2: Construct an object detection network and introduce context-dependent auxiliary learning tasks into its backbone network. These tasks work synergistically to optimize the feature representation of the main task from the target mask prediction branch, target category prediction branch, and target co-occurrence relationship prediction branch, respectively. During the training phase, context awareness and semantic relationship modeling between targets are strengthened. The target mask prediction branch uses the mask of the region corresponding to the target annotation in the image as the target mask prediction branch output. During the training phase, the rectangular region mask automatically generated by the target detection annotation box is used as the supervision label, and the loss function is used for optimization. The target category prediction branch uses the target category attribute as the category prediction branch output. During the training phase, the loss function is used for supervised learning of classification. The target co-occurrence relationship prediction branch constructs a co-occurrence matrix based on the co-occurrence relationship between any two targets in the image as the target co-occurrence relationship prediction branch output. During the training phase, the loss function is used to optimize the co-occurrence relationship matrix.

[0042] Specifically, this step involves introducing a low-pass filtering mechanism into the target detection backbone network. Figure 1 The LPFM module in the backbone network denoises its output multi-scale feature maps to suppress high-frequency noise interference in subsequent detection tasks. Specifically, it first selects feature maps from several typical layers (such as C3, C4, and C5) in the backbone network and applies average pooling to achieve local smoothing, reducing the impact of local activation anomalies and background noise. After pooling denoising, the feature maps at each scale are concatenated along the channel dimension and then fused through a convolutional operation to integrate multi-scale information and improve expressive power. To maintain information integrity and optimize gradient propagation paths, residual connection mechanisms are introduced in the pooling branches at each scale to enhance the stability and robustness of feature representation. This denoising module can be used in the preprocessing stage after the backbone network output and before feature pyramid fusion, or it can be repeatedly applied after pyramid fusion (FPN) to form a two-stage denoising structure, providing cleaner and semantically clear feature inputs for subsequent mask prediction or detection heads.

[0043] To enhance the model's ability to understand the context semantics in complex environments such as low light, this step introduces three context-related auxiliary learning task modules, namely the target mask prediction branch, the target class prediction branch, and the target co-occurrence relationship prediction branch, which work together to optimize the feature representation of the main task. Specifically, the target mask prediction branch generates a mask label based on the rectangular region corresponding to the target's real annotation box in the image. Combined with the multi-scale features processed by the low-pass filter, the multi-scale fusion module and the up-sampling operation are used to obtain a single-channel mask output with the same size as the original image. After Sigmoid activation, the target existence probability of each pixel is generated. The class prediction branch takes the target detection box (Region of Interest) region as input and uses a lightweight convolution structure to determine the class of each target. The target class attribute is used as a supervision signal for training. The co-occurrence relationship prediction branch is used to model the co-occurrence relationship between any two targets in the image. According to the labeled data, a co-occurrence matrix between target pairs is constructed. The input is the semantic feature pair of all targets, and the output is the probability of whether each pair of targets co-occurs. The three auxiliary tasks mentioned above can be easily embedded into the backbone network or detection head as a modular structure and jointly optimized with the main task during the training phase, effectively strengthening the context perception and semantic relationship modeling ability between targets. In the inference stage, these auxiliary task modules can be pruned to maintain the inference efficiency and lightweight characteristics of the overall system. In addition, the features relied on by each auxiliary task are processed by the low-pass filter module (LPFM) for noise reduction, further improving the stability and robustness of context learning.

[0044] Target Mask Prediction Branch. This step aims to characterize the spatial location of targets in the image at the pixel level through an independent mask prediction branch, enhancing the model's ability to model contextual spatial relationships, especially suitable for complex scenes with poor visibility, such as low light. First, the input is multi-scale features processed by the Low-Pass Filter Module (LPFM). Noise reduction is applied before and after the Feature Pyramid Network (FPN) to ensure stronger stability and discriminative power of the multi-scale features. Subsequently, these features are input to the Multi-Scale Fusion Module (MSFM), which fuses information from different semantic levels through operations such as concatenation and convolution, improving context awareness. The fused features are further refined through two convolutional layers, and bilinear interpolation is used to upsample the feature map to the same size as the original image, generating a single-channel mask prediction map representing the probability distribution of each pixel belonging to the target region. Finally, the output is normalized using the Sigmoid activation function to obtain normalized probability values ​​as the mask prediction results. During training, a rectangular region mask automatically generated from the object detection bounding boxes is used as the supervision label, and Focal Loss is used as the loss function for optimization, which takes the following form:

[0045] L mask =-α(1-p t ) γ log(p t )

[0046] Where, p t This indicates the consistency between the predicted value and the true label. By setting hyperparameters such as α=0.8 and γ=2, the imbalance between positive and negative samples is effectively alleviated, and the system focuses on difficult-to-predict sample regions, thereby significantly improving the accuracy and robustness of target mask prediction. During the training phase, this module guides the learning of core features to achieve stronger spatial structure awareness, and during the inference phase, it can be pruned to ensure the overall efficiency of the detection system.

[0047] Target class prediction module. This step realizes the fine determination of the target class in the detection box in the image by introducing an independent target class prediction branch, further improving the modeling ability of the model for semantic information. First, according to the annotation box coordinates, the multi-scale feature maps output by the feature pyramid network (FPN) are regionally cropped, and the cropped features are uniformly adjusted to a fixed size (such as 32x32, 16x16 or 8x8) by using the ROIPooling operation to eliminate the differences in spatial resolution of different scale features, laying a foundation for subsequent feature fusion and classification processing. Then, the ROI features at each scale are fused to form a unified semantic representation and input into a multi-layer perceptron (MLP) composed of two fully connected layers (Fully Connected Layers), which performs feature transformation and discriminant output through a nonlinear activation function, and finally generates the class prediction score corresponding to each detection box. In the training stage, the cross-entropy loss function (Cross-Entropy Loss) is used to supervise the learning of the classification module, which is defined as:

[0048]

[0049] where N is the number of training samples, C is the total number of classes, z i is the original output score (logits) of the i-th class, y i is the true label (taking value 0 or 1). This loss function maximizes the model's prediction probability for the true class, effectively improving the classification accuracy and strengthening the model's ability to distinguish target classes in complex environments. This module can also be cropped in the inference stage without affecting the efficiency and deployment of the main detection network, while providing accurate semantic supervision for the training stage and improving the model's context understanding ability and multi-task collaborative learning effect.

[0050] Target symbiotic relationship prediction module. To enhance the model's ability to model the semantic relationship between targets in the scene, this step introduces a target symbiotic relationship prediction branch to explicitly capture the co-occurrence patterns between different targets in the image, especially suitable for scenes with scarce semantic clues in night or low-light environments. This module takes the multi-scale features processed by the low-pass filter module (Low-Pass Filter Module, LPFM) as input, first integrates information at different semantic levels through the multi-scale fusion module (Multi-Scale Fusion Module, MSFM), and then extracts the spatial context relationship between targets through convolution layers. Then, the fused features are input into a multi-layer perceptron (Multi-Layer Perceptron, MLP) composed of two fully connected layers to generate the target symbiotic relationship matrix A relationThe matrix is a symmetric N x N structure, where N represents the number of target instances detected in the image, and each element of the matrix represents the co-occurrence probability between a pair of targets. Considering the symmetry of the matrix, only the lower triangular part is supervised to reduce computational redundancy. The co-occurrence matrix is optimized during training using a binary cross-entropy loss function, which has the form:

[0051]

[0052] where y i is the true label of whether the i-th pair of objects co-occurs (0 or 1), z i is the unnormalized co-occurrence score output by the MLP, and sigma (·) is the Sigmoid activation function. By minimizing this loss function, the model can learn the co-occurrence dependency between objects and improve the target association reasoning ability in complex scenes.

[0053] Step S3: To achieve effective collaboration between the main detection task and the auxiliary learning tasks, the present application introduces a unified multi-task joint optimization mechanism in the training phase, which weights and fuses the loss functions of the main target detection branch and the loss functions of the three auxiliary task branches of mask prediction, class prediction and object co-occurrence relationship prediction, to construct the overall optimization target.

[0054] Specifically, the total loss function expression is as follows:

[0055] L = w1*L mask + w2*L c + w3*L Co_Occ + L det

[0056] where L det is the detection loss of the main detection branch, L mask , L Co_Occ are the loss terms of the mask prediction, class prediction and co-occurrence relationship prediction branches, respectively; w1, w2, w3 are the weighting coefficients of the auxiliary task losses, used to adjust the contribution proportion of different tasks in the training process. To ensure the optimal performance of the main task and moderately improve the supplementary role of the auxiliary tasks on the context features, w1 = 25, w2 = 5, w3 = 5 are set empirically in the experiment. This differentiated weight allocation method effectively avoids the interference of auxiliary tasks on the training dominance of the main task, while ensuring that the model can improve the target detection performance while obtaining richer context expression ability, thereby achieving more robust detection results in complex scenes such as night or low light.

[0057] Step S4: In the reasoning (inference) stage, in order to ensure the detection speed and efficiency, only the main detection branch is reserved, all auxiliary branches are discarded, and the final target class and position detection result is output.

[0058] The test results are shown in Figure 2 , Figure 3 As can be clearly seen from the figure, the multi-task auxiliary learning method can enhance the perception ability of the model to the object and reduce the interference of other irrelevant objects.

[0059] As shown in Figure 4 , the night target detection system based on multi-assistant task feature enhancement includes a data acquisition module, a target detection network module, and a loss calculation module. According to the night target detection method based on multi-assistant task feature enhancement, the target detection network is constructed, and based on the acquired training data, the target detection network is trained through loss calculation. The trained target detection network is used for night target detection.

[0060] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A night target detection method based on multi-assistant task feature enhancement, characterized in that The method comprises the following steps: Step S1: obtaining a night image and its label information, and performing preprocessing to obtain a training data set; Step S2: constructing a target detection network, introducing a context-related auxiliary learning task into the main network of the target detection network, and respectively optimizing the feature representation of the main task from a target mask prediction branch, a target category prediction branch and a target co-occurrence relationship prediction branch to strengthen the modeling of the context perception and the semantic relationship between targets in the training stage; The target mask prediction branch takes the target label corresponding region mask in the image as the output of the target mask prediction branch, and in the training stage, the region mask automatically generated according to the target detection label is taken as the supervision label, and the loss function is used for optimization. The target category prediction branch takes the target category attribute as the output of the category prediction branch, and in the training stage, the loss function is used for supervised learning of classification. The target co-occurrence relationship prediction branch takes the co-occurrence matrix constructed by the co-occurrence relationship between any two targets in the image as the output of the target co-occurrence relationship prediction branch, and in the training stage, the loss function is used for optimization of the co-occurrence relationship matrix. Step S3: weighting and fusing the loss functions of the main network target detection branch, the target mask prediction branch, the target category prediction branch and the target co-occurrence relationship prediction branch to construct an overall optimization target; Step S4: in the inference stage, obtaining a night image to be detected, and outputting the final target category and position detection result through the trained target detection.

2. The method of claim 1, wherein the method of night-time target detection based on multi-auxiliary task feature enhancement is characterized by: In step S2, the target mask prediction branch generates a mask label corresponding to the region labeled by the target in the image, combines multi-scale features, and obtains a single-channel mask output with the same size as the original image through a multi-scale fusion module and an up-sampling operation, and generates a target existence probability of each pixel after activation; The target category prediction branch takes the target detection region as input, determines the category of each target through a lightweight convolution structure, takes the target category attribute as a supervision signal for training, and generates a category prediction probability; the target co-occurrence relationship prediction branch is used to model the co-occurrence relationship between any two targets in the image, and a co-occurrence matrix between target pairs is constructed according to the labeled data, the input is a pair of semantic features of all targets, and the output is the probability of co-occurrence between each pair of targets. 3.The multi-task feature augmentation based night-time target detection method of claim 2, wherein: In step S2, the target mask prediction branch obtains multi-scale features and inputs them into a multi-scale feature fusion module to fuse information from different semantic levels. The fused features are further refined through double-layer convolution, and are up-sampled to the same size as the original image through bilinear interpolation to generate a single-channel mask prediction map representing the probability distribution of each pixel belonging to a target region. The normalized probability value is obtained through an activation function to obtain the mask prediction result. In the training stage, the region mask automatically generated according to the target detection label is taken as the supervision label, and the loss function is used for optimization.

4. The method of claim 2, wherein the method further comprises: The target category prediction branch in the step S2 performs region cropping on the multi-scale feature maps output by the feature pyramid network of the backbone network according to the label box coordinates, and adopts a region of interest pooling operation to uniformly adjust the cropped features to a fixed number of sizes, fuses the region of interest features at each scale to form a unified semantic representation, and inputs the unified semantic representation into a multi-layer perceptron to perform feature transformation and discriminant output through a nonlinear activation function, thereby generating a category prediction score corresponding to each detection box. In the training stage, a loss function is used to supervise the classification learning.

5. The method of claim 2, wherein the method further comprises: The target co-occurrence relationship prediction branch in the step S2 integrates information of different semantic levels through a multi-scale feature fusion module, and then extracts spatial context relationships between targets through a convolution layer. The fused features are input into a multi-layer perceptron to generate a target co-occurrence relationship matrix. The matrix is a symmetric N×N structure, where N represents the number of detected target instances in the image, and each element of the matrix represents the co-occurrence probability between a target pair. Only the lower triangular part is supervised learning. In the training stage, a loss function is used to optimize the co-occurrence relationship matrix.

6. The method of claim 1, wherein the method further comprises: In the step S2, the multi-scale features output by the backbone network are denoised. An average pooling operation is used to smooth the feature maps output by multiple levels of the backbone network. After the channel dimension of each pooling result is spliced, a convolution operation is used to fuse the multi-scale information, and a residual connection mechanism is introduced in each scale of the pooling branch and the overall output path.

7. The method of claim 1, wherein the method further comprises: The denoising processing in the step S2 is used not only in the preprocessing stage before the feature pyramid fusion but also after the feature pyramid fusion. 8.The multi-task feature augmentation based night-time target detection method of claim 1, wherein: In the step S2, the features relied on by each auxiliary learning task are subjected to denoising processing. The auxiliary learning task is embedded into the backbone network or the detection head as a modular structure. 9.The multi-task feature augmentation based night-time target detection method of claim 1, wherein: In the step S4, the trained target detection network is pruned for the auxiliary learning task branch in the inference stage.

10. A night target detection system based on multi-assistant task feature enhancement, comprising a data acquisition module, a target detection network module, and a loss calculation module, characterized in that: The multi-auxiliary task feature enhanced night target detection method according to any one of claims 1 to 9 constructs a target detection network, and trains the target detection network based on the obtained training data through loss calculation. The trained target detection network is used for night target detection.