Multi-task interpretation method and device for infrared small target, equipment and medium
By constructing infrared visual language training samples and fine-tuning visual instructions, global semantics and local spatial features are extracted and fused, solving the problems of generalization and insufficient semantic understanding of infrared small target detection methods in global scenarios, and improving multi-task interpretation capabilities.
Patent Information
- Application Number
- CN202611539569.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-27
AI Technical Summary
Existing infrared small target detection methods suffer from several problems in global scenarios, including insufficient semantic understanding of single visual features, weak cross-platform and cross-band generalization ability, difficulty in directly adapting general visual language models to infrared small targets, and difficulty in coordinating semantic information with pixel-level spatial details.
Infrared visual language training samples are constructed, and the pre-trained visual language model is fine-tuned with infrared visual commands. Global semantic features and local spatial features are extracted, and multi-scale features are generated through bidirectional interactive fusion. The results of infrared small target dense prediction and language interpretation are output.
It improves the model generalization ability and comprehensive application value of infrared small target detection, reduces the risk of false detection and false negative detection in complex backgrounds, improves the accuracy of detection, segmentation and other tasks, and supports multi-task interpretation capabilities.
Smart Images

Figure CN123182033A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent infrared image sensing technology, and in particular to a multi-task interpretation method, apparatus, device, and medium for small infrared targets. Background Technology
[0002] With the rapid development of infrared imaging technology, deep learning, and visual language models, infrared small target detection is gradually expanding to a multi-task integrated interpretation direction, including detection, segmentation, visual localization, and image description. Existing methods mostly rely on convolutional neural networks or visual Transformers to extract image features, which can achieve good results in specific scenarios. However, they usually follow the paradigm of "one algorithm, one set of parameters, adapted to one infrared scenario." When facing all-domain scenarios such as land-based, air-based, space-based, and sea-based systems, as well as different bands, resolutions, and imaging systems, their generalization ability is still insufficient. The existing technologies have the following main drawbacks: (1) Single visual models are easily affected by complex backgrounds and it is difficult to distinguish real small targets from background clutter from a semantic level; (2) Existing methods are mostly trained on fixed datasets and it is difficult to form a unified interpretation framework when facing different observation platforms and imaging systems; (3) Infrared small targets are easily submerged by background information in the global modeling of the visual Transformer and lack large-scale image-text alignment data, which limits the direct transfer of general visual language models; (4) Visual language models have strong semantic understanding capabilities but lack pixel-level spatial details and lack effective alignment mechanisms, resulting in insufficient detection and segmentation accuracy.
[0003] Therefore, how to provide a solution to the practical problems of existing infrared small target detection methods in the whole-domain scene, such as insufficient semantic understanding of single visual features, weak cross-platform and cross-band generalization ability, difficulty in directly adapting general visual language models to infrared small targets, and difficulty in coordinating semantic information and pixel-level spatial details, is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a multi-task interpretation method, apparatus, device, and medium for infrared small targets, capable of simultaneously supporting multiple infrared interpretation tasks such as detection, segmentation, visual localization, image description, and visual question answering; it can improve the target discrimination capability and open scene adaptability of infrared small target models in complex backgrounds, providing a more versatile and intelligent infrared small target interpretation solution for application scenarios such as space observation, sea surface monitoring, anti-drone, autonomous driving, and traffic monitoring. The specific solution is as follows: In a first aspect, this application discloses a multi-task interpretation method for infrared small targets, including: Infrared visual language training samples are constructed, and the pre-trained visual language model is fine-tuned with infrared visual instructions using the infrared visual language training samples to obtain an infrared visual language model; wherein, the infrared visual language training samples include infrared images, text instructions corresponding to the infrared images, task answers, and visual supervision information; the infrared visual instruction fine-tuning is used to enable the pre-trained visual language model to learn the correspondence between infrared small targets and text semantics. The infrared image to be interpreted is input into the infrared visual language model to extract the global semantic features of the infrared image to be interpreted; Local spatial features are extracted from the infrared image to be interpreted, and the global semantic features and the local spatial features are bidirectionally fused to obtain fused multi-scale features; Based on the multi-scale features, the dense prediction result of small infrared targets in the infrared image to be interpreted is output, and the language interpretation result corresponding to the input text command is output based on the infrared visual language model.
[0005] Optionally, constructing infrared visual language training samples includes: Acquire infrared images and their corresponding annotation information; the annotation information includes visual supervision information and language task information under various task types; the task types include multiple types such as image description, visual question answering, target counting, visual localization, target detection, and semantic segmentation; The detection box, segmentation mask, and / or target position of the small infrared target in the infrared image are determined based on the visual supervision information. Based on the language task information, text instructions and task answers corresponding to the infrared image are generated; wherein, the language task information incorporates at least one infrared domain information from imaging band, observation platform, background environment, target area and physical properties, so that the infrared visual language training samples contain the correspondence between infrared small targets and text semantics; The infrared image, the text instruction, the task answer, and the visual supervision information are associated and organized into an infrared visual language training sample.
[0006] Optionally, the pre-trained visual language model includes a visual encoder, a cross-modal projection module, and a language model; correspondingly, the step of fine-tuning the pre-trained visual language model using the infrared visual language training samples with infrared visual commands includes: The infrared images from the infrared visual language training samples are input into the visual encoder to extract visual features; The visual features are mapped to the semantic space that the language model can receive through the cross-modal projection module to obtain image semantic units; The image semantic units are concatenated with the text instruction units corresponding to the text instructions to obtain a multimodal input sequence; The multimodal input sequence is input into the language model to generate a predicted answer corresponding to the text instruction; The parameters of the pre-trained visual language model are adjusted based on the difference between the predicted answer and the task answer to obtain the infrared visual language model.
[0007] Optionally, adjusting the parameters of the pre-trained visual language model based on the difference between the predicted answer and the task answer includes: The parameters of the pre-trained visual language model are adjusted with the training objective of minimizing the negative log-likelihood loss between the predicted answer and the task answer.
[0008] Optionally, the infrared image to be interpreted is input into the infrared visual language model to extract global semantic features of the infrared image to be interpreted, including: The visual encoder, which has completed the fine-tuning of infrared visual instructions, is used as the global semantic backbone to extract the global semantic features of the infrared image to be interpreted. Accordingly, extracting local spatial features from the infrared image to be interpreted includes: Local spatial features corresponding to the global semantic features of the current layer output by the current layer of the global semantic backbone are extracted by convolutional branches.
[0009] Optionally, the global semantic features and the local spatial features are bidirectionally interacted and fused to obtain fused multi-scale features, including: The current layer global semantic features are mapped in a low dimension to obtain the current layer low-dimensional query features; The local spatial features are used as keys and values to interact with the current layer low-dimensional query features, so as to inject local spatial details into the global semantic backbone and obtain the updated current layer global semantic features. The next layer of global semantic features is mapped in a low dimension to obtain the next layer of semantic mapping features; The next-layer semantic mapping features are used as keys and values to interact with the local spatial features of the convolutional branch, so as to extract the global semantic context from the next-layer global semantic features and pass it to the convolutional branch. The local spatial features after interaction are normalized and processed by depthwise convolutional feedforward to obtain updated local spatial features; Multi-layer interaction is performed based on the updated current layer global semantic features and the updated local spatial features to obtain multi-scale features for dense prediction.
[0010] Optionally, the step of outputting the dense prediction result of small infrared targets in the infrared image to be interpreted based on the multi-scale features, and outputting the language interpretation result corresponding to the input text command based on the infrared visual language model, includes: The multi-scale features are input into the detection head and / or segmentation decoder to obtain the detection box, segmentation mask and / or target location in the infrared image to be interpreted. Based on the input text command, the infrared visual language model outputs at least one of the following: image description result, visual question answering result, target counting result, visual localization result, target detection result, and semantic segmentation result; The infrared small target density prediction result and the language interpretation result are used as the multi-task interpretation output of the infrared image to be interpreted.
[0011] Secondly, this application discloses a multi-task decoding device for small infrared targets, comprising: A sample construction module is used to construct infrared visual language training samples; wherein, the infrared visual language training samples include infrared images, text instructions corresponding to the infrared images, task answers, and visual supervision information; The instruction fine-tuning module is used to fine-tune the pre-trained visual language model with infrared visual instructions using the infrared visual language training samples to obtain the infrared visual language model; wherein, the infrared visual instruction fine-tuning is used to enable the pre-trained visual language model to learn the correspondence between infrared small targets and text semantics. The feature extraction module is used to input the infrared image to be interpreted into the infrared visual language model, extract the global semantic features of the infrared image to be interpreted, and extract local spatial features of the infrared image to be interpreted. The feature fusion module is used to perform bidirectional interactive fusion of the global semantic features and the local spatial features to obtain fused multi-scale features. The result output module is used to output the dense prediction result of infrared small targets in the infrared image to be interpreted based on the multi-scale features, and to output the language interpretation result corresponding to the input text command based on the infrared visual language model.
[0012] Thirdly, this application discloses an electronic device comprising a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the multi-task interpretation method for infrared small targets as described above.
[0013] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the multi-task interpretation method for infrared small targets as described above.
[0014] The beneficial effects of this application are as follows: First, by using infrared visual language training samples containing infrared images, text instructions, task answers, and visual supervision information, the pre-trained visual language model is fine-tuned with infrared visual instructions, enabling the model to learn the correspondence between infrared small targets and text semantics during the training phase. Therefore, compared to infrared small target detection methods that rely solely on visual features, this method can utilize linguistic semantic information to assist in understanding target location, target quantity, background environment, and imaging conditions, reducing the risk of false detections and missed detections caused by complex background clutter. Furthermore, when processing the infrared image to be interpreted, both global semantic features and local spatial features are extracted, and the two are bidirectionally fused. This mechanism compensates for the shortcomings of visual Transformers in global modeling, where the response of infrared small targets is easily overwhelmed by background information and local positioning accuracy is insufficient. The fused multi-scale features can provide scene and semantic discrimination information for infrared small targets, and also supplement the edge, position, and local detail information of small targets, improving the accuracy of dense prediction tasks such as detection and segmentation. Furthermore, this method, while outputting dense prediction results for infrared small targets, retains the ability to generate language interpretation results based on text instructions. This allows the same model framework to support detection, segmentation, and language tasks such as question answering, description, counting, or localization. Thus, infrared small target processing is no longer limited to a single detection task but can form a unified multi-task interpretation capability for the entire domain, improving the model's generalization ability and comprehensive application value. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 This is a flowchart of a multi-task interpretation method for small infrared targets disclosed in this application; Figure 2 This is an example diagram illustrating the construction of the infrared small target visual language task system disclosed in this application; Figure 3 This is the flowchart of the infrared vision command fine-tuning disclosed in this application; Figure 4 This is a schematic diagram of the dense prediction mechanism architecture for semantic-spatial alignment disclosed in this application; Figure 5 This application discloses a specific implementation flowchart for infrared small target interpretation. Figure 6 This is a schematic diagram of the structure of a multi-task interpretation device for small infrared targets disclosed in this application; Figure 7 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] With the rapid development of infrared imaging technology, deep learning, and visual language models, infrared small target detection is gradually expanding from a traditional single visual perception task to a multi-task integrated interpretation direction, including detection, segmentation, visual localization, image description, and visual question answering. Infrared small targets are typically characterized by their extremely small size, weak texture, indistinct edges, and susceptibility to interference from complex backgrounds. Existing methods mostly rely on convolutional neural networks or visual Transformers to extract image features, achieving good detection results in specific scenarios. However, these methods usually follow the paradigm of "one algorithm, one set of parameters, adapted to one infrared scene," and their generalization ability remains insufficient when facing all-domain scenarios (land-based, air-based, space-based, sea-based), as well as different bands, resolutions, and imaging systems. Existing technologies mainly suffer from the following drawbacks: (1) The problem of insufficient semantic understanding of single visual models. Existing infrared small target detection methods mainly rely on visual features, which are easily affected by complex backgrounds such as clouds, sea surface, and urban textures, making it difficult to distinguish real small targets from background clutter at the semantic level; (2) Insufficient generalization ability across all scenarios. Existing methods are mostly trained on fixed datasets or single scenarios. When faced with different observation platforms, infrared bands and imaging systems, it is often necessary to redesign or retrain the model, making it difficult to form a unified infrared small target interpretation framework; (3) Difficulty in direct transfer of general visual language models. Small infrared targets account for a very small proportion in images and are easily submerged by background information during the global modeling process of visual Transformer, resulting in weak target response and unstable localization; at the same time, the lack of large-scale image-text alignment data in the infrared domain limits the application of visual language models in this field; (4) Insufficient coordination between semantic information and spatial details. Visual language models have strong semantic understanding capabilities, but infrared small target detection is highly dependent on local spatial details. If there is a lack of effective alignment mechanisms, it is easy to have problems such as good semantic understanding but insufficient pixel-level detection and segmentation accuracy.
[0019] To address this, this application provides a multi-task interpretation scheme for infrared small targets, which can alleviate the semantic ambiguity problem caused by traditional visual models relying solely on pixel features; it has stronger generalization ability in different bands, different observation platforms, and different background environments, reducing the cost of repeatedly designing models for different scenarios; and it can improve pixel-level detection and segmentation accuracy while maintaining semantic understanding capabilities.
[0020] This invention discloses a multi-task interpretation method for infrared small targets. The training phase primarily involves constructing infrared visual language training samples and fine-tuning infrared visual commands. The interpretation phase utilizes a domain-adapted model to extract global semantic features and simultaneously extracts local spatial features. Multi-scale features are generated through bidirectional interaction and fusion of semantic and spatial features, ultimately outputting both dense prediction results and language interpretation results. See also... Figure 1 As shown, the method includes: Step S11: Construct infrared visual language training samples; the infrared visual language training samples include infrared images, text instructions corresponding to the infrared images, task answers, and visual supervision information.
[0021] In this embodiment, infrared visual language training samples are first constructed. These training samples are multimodal training samples for infrared small target scenarios. Infrared small target detection differs from ordinary natural image target detection tasks. Targets in infrared images typically have extremely small size, weak texture, unclear edges, low signal-to-noise ratio, and are easily interfered with by complex backgrounds such as clouds, sea surfaces, building textures, and ground clutter. Therefore, the infrared small targets in this embodiment can be aircraft, drones, ships, vehicles, space targets, or other targets that exhibit weak responses in infrared images.
[0022] In this step, each infrared visual language training sample includes at least an infrared image, a text instruction corresponding to that infrared image, a task answer, and visual supervision information. The infrared image encompasses the entire infrared scene, including infrared scenes formed by land-based, air-based, space-based, and sea-based observation platforms, and may also include different imaging bands such as near-infrared, mid-infrared, and / or long-wave infrared, different spatial resolutions, different imaging systems, and different observation perspectives. The text instruction specifies the interpretation task that the model needs to complete, and can propose different types of interpretation task requirements to the model in natural language. The task answer serves as the supervision signal expected from the model's output under that instruction. The visual supervision information is used to supervise intensive prediction tasks such as target detection, semantic segmentation, or visual localization.
[0023] This step provides a data foundation for subsequent domain-adaptive training of the visual language model, enabling the model to learn the correspondence between small infrared targets in infrared images and text semantics during training, thus making up for the lack of infrared domain image-text alignment data.
[0024] Step S12: Use the infrared visual language training samples to fine-tune the pre-trained visual language model with infrared visual instructions to obtain an infrared visual language model; the infrared visual instruction fine-tuning is used to enable the pre-trained visual language model to learn the correspondence between infrared small targets and text semantics.
[0025] A Vision-Language Model (VLM) is a multimodal model capable of processing both image and text information simultaneously. It can be guided by language commands to perform tasks such as image understanding, target localization, and question-answering reasoning. While general-purpose VLMs possess strong image-text understanding capabilities, their pre-training data primarily comes from natural images, making it difficult to directly adapt to the characteristics of infrared images, such as small targets, low-texture backgrounds, and complex clutter interference. Directly transferring these data to infrared small target tasks can easily lead to inaccurate localization and semantic understanding biases. Therefore, based on the completed construction of infrared visual language training samples, this step utilizes these training samples to fine-tune the pre-trained visual language model with visual commands, performing domain-specific training.
[0026] In this embodiment, visual instruction fine-tuning refers to retraining a pre-trained visual language model using domain-specific image-text data, shifting its focus from general natural image understanding to infrared small target scene understanding. Through this instruction fine-tuning process, the model's ability to distinguish weak targets, complex backgrounds, and imaging conditions in infrared images is enhanced.
[0027] Step S13: Input the infrared image to be interpreted into the infrared visual language model and extract the global semantic features of the infrared image to be interpreted.
[0028] After fine-tuning the visual instructions, the visual encoder (such as the visual Transformer) in the model has the ability to understand the semantics of infrared small target scenes. Using it as the global semantic backbone, it can model the target region, background environment, imaging conditions, and their interrelationships within the global attention scope. Global semantic features can be extracted from multiple intermediate layers or specified layers of the visual encoder for subsequent interaction with local spatial features at different scales.
[0029] Step S14: Extract local spatial features from the infrared image to be interpreted, and perform bidirectional interactive fusion of the global semantic features and the local spatial features to obtain fused multi-scale features.
[0030] Since infrared small target detection and segmentation is a typical dense prediction task, global semantic understanding alone is insufficient. Because infrared small targets occupy a very small area in an image, pixel-level localization highly depends on local spatial details. If the visual encoder in the infrared visual language model is directly used for detection or segmentation, problems such as the target response being overwhelmed by the background, inaccurate boundary localization, and insufficient local details can easily occur. Therefore, this embodiment introduces a convolutional branch while preserving the global semantic backbone. Through convolution operations, local spatial features of the infrared image to be interpreted are extracted to retain spatial details such as target edges and positions.
[0031] Building upon this foundation, a bidirectional interactive fusion of global semantic features and local spatial features is employed. This bidirectional fusion includes injecting local spatial priors from convolutional branches into the visual Transformer backbone, leveraging local spatial features to enhance the spatial detail representation in global semantic features and compensate for the shortcomings of global modeling in local localization; and extracting global semantic context from the visual Transformer backbone into convolutional branches, using global semantic features to provide semantic discriminative information of the global context for local spatial features, thus compensating for the limited receptive field and weak semantic understanding ability of convolutional branches. Global semantic features and local spatial features complement and enhance each other, ultimately yielding multi-scale features after multiple layers of interaction. These features are used to provide feature representations with both global semantic discriminative capabilities and local spatial localization capabilities for subsequent dense prediction tasks.
[0032] Step S15: Based on the multi-scale features, output the dense prediction result of infrared small targets in the infrared image to be interpreted, and output the language interpretation result corresponding to the input text command based on the infrared visual language model.
[0033] After obtaining the fused multi-scale features, this embodiment executes two types of output tasks in parallel. One type is the dense prediction task, which refers to the task of predicting image pixels or local regions, such as infrared small target detection and segmentation. Specifically, the multi-scale features are input into the detection head and / or segmentation decoder to obtain the detection box, segmentation mask, and / or target location in the infrared image to be interpreted. The detection head is used to perform target presence discrimination and bounding box regression at each location in the multi-scale features, and outputs the location information of the infrared small target; the segmentation decoder is used to upsample and classify the multi-scale features at the pixel level, and outputs the segmentation mask of the infrared small target.
[0034] Another type is text interpretation tasks, which, based on input text instructions, output at least one of the following through the infrared visual language model: image description results, visual question answering results, target counting results, visual localization results, target detection results, and semantic segmentation results.
[0035] Finally, the dense prediction results of the infrared small targets and the language interpretation results are used as the multi-task interpretation output of the infrared image to be interpreted. The dense prediction results and the language interpretation results can be output together, or selectively output according to task instructions.
[0036] Through the aforementioned parallel output mechanism, this invention extends the detection of small infrared targets from a single visual detection to a unified interpretation of multiple tasks, including detection, segmentation, visual localization, image description, and visual question answering. This enables the model to simultaneously output visual perception results and language understanding results, forming a multi-task interpretation capability for global infrared small targets.
[0037] The beneficial effects of this application are as follows: First, by using infrared visual language training samples containing infrared images, text instructions, task answers, and visual supervision information, the pre-trained visual language model is fine-tuned with infrared visual instructions, enabling the model to learn the correspondence between infrared small targets and text semantics during the training phase. Therefore, compared to infrared small target detection methods that rely solely on visual features, this method can utilize linguistic semantic information to assist in understanding target location, target quantity, background environment, and imaging conditions, reducing the risk of false detections and missed detections caused by complex background clutter. Furthermore, when processing the infrared image to be interpreted, both global semantic features and local spatial features are extracted, and the two are bidirectionally fused. This mechanism compensates for the shortcomings of visual Transformers in global modeling, where the response of infrared small targets is easily overwhelmed by background information and local positioning accuracy is insufficient. The fused multi-scale features can provide scene and semantic discrimination information for infrared small targets, and also supplement the edge, position, and local detail information of small targets, improving the accuracy of dense prediction tasks such as detection and segmentation. Furthermore, this method, while outputting dense prediction results for infrared small targets, retains the ability to generate language interpretation results based on text instructions. This allows the same model framework to support detection, segmentation, and language tasks such as question answering, description, counting, or localization. Thus, infrared small target processing is no longer limited to a single detection task but can form a unified multi-task interpretation capability for the entire domain, improving the model's generalization ability and comprehensive application value.
[0038] Based on the above embodiments, step S11 will be specifically described in this embodiment. (In conjunction with...) Figure 2 As shown, the construction of infrared visual language training samples includes infrared data aggregation, metadata and visual annotation extraction, text instruction and task answer generation, quality verification, and sample association organization. This process addresses the lack of sufficient image-text alignment data in the infrared domain and enables language supervision to reflect domain knowledge of infrared small target tasks. Specifically, it includes the following steps: Step 1: Obtain the infrared image and its corresponding annotation information.
[0039] First, infrared images are acquired from different observation platforms, imaging bands, background environments, and imaging systems. These images can come from existing datasets or from data acquired by infrared imaging devices. Optionally, the images output from different imaging systems are subjected to size standardization, grayscale range normalization, or format conversion. When geometric transformations such as scaling, cropping, or flipping occur, the detection bounding box, segmentation mask, and target position are simultaneously transformed to maintain consistency between the visual supervision information and the infrared images.
[0040] Secondly, the model acquires annotation information for various task types within the infrared image, extracting visual supervision information and language task information, with the language task information corresponding to infrared domain metadata. These task types include multiple categories such as image description, visual question answering, target counting, visual localization, target detection, and semantic segmentation. By simultaneously covering annotations for multiple task types within the same infrared image, the model can learn multi-faceted and multi-layered correspondences between infrared small targets and textual semantics during training. For example, the image description task requires the model to generate a natural language description of the entire infrared image content; the visual question answering task requires the model to answer questions related to the infrared image content; the target counting task requires the model to output the number of infrared targets in the image; the visual localization task requires the model to locate the target region based on the language description; and the target detection and semantic segmentation tasks require the model to output target detection boxes and segmentation masks. Through this multi-task joint supervision, the model expands from single pixel-level detection learning to comprehensive interpretation learning of infrared small target scenes.
[0041] Step 2: Determine the detection box, segmentation mask, and / or target position of the small infrared target in the infrared image based on the visual supervision information; Step 3: Generate text instructions and task answers corresponding to the infrared image based on the language task information.
[0042] Traditional target detection networks rely heavily on visual features for target recognition and localization. However, visual signals alone are insufficient to differentiate between real infrared small targets and background interference areas, especially under different wavelengths, imaging platforms, and observation scenarios, leading to issues such as missed detections, false detections, or insufficient generalization ability. This embodiment moves beyond traditional bounding boxes or segmentation masks. Instead, after expanding infrared small target detection to multiple task types, it constructs corresponding text instructions and answers for each input infrared image. This allows the model to learn the semantic correspondence between infrared small targets and text during training.
[0043] It should be noted that language task information may include annotation information such as target quantity, image description, and visual question answering. For different task types, text instructions can be categorized into image description instructions, physical attribute question answering instructions, target quantity inquiry instructions, target location inquiry instructions, and region-level positioning instructions. To enhance the model's adaptability to the infrared domain, at least one infrared domain information from imaging band, observation platform, background environment, target area, and physical attributes is further introduced into the language task information, so that the infrared visual language training samples contain the correspondence between infrared small targets and text semantics. In this way, language information is used as a semantic prior in infrared small target detection, making language supervision not just ordinary image description, but domain knowledge that reflects the characteristics of the infrared small target task. The model can not only "see" the target, but also understand the target's location, quantity, imaging conditions, and background semantics in conjunction with the language task. This can alleviate the domain bias problem that occurs when a general visual language model is directly transferred to the infrared small target task, providing a foundation for subsequent fine-tuning of visual instructions.
[0044] For example, the text instructions and task answers can take the following forms: (1) Image description task: The text instruction is "Please describe the target and background environment in this infrared image", and the task answer includes information such as the number of targets, the approximate location of the targets, the background type, the imaging band or observation platform; (2) Visual question answering task: The text instruction is "What kind of observation platform or infrared band does this image correspond to?" and the task answer is determined by the platform, band and imaging system metadata; (3) Target counting task: The text instruction is "How many infrared small targets are contained in the image?" and the task answer is the number of targets counted based on the detection box, target points or segmented connected regions; (4) Visual positioning task: The text instruction is "Point out the area where the infrared small targets are located", and the task answer is a relative orientation description such as upper left, lower right, center, etc., or the target coordinates and detection box coordinates; (5) Target detection or semantic segmentation task: The text instruction requires the model to output the target detection result or segmentation result, and the task answer can be a structured coordinate sequence, region label or special task words associated with visual supervision information.
[0045] Step 4: Associate and organize the infrared image, the text instruction, the task answer, and the visual supervision information into an infrared visual language training sample.
[0046] In one feasible implementation, quality verification is performed on the automatically generated samples. Quality verification may include rejecting anomalous samples, checking the consistency between text and visual supervision, verifying the validity of coordinates, checking the completeness of task answers, and expert or manual verification. Samples with severely damaged images, inconsistent annotations and targets, conflicting answers and metadata, or those that cannot be clearly determined may be rejected or returned for manual revision. After passing quality verification, the infrared images, text instructions, task answers, and visual supervision information are associated and organized into infrared visual language training samples, which can be represented as: ;in, I i This represents the i-th infrared image. Q i This indicates the corresponding text instruction. A i Indicates the answer to the task. Y i This represents visual supervision information such as bounding boxes, segmentation masks, or target coordinates. N Indicates the number of samples.
[0047] See Figure 3 The pre-trained visual language model includes a visual encoder, a cross-modal projection module, and a language model; optionally, it also includes a word segmenter or text embedding layer for converting text instructions into text instruction tokens. The visual encoder can employ a visual Transformer to extract visual features from infrared images; the modal projection module can employ a linear projector or a multilayer perceptron projector to align the visual feature space with the language model's word vector space; the language model is used to autoregressively generate predicted answers based on image semantic tokens and text instruction tokens. Specifically, infrared visual instruction fine-tuning includes the following steps: Step 1: Input the infrared image from the infrared visual language training sample into the visual encoder to extract visual features.
[0048] For the input infrared image I, the visual features are first extracted by the visual encoder: H v =E v ( I );in, E v ( · ) represents the visual encoder, H v This represents the visual features obtained after visual encoding of an infrared image.
[0049] Step 2: The visual features are mapped to the semantic space that the language model can receive through the cross-modal projection module to obtain image semantic units.
[0050] Since visual features are not consistent with the word vector space of the language model, a cross-modal projection module is needed to map the visual features to a semantic space that the language model can accept. E I =Φ ( H v );in, E I This represents the semantic units of the mapped image. Φ ( · ) represents a trainable cross-modal projection function.
[0051] Step 3: Concatenate the image semantic units with the text instruction units corresponding to the text instructions to obtain a multimodal input sequence.
[0052] Text instructions Q Performing word segmentation and embedding yields text instruction tokens. E T Subsequently, the image semantic terms are concatenated with the text instruction terms corresponding to the text instructions to form a unified multimodal input sequence: X= [ E I ;E T ]; where [;] represents a sequence concatenation operation.
[0053] Step 4: Input the multimodal input sequence into the language model to generate a predicted answer corresponding to the text instruction.
[0054] The language model generates predicted answers based on autoregression of the multimodal input sequence. The answer sequence can be represented as: .
[0055] Step 5: Adjust the parameters of the pre-trained visual language model based on the difference between the predicted answer and the task answer to obtain the infrared visual language model.
[0056] The parameters of the pre-trained visual language model are adjusted with the training objective of minimizing the negative log-likelihood loss between the predicted answer and the task answer: ;in, T Indicates the length of the answer sequence. a t Indicates the first t The answer word generated at time 'a', a <t This represents the sequence of answer lexical terms that have been generated at a previous time step.
[0057] Through the training methods described above, the model can learn the relationships between target regions, background semantics, imaging conditions, and small target discrimination features while answering questions related to infrared scenes. In other words, language supervision not only assists in generating textual answers but also inversely constrains the visual encoder through loss, enabling it to learn discriminative features more suitable for infrared small target detection. The core role of this stage is twofold: firstly, to enhance the model's semantic understanding of infrared small target scenes; and secondly, to reduce the modal differences between the pre-trained model using natural images and infrared images, thus enabling the model to acquire fundamental representational capabilities for infrared small target tasks.
[0058] Based on the aforementioned embodiments, the model already possesses the ability to understand the semantics of infrared scenes. However, infrared small target detection and segmentation are typical dense prediction tasks, and relying solely on global semantic features may still lead to small target responses being overwhelmed by the background, inaccurate boundary localization, and insufficient local details. See also Figure 4 This embodiment uses a visual Transformer adapted for the infrared domain as the global semantic backbone, while setting a convolutional stem branch to extract multi-scale local spatial features. Bidirectional feature exchange is achieved through an implicit spatial information injection (ISR) module and an implicit spatial information extraction (ISE) module. Specifically, the process of extracting the global semantic features and local spatial features of the infrared image to be interpreted, and the bidirectional interactive fusion of the two, includes the following steps: Step 1: Using the visual encoder that has completed the fine-tuning of infrared visual instructions as the global semantic backbone, extract the global semantic features of the infrared image to be interpreted; Step 2: Extract local spatial features corresponding to the global semantic features of the current layer output by the current layer of the global semantic backbone through convolutional branches.
[0059] In this embodiment, the visual encoder can be a Vision Transformer (ViT). Let the global semantic features output by the i-th layer of the Vision Transformer be: Where D represents the feature dimension of the visual Transformer.
[0060] Let the local spatial features of the output of the convolutional branch at the corresponding layer be: Where C represents the feature dimension of the convolution branch, which typically satisfies Ci. D.
[0061] Step 3: Perform low-dimensional mapping on the global semantic features of the current layer to obtain the low-dimensional query features of the current layer; Step 4: Use the local spatial features as keys and values to interact with the current layer low-dimensional query features to inject local spatial details into the global semantic backbone, thereby obtaining the updated current layer global semantic features.
[0062] To reduce background redundancy in high-dimensional visual Transformer features and decrease interaction computation, we first perform low-dimensional mapping on the global semantic features of the current layer, compressing them into a compact space to obtain the low-dimensional query features of the current layer: .
[0063] Subsequently, the local spatial features are used as keys and values to interact with the low-dimensional query vector, injecting local spatial details into the global semantic backbone: This process, known as spatial prior injection, enhances the global semantic backbone's ability to perceive the local details, edge structures, and spatial location of small targets, preventing the small targets from being weakened by background information during global attention calculation. Here, Attention represents the cross-attention function.
[0064] Step 5: Perform low-dimensional mapping on the next layer of global semantic features to obtain the next layer of semantic mapping features; Step 6: Use the next layer semantic mapping features as keys and values to interact with the local spatial features of the convolutional branch, so as to extract the global semantic context from the next layer global semantic features and pass it to the convolutional branch; Step 7: Normalize and perform depthwise convolution feedforward processing on the local spatial features after interaction to obtain the updated local spatial features.
[0065] Meanwhile, to ensure that the convolutional branches not only possess local spatial information but also obtain the global semantic context of the visual Transformer, this embodiment further designs a semantic extraction process. The next-layer global semantic features are mapped to a low-dimensional space and used as keys and values to interact with the current local spatial features. Through the above interactions, the convolutional branch obtains scene semantics and background semantics from the next layer of visual Transformer features while preserving local spatial details, thus possessing the ability to semantically discriminate complex backgrounds.
[0066] Subsequently, normalization and feedforward processing with depthwise convolution are performed on the interacted local spatial features to obtain the updated local spatial features: ;in, FFN dw This represents a feedforward network with depthwise convolutions. Norm ( ) indicates the normalization operation.
[0067] Step 8: Perform multi-layer interaction based on the updated current layer global semantic features and the updated local spatial features to obtain multi-scale features for dense prediction.
[0068] It should be noted that ISR and ISE can be set between multiple blocks of the visual Transformer, enabling repeated bidirectional exchange between global semantic features of the current layer and the next layer and local features of the convolutional branches. After multiple layers of semantic and spatial interaction, the model will output a multi-scale feature pyramid: P ={ P 1 / 8 , P 1 / 16 , P 1 / 32};in, P 1 / 8 , P 1 / 16 , P 1 / 32 These represent multi-scale features with different resolution levels relative to the input image, used for dense prediction by subsequent detection or segmentation heads. Higher resolution features can preserve the precise location and edges of small infrared targets, while lower resolution features can provide a larger receptive field and stronger semantic discrimination capabilities. The detection head or segmentation decoder can select one or more scales for fusion according to task requirements. This design can simultaneously meet the needs of infrared small target detection for both global semantic judgment and local spatial localization.
[0069] As can be seen, this embodiment synergistically integrates the global semantic representation capability of the visual Transformer with the local spatial detail extraction capability of the convolutional branch, enabling the model to improve pixel-level detection and segmentation accuracy while maintaining semantic understanding. Experimental results show that this method achieves superior AP compared to several existing methods in infrared small target detection and segmentation tasks. 50 The performance of metrics such as Recall, F1, Pd, IoU, and Fa indicates that it has better detection accuracy and target segmentation capability in complex backgrounds.
[0070] Furthermore, such as Figure 5 The diagram shows a specific implementation flowchart of visual language joint learning for global infrared small target interpretation based on the content of the aforementioned embodiments. It includes four main steps: (1) infrared visual language data construction; (2) infrared visual instruction fine-tuning; (3) semantic-spatial alignment dense prediction; and (4) multi-task interpretation output.
[0071] (1) Construction of infrared visual language data: Construct a multimodal data system for infrared small target scenarios, and organize infrared images with annotation information such as detection boxes, segmentation masks, target positions, target quantities, image descriptions, and visual question-and-answer to form training samples of infrared images-text instructions-task answers. This step is used to supplement the problem of insufficient image-text alignment data in the infrared domain, so that the model can learn the correspondence between infrared small targets and language semantics; (2) Infrared visual instruction fine-tuning: After the data construction is completed, the infrared image is input into the visual encoder to extract image features, and then mapped to the semantic space of the language model through the cross-modal projection module. The corresponding answer is then generated by combining the text instructions. Through visual instruction fine-tuning, the pre-trained visual language model is transformed from general natural image understanding ability to infrared small target scene understanding ability, enhancing the model's ability to distinguish weak targets, complex backgrounds and imaging conditions; (3) Semantic-spatial alignment dense prediction: The visual Transformer backbone adapted for the infrared domain is used for downstream detection and segmentation tasks. To compensate for the lack of local detail perception in the Transformer, semantic-spatial alignment is introduced. Global semantic information is extracted through the ViT branch, local spatial priors are extracted through the convolutional stem branch, and bidirectional feature interaction is performed to improve the pixel-level localization and segmentation accuracy of small infrared targets; (4) Multi-task interpretation output: Finally, the aligned multi-scale features are input into the detection head or segmentation decoder to output the target detection box and segmentation mask; at the same time, the text generation capability of the visual language model is preserved, and the image description, target count, visual localization and visual question answering results are output. Through this step, the model can be extended from a single detection model to a multi-task analytical model for global infrared small targets.
[0072] In summary, this invention overcomes the limitations of existing infrared small target detection methods, which focus solely on visual perception, have limited task complexity, and lack cross-domain generalization capabilities. It simultaneously supports multiple infrared interpretation tasks, including detection, segmentation, visual localization, image description, and visual question answering. This technology enhances the target discrimination capability and open-scene adaptability of infrared small target models in complex backgrounds, providing a more versatile and intelligent infrared small target interpretation solution for applications such as space observation, sea surface monitoring, anti-drone detection, autonomous driving, and traffic monitoring.
[0073] Accordingly, this application discloses a multi-task decoding device for small infrared targets, see [link to relevant documentation]. Figure 6 As shown, the device includes: The sample construction module 11 is used to construct infrared visual language training samples; wherein, the infrared visual language training samples include infrared images, text instructions corresponding to the infrared images, task answers, and visual supervision information; The instruction fine-tuning module 12 is used to fine-tune the pre-trained visual language model with infrared visual instructions using the infrared visual language training samples to obtain an infrared visual language model; wherein, the infrared visual instruction fine-tuning is used to enable the pre-trained visual language model to learn the correspondence between infrared small targets and text semantics. Feature extraction module 13 is used to input the infrared image to be interpreted into the infrared visual language model, extract the global semantic features of the infrared image to be interpreted, and extract local spatial features of the infrared image to be interpreted. Feature fusion module 14 is used to perform bidirectional interactive fusion of the global semantic features and the local spatial features to obtain fused multi-scale features; The result output module 15 is used to output the infrared small target density prediction result in the infrared image to be interpreted based on the multi-scale features, and to output the language interpretation result corresponding to the input text instruction based on the infrared visual language model.
[0074] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0075] Furthermore, embodiments of this application disclose an electronic device, Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of protection of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the multi-task interpretation method for infrared small targets disclosed in any of the foregoing embodiments.
[0076] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0077] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it can include an operating system 221, computer programs 222, and data 223, etc. The data 223 can include various types of data. The storage method can be temporary storage or permanent storage.
[0078] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the multi-task interpretation method for infrared small targets executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0079] Furthermore, this application discloses a computer-readable storage medium, which includes random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, magnetic disks, optical disks, or any other form of storage medium known in the art. When the computer program is executed by a processor, it implements the aforementioned multi-task interpretation method for infrared small targets. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0080] Furthermore, embodiments of this application provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements any of the above-described multi-task interpretation methods for infrared small targets.
[0081] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0082] The steps of the multi-task interpretation method or algorithm for small infrared targets described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0083] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0084] The above provides a detailed description of the multi-task interpretation method, apparatus, device, and medium for small infrared targets provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A multi-task interpretation method for small infrared targets, characterized in that, include: Infrared visual language training samples are constructed, and the pre-trained visual language model is fine-tuned with infrared visual instructions using the infrared visual language training samples to obtain an infrared visual language model; wherein, the infrared visual language training samples include infrared images, text instructions corresponding to the infrared images, task answers, and visual supervision information; the infrared visual instruction fine-tuning is used to enable the pre-trained visual language model to learn the correspondence between infrared small targets and text semantics. The infrared image to be interpreted is input into the infrared visual language model to extract the global semantic features of the infrared image to be interpreted; Local spatial features are extracted from the infrared image to be interpreted, and the global semantic features and the local spatial features are bidirectionally fused to obtain fused multi-scale features; Based on the multi-scale features, the dense prediction result of small infrared targets in the infrared image to be interpreted is output, and the language interpretation result corresponding to the input text command is output based on the infrared visual language model.
2. The multi-task interpretation method for small infrared targets according to claim 1, characterized in that, The construction of infrared visual language training samples includes: Acquire infrared images and their corresponding annotation information; the annotation information includes visual supervision information and language task information under various task types; the task types include multiple types such as image description, visual question answering, target counting, visual localization, target detection, and semantic segmentation; The detection box, segmentation mask, and / or target position of the small infrared target in the infrared image are determined based on the visual supervision information. Based on the language task information, text instructions and task answers corresponding to the infrared image are generated; wherein, the language task information incorporates at least one infrared domain information from imaging band, observation platform, background environment, target area and physical properties, so that the infrared visual language training samples contain the correspondence between infrared small targets and text semantics; The infrared image, the text instruction, the task answer, and the visual supervision information are associated and organized into an infrared visual language training sample.
3. The multi-task interpretation method for small infrared targets according to claim 1, characterized in that, The pre-trained visual language model includes a visual encoder, a cross-modal projection module, and a language model; correspondingly, the step of fine-tuning the pre-trained visual language model using infrared visual commands based on the infrared visual language training samples includes: The infrared images from the infrared visual language training samples are input into the visual encoder to extract visual features; The visual features are mapped to the semantic space that the language model can receive through the cross-modal projection module to obtain image semantic units; The image semantic units are concatenated with the text instruction units corresponding to the text instructions to obtain a multimodal input sequence; The multimodal input sequence is input into the language model to generate a predicted answer corresponding to the text instruction; The parameters of the pre-trained visual language model are adjusted based on the difference between the predicted answer and the task answer to obtain the infrared visual language model.
4. The multi-task interpretation method for small infrared targets according to claim 3, characterized in that, The step of adjusting the parameters of the pre-trained visual language model based on the difference between the predicted answer and the task answer includes: The parameters of the pre-trained visual language model are adjusted with the training objective of minimizing the negative log-likelihood loss between the predicted answer and the task answer.
5. The multi-task interpretation method for small infrared targets according to claim 3, characterized in that, The infrared image to be interpreted is input into the infrared visual language model, and the global semantic features of the infrared image to be interpreted are extracted, including: The visual encoder, which has completed the fine-tuning of infrared visual instructions, is used as the global semantic backbone to extract the global semantic features of the infrared image to be interpreted. Accordingly, extracting local spatial features from the infrared image to be interpreted includes: Local spatial features corresponding to the global semantic features of the current layer output by the current layer of the global semantic backbone are extracted by convolutional branches.
6. The multi-task interpretation method for small infrared targets according to claim 5, characterized in that, The global semantic features and the local spatial features are bidirectionally interacted and fused to obtain fused multi-scale features, including: The current layer global semantic features are mapped in a low dimension to obtain the current layer low-dimensional query features; The local spatial features are used as keys and values to interact with the current layer low-dimensional query features, so as to inject local spatial details into the global semantic backbone and obtain the updated current layer global semantic features. The next layer of global semantic features is mapped in a low dimension to obtain the next layer of semantic mapping features; The next-layer semantic mapping features are used as keys and values to interact with the local spatial features of the convolutional branch, so as to extract the global semantic context from the next-layer global semantic features and pass it to the convolutional branch. The local spatial features after interaction are normalized and processed by depthwise convolutional feedforward to obtain updated local spatial features; Multi-level interactions are performed based on the updated current layer global semantic features and the updated local spatial features to obtain multi-scale features for dense prediction.
7. The multi-task interpretation method for small infrared targets according to any one of claims 1 to 6, characterized in that, Based on the multi-scale features, the system outputs dense prediction results of small infrared targets in the infrared image to be interpreted, and outputs language interpretation results corresponding to the input text command based on the infrared visual language model, including: The multi-scale features are input into the detection head and / or segmentation decoder to obtain the detection box, segmentation mask and / or target location in the infrared image to be interpreted. Based on the input text command, the infrared visual language model outputs at least one of the following: image description result, visual question answering result, target counting result, visual localization result, target detection result, and semantic segmentation result; The infrared small target density prediction result and the language interpretation result are used as the multi-task interpretation output of the infrared image to be interpreted.
8. A multi-task decoding device for small infrared targets, characterized in that, include: A sample construction module is used to construct infrared visual language training samples; wherein, the infrared visual language training samples include infrared images, text instructions corresponding to the infrared images, task answers, and visual supervision information; The instruction fine-tuning module is used to fine-tune the pre-trained visual language model with infrared visual instructions using the infrared visual language training samples to obtain the infrared visual language model; wherein, the infrared visual instruction fine-tuning is used to enable the pre-trained visual language model to learn the correspondence between infrared small targets and text semantics. The feature extraction module is used to input the infrared image to be interpreted into the infrared visual language model, extract the global semantic features of the infrared image to be interpreted, and extract local spatial features of the infrared image to be interpreted. The feature fusion module is used to perform bidirectional interactive fusion of the global semantic features and the local spatial features to obtain fused multi-scale features. The result output module is used to output the dense prediction result of infrared small targets in the infrared image to be interpreted based on the multi-scale features, and to output the language interpretation result corresponding to the input text command based on the infrared visual language model.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the multi-task interpretation method for infrared small targets as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein the computer programs, when executed by a processor, implement the multi-task interpretation method for infrared small targets as described in any one of claims 1 to 7.
