Infrared image defect identification method based on hot style randomization and meta learning
By using thermal style parameterization randomization and meta-learning methods based on the infrared radiative transfer model, training samples that conform to physical laws are generated. By combining style invariant consistency and physical consistency regularization, the performance degradation problem of infrared defect recognition models in cross-domain scenarios is solved, and the model can be quickly adapted and stably generalized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-27
AI Technical Summary
Existing infrared defect identification methods suffer from domain shifts in different acquisition scenarios, leading to decreased model recognition performance, lack of cross-domain robustness, and uninterpretable and unstable recognition results.
Training samples are generated using thermal style parameterization randomization based on the infrared radiative transfer model. By combining meta-learning with style invariant consistency constraints and physical consistency regularization, a cross-domain adaptive recognition model is constructed.
The infrared defect recognition model has achieved rapid adaptation and stable generalization under different equipment, environmental and seasonal conditions, ensuring the traceability and auditability of recognition results, and improving the cross-domain generalization stability and physical interpretability of the model.
Smart Images

Figure CN121746841A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of infrared image defect recognition, in particular to an infrared image defect recognition method based on thermal style randomization and meta-learning. BACKGROUND
[0002] At present, infrared thermal imaging technology has been widely used in equipment state monitoring, material defect detection and industrial quality inspection, etc. The existing infrared defect recognition method mainly relies on deep learning model to realize defect detection through feature extraction and classification. However, due to the influence of emissivity, atmospheric transmittance, environmental temperature, load change and detector noise, etc., there is a significant "domain shift" between different collection scenes, which leads to a significant decline in model recognition performance in new environments. In order to improve the cross-domain robustness, researchers try to use image style transfer or data enhancement methods for domain generalization training, but these methods are mostly based on visual appearance transformation, ignoring the radiation transmission characteristics and Planck nonlinear relationship of infrared imaging, and the generated samples often lack physical consistency, which easily introduces artifacts, thereby limiting the reliability and explainability of the model. Some methods use meta-learning (such as MAML, Meta-SGD) to realize small sample adaptation, but the task division is usually based on empirical data sets, lacking a task generation mechanism related to real physical style parameters, making it difficult to cover complex cross-device and cross-season domain drift situations. Therefore, the existing technology still has three shortcomings: (1) lack of domain randomization method combined with infrared physical mechanism, the generated data deviates from the real thermal image distribution; (2) traditional meta-learning cannot adaptively optimize the physical style changes, and the model generalization ability is limited; (3) in multi-domain deployment, the recognition result lacks auditability and stability, which is difficult to meet the engineering application requirements. SUMMARY
[0003] In view of the above defects, the present application aims to provide an infrared image defect recognition method based on thermal style randomization and meta-learning, which aims to construct a physically interpretable meta-learning task through thermal style parameterization randomization based on an infrared radiation transmission model, and to realize the rapid adaptation and stable generalization of the model under different equipment, environment and seasonal conditions by combining style invariant consistency constraints and physical consistent regularization, while ensuring the traceability and auditability of the recognition result.
[0004] To achieve this purpose, the present application adopts the following technical solutions: The infrared image defect recognition method based on thermal style randomization and meta-learning comprises the following steps: S1: based on the infrared radiation transmission model, the physical parameters affecting the generation of infrared images are parameterized and randomized in thermal style to generate infrared training samples with different physical style characteristics; wherein the physical parameters include emissivity, atmospheric transmittance, environmental radiation, noise, imaging blur and load parameters; S2: Constructing a plurality of meta-learning tasks based on the infrared training samples, and using a model-independent meta-learning MAML or a learnable step meta-learning Meta-SGD framework to perform meta-learning training on the recognition model to obtain initial model parameters with cross-domain adaptation capability; S3: In the meta-learning training process, imposing a style-invariant consistency constraint and a physical consistency regularization based on a load parameter on the recognition model; S4: Obtaining target domain infrared data, and based on the initial model parameters, using the target domain infrared data to perform fast adaptation on the recognition model to adjust the model parameters to adapt to the physical style of the target domain; S5: Using the adapted recognition model to infer the target domain infrared data, outputting a defect recognition result, and synchronously recording physical style parameter information associated with the defect recognition result.
[0005] Preferably, the thermal style parameterization randomization includes: Step S11: Set the outgoing radiant brightness of the target object Satisfy the relationship: ; Step S12: The outgoing radiant brightness After atmospheric transmission, the radiant brightness reaching the detector Satisfy the relationship: ; Step S13: The radiant brightness Through the calibration mapping function of the camera Converted into a gray code value ; By randomly sampling and perturbing the physical parameters of steps S11-S13, generate infrared training samples with physical style changes Satisfy the relationship: ; And based on the load change, model the target area temperature, and the temperature update satisfies the relationship: ; Wherein, Indicates the target surface emissivity, Indicates the Planck radiation function related to the target surface temperature , Indicates the environmental radiation, Indicates the atmospheric transmittance changing with the propagation distance , Indicates the atmospheric equivalent temperature, Indicates the convolution kernel simulating the field of view blur, represents thermal noise obeying a Gaussian distribution with zero mean and variance represents a speckle noise perturbation term controlled by a speckle noise parameter and respectively represent a reference load and a randomly sampled load in the load parameter, and respectively represent target region temperatures under the corresponding loads, is a thermal response coefficient greater than zero.
[0006] Preferably, constructing a plurality of meta-learning tasks based on the infrared training samples comprises: dividing the infrared training samples corresponding to each set of randomized thermal style parameters and their corresponding defect labels into a meta-learning task , and further dividing the meta-learning task into a support set and a query set ; The meta-learning training of the recognition model includes an inner-layer update and an outer-layer update process, wherein: For each task , an inner-layer update is performed based on the support set to obtain task-specific parameters satisfying the relationship: ; On the query set of all tasks , the outer-layer loss is calculated according to the task-specific parameters and the global model parameters are updated, satisfying the relationship: ; When the Meta-SGD framework is adopted, the inner-layer learning rate is a learnable parameter vector, and the corresponding inner-layer update satisfies the relationship: ; wherein represents the global parameters of the recognition model, represents the updated task-specific parameters for task , represents the inner-layer learning rate or the learnable update step vector, represents the outer-layer learning rate, represents the cross-entropy loss function, represents the physical consistency regularization term, represents the style-invariant consistency constraint term, represents the supervised contrastive loss function, , and are the weighting coefficients of the corresponding loss terms, denotes the gradient of the model parameters with respect to the model parameters denotes the expectation of all tasks with respect to the model parameters denotes the element-wise multiplication operation between vectors, denotes the inner-layer optimization target loss.
[0007] Preferably, in the step S3, the style-invariant consistency constraint is implemented by a consistency loss function, and the consistency loss function satisfies the relationship: ; The supervised contrastive loss function satisfies the relationship: ; The physical consistency regularization based on the load parameter satisfies the relationship: ; wherein, and respectively represent the intermediate layer feature embeddings extracted by the identification model for two infrared training samples of the same structure and different physical styles and ; denotes the Euclidean distance, denotes the embedding representation of the i-th sample in the identification model, denotes the positive sample set to which the i-th sample belongs, denotes the feature embedding of the sample in the positive sample set , denotes the feature embedding of all samples in the positive sample set , denotes the feature embedding of all samples participating in the loss calculation, denotes the feature similarity function, denotes the temperature coefficient, and respectively represent the prediction confidence of the identification model for the same defect under the load parameters and , and .
[0008] Preferably, the step S4 comprises: when the target domain infrared data has labeled samples, performing fast parameter update on the identification model to obtain adaptive model parameters satisfying the relationship: ; wherein, denotes the initial model parameters, denotes the target domain training sample set, denotes the learnable update step vector, denotes the cross-entropy loss function, denotes the style-invariant consistency constraint term, denotes a weighting coefficient, which, when performing fast parameter updates on the identification model, preferentially acts on the feature normalization layer, conditional modulation layer and classification output layer of the identification model; When the target domain infrared data is unlabeled or weakly labeled, the identification model is adaptively executed during testing, including minimizing the prediction entropy of the model on the target domain infrared data, and aligning and correcting the feature distribution statistics of the source domain and the target domain; At the same time, based on the thermal style parameter estimation result of the target domain infrared data , inverse style transformation compensation is performed on the input data or the internal features of the model; wherein, including emissivity, atmospheric equivalent temperature, atmospheric transmittance, environmental radiation, convolution kernel simulating field of view blur, noise intensity, stripe noise parameters and load parameters.
[0009] Preferably, in step S5, the defect recognition result includes defect category, defect confidence, spatial positioning information and an explainable heat map for visualizing the model decision area; Also included is recording audit information associated with the defect recognition result, the audit information including a set of thermal style parameters estimated from the target domain infrared data in the inference stage , the change value of the normalization layer statistics of the identification model in the adaptive process, and the convergence value of the style-invariant consistency constraint term.
[0010] One of the above technical solutions has the following advantages or beneficial effects: This invention uses an infrared radiative transfer model to perform thermal style parameterization and randomization on physical parameters such as emissivity, atmospheric transmittance, ambient radiation, load, noise, and imaging blur, generating multi-domain training samples that conform to physical laws. This fundamentally overcomes the shortcomings of traditional style transfer methods that ignore radiative transfer characteristics and generate samples lacking physical realism, enabling training data to truly reflect infrared imaging changes under different equipment, environmental, and seasonal conditions. Secondly, the thermal style samples formed by these physical parameter changes are used as meta-learning tasks, employing MAML or Meta-SGD frameworks for inner and outer layer optimization to obtain initial model parameters with cross-domain adaptability. This effectively solves the limitations of traditional meta-learning task partitioning being disconnected from physical reality and unable to cover complex domain drift, giving the model the ability to quickly transfer to new domains. During training, style-invariant consistency constraints and physical consistency regularization based on load parameters are applied to different style samples with the same structure, and supervision is introduced. By contrasting loss, the extracted features remain stable against style perturbations, while ensuring that the model output conforms to the physical mechanism of heat conduction. This effectively avoids the instability and uninterpretability of recognition results caused by ignoring physical laws. When deploying in the target domain, a small number of labeled samples are used to perform rapid adaptive updates, or entropy minimization and feature statistics are used to achieve model self-correction under unlabeled conditions. This significantly alleviates the problem of the sharp performance decline of traditional methods in new environments, enabling plug-and-play engineering deployment capabilities. During the inference phase, defect categories, confidence levels, and visual heatmaps are output simultaneously, and relevant physical style parameters and model statistics are recorded as verification criteria. This effectively fills the gap in the lack of result traceability and auditing mechanisms in existing technologies. Ultimately, a complete technical chain is formed from physical modeling, task construction, constraint optimization to adaptive deployment and result auditing, comprehensively improving the generalization stability, physical interpretability, and engineering reliability of the infrared defect recognition model in cross-domain scenarios. Attached Figure Description
[0011] 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.
[0012] Figure 1 This is a flowchart of an infrared image defect recognition method based on thermal style randomization and meta-learning provided in an embodiment of the present invention. Detailed Implementation
[0013] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0014] In this invention, the terms "comprising," "including," or any other variations thereof are intended to cover a 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 limitation, 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.
[0015] Infrared image defect recognition method based on thermal style randomization and meta-learning, such as Figure 1 As shown, a preferred embodiment of the present invention includes the following steps: S1: Based on the infrared radiative transfer model, the physical parameters affecting the generation of infrared images are thermally styled and randomized to generate infrared training samples with different physical style characteristics; wherein, the physical parameters include emissivity, atmospheric transmittance, ambient radiation, noise, imaging blur and load parameters. It should be noted that the infrared radiative transfer model refers to the mathematical expression describing the complete physical process of infrared radiation energy emitted by a surface target being transmitted through the atmosphere and received by the imaging system. It includes Planck's law of radiation, the law of atmospheric extinction, and the sensor response model. Emissivity ( Atmospheric transmittance (ATR) is the ratio of the surface transmittance of an object to the transmittance of an ideal blackbody, ranging from 0 to 1. It determines the proportion of the target's own thermal radiation in the total radiation. The atmospheric extinction coefficient characterizes the ability of the atmosphere to transmit infrared radiation in a specific wavelength band. With transmission distance Jointly determined, and following the law of exponential decay. Environmental radiation ( Infrared radiation refers to the component of infrared radiation reflected or emitted by the surrounding environment (such as the sky, ground, and buildings) and illuminating the target surface. Noise (specifically including thermal noise) With stripe noise The noise is the random error introduced by the detector during the photoelectric conversion process. Thermal noise follows a Gaussian distribution, and its variance is determined by the noise equivalent temperature difference (…). The striated noise is determined by the convolution kernel, and it manifests as banded artifacts in the image. Imaging blur (due to the convolution kernel) (Simulated) This is a phenomenon of decreased spatial resolution caused by the limited instantaneous field of view of the detector. Load parameters ( This reflects the operating power or thermal load status of the tested equipment, directly affecting the target temperature rise. Thermal style parameterization randomization refers to applying random perturbations that conform to statistical laws to the above physical parameters according to the actual engineering measurement range, so that the infrared image of a single scene is expanded into a physically consistent sample set covering multiple devices, multiple environments, and multiple time periods, thereby constructing a training data distribution containing real domain offset features.
[0016] Understandably, step S1, by elevating traditional data augmentation from pixel-level visual transformation to physical parameter-level radiative transfer simulation, fundamentally overcomes the shortcomings of existing style transfer methods, which neglect the nonlinear physical mechanisms of infrared imaging, leading to unrealistic generated samples and the introduction of artifacts. Specifically, by applying random sampling based on measured ranges to key physical quantities such as emissivity and atmospheric transmittance in the radiative transfer equation, domain changes can be introduced in the temperature-radiative conversion stage rather than the image post-processing stage. This ensures that the generated training samples strictly follow Planck's radiation law and atmospheric attenuation laws, and their grayscale distribution characteristics are statistically consistent with real infrared images acquired across devices and seasons. This modeling approach ensures that the essential thermal characteristics of the defective target (such as temperature difference and gradient) remain relatively stable under different style perturbations, while only surface features such as background noise and contrast change. This allows the model to learn feature representations that are sensitive to physical essence and robust to environmental perturbations, effectively improving the physical basis for cross-domain generalization ability. Meanwhile, the introduction of load parameters enables the model to correlate defect temperature rise with equipment operating status, enhancing the physical consistency between the identification results and the heat conduction mechanism, and avoiding false detections and missed detections caused by changes in environmental parameters.
[0017] S2: Based on the infrared training samples, construct several meta-learning tasks, and use the Model Independent Meta-Learning (MAML) or Learnable Step Size Meta-SGD framework to perform meta-learning training on the recognition model to obtain initial model parameters with cross-domain adaptability. It's important to note that meta-learning tasks refer to a paradigm that decomposes a machine learning problem into multiple sub-tasks for training. Each sub-task contains an independent training set (support set) and a validation set (query set), aiming to simulate scenarios where the model quickly adapts to new environments. Model-independent meta-learning (MAML) is a meta-learning algorithm independent of model architecture. Its goal is to learn a good set of initial parameters through two-layer optimization, allowing the model to quickly adapt to new tasks with only a small number of gradient updates. Learnable step-size meta-learning (Meta-SGD) is an extended variant of MAML, with its core improvement being the fixed learning rate of the inner optimization layer. Expanding to learnable parameter vectors allows each model parameter to have an independent update step size and direction when adapting to new tasks, thereby improving transfer efficiency. The recognition model refers to a deep neural network used for infrared defect detection, which can employ a convolutional neural network (CNN) or a visual transform network (ViT) as the backbone feature extractor, with its output layer connected to a classifier to predict the defect category. Cross-domain adaptability refers to the model's ability to maintain high recognition performance when faced with new devices, new environments, or new time periods with different data distributions than the training data, without retraining or requiring only minimal fine-tuning. Initial model parameters refer to the model weights obtained after meta-learning pre-training. These weights serve as the starting point for subsequent target domain adaptation and have embedded general knowledge from multiple physical style domains.
[0018] Understandably, traditional meta-learning typically constructs tasks based on empirical data partitioning (such as randomly shuffling categories), which struggles to cover the complex domain drift caused by continuous physical parameters in infrared imaging, such as emissivity variations, atmospheric attenuation, and load fluctuations. Step S2 defines each set of thermal style parameters as a task, ensuring that the task distribution aligns with the distribution of real-world domain changes. This allows the meta-learning optimization objective to explicitly target the learning of physical style adaptability. When using the MAML framework for two-layer optimization, the inner layer updates simulate the model's rapid adaptation process in a single scene, while the outer layer updates ensure that the initial parameters have good generalization performance across all style domains. Furthermore, when choosing the Meta-SGD framework, the learnable step size vector can automatically capture the differences in sensitivity of different parameters to style changes. For example, a larger update step size can be assigned to high-level semantic parameters, while a smaller update step size can be assigned to low-level texture parameters, thus allowing for finer control of the adaptation process and significantly improving the flexibility and efficiency of cross-domain transfer of the model.
[0019] S3: During the meta-learning training process, style-invariant consistency constraints and physical consistency regularization based on load parameters are applied to the recognition model; It should be noted that style-invariant consistency constraint refers to a loss function that forces the model to maintain the similarity of feature representations of the same sample under different physical style perturbations. Its mathematical form is usually the Euclidean distance or cosine similarity measure between feature vectors. It aims to eliminate the interference of style changes on the feature space and allow the model to focus on the intrinsic structural information of defects. Physical consistency regularization refers to a constraint term designed based on prior knowledge of infrared thermography to ensure that the model output conforms to the laws of heat conduction. In this invention, it specifically refers to the constraint that the confidence of defect recognition increases monotonically with the load parameter. The physical consistency regularization based on the load parameter penalizes prediction results that violate the monotonicity relationship, enabling the model to learn the temperature rise-load response characteristics that conform to engineering reality. During the meta-learning training process, the parameters of the recognition model are dynamically adjusted in the inner and outer optimization loops. Applying dual constraints at this time can improve cross-domain adaptability while ensuring the physical interpretability of feature representation and the rationality of decision logic.
[0020] Understandably, style-invariant consistency constraints directly affect the feature embedding layer, causing the feature vectors of the same defect under different thermal styles to converge in Euclidean space. This forces the model to extract stable features independent of emissivity changes, atmospheric attenuation, and noise levels. This explicit constraint is stronger than implicit regularization that relies solely on data augmentation, significantly improving feature robustness under small sample conditions. Physical consistency regularization, on the other hand, utilizes the prior linear relationship between load parameters and defect temperature rise to impose monotonicity constraints on the confidence level of the model's predictions. This ensures that the learned decision boundary not only conforms to statistical laws but also follows the physical mechanism of heat conduction. Physical consistency regularization avoids abnormal confidence fluctuations caused by style perturbations, such as misclassifying a defect as high-confidence under low load or decreasing confidence as load increases—situations that violate physical common sense. This enhances the model's reliability and stability in practical engineering deployments.
[0021] S4: Acquire infrared data of the target domain, and based on the initial model parameters, use the infrared data of the target domain to perform fast adaptive adjustment on the recognition model to adjust the model parameters to adapt to the physical style of the target domain; It should be noted that the target domain infrared data refers to infrared image data collected in actual engineering deployments, which differs from the training data source equipment, environment, or time period. The distribution of its physical style parameters deviates from the distribution seen during the meta-learning training phase. The initial model parameters refer to the weight vector obtained after meta-learning training in steps S2 and S3. This parameter already possesses meta-knowledge for cross-domain adaptation and can serve as a starting point for rapid adaptation. Rapid adaptation refers to the process of fine-tuning the model using a small amount of target domain data (labeled or unlabeled) to align its decision boundary with the physical style distribution of the target domain. Its core is an efficient and low-risk parameter adjustment strategy. Physical style refers to the statistical characteristics and visual appearance features of infrared images determined by parameters such as emissivity, atmospheric transmittance, noise level, and load conditions. Adapting to the physical style of the target domain means that the model's feature extraction and classification decisions can correctly interpret the unique imaging conditions of the target domain data.
[0022] Understandably, the inner and outer layer optimization mechanisms of meta-learning optimize the initial parameters. Located in a parameter space sensitive to changes in physical style, the model adapts to the new domain with only minor updates along the gradient direction when faced with target domain data. In scenarios with few labeled samples, freezing the backbone feature extraction layer, fine-tuning only the batch normalization (BN) layer, conditional modulation (FiLM) layer, and classification layer can quickly correct inter-domain statistical differences while preventing overfitting. In unlabeled scenarios, minimizing entropy sharpens the model's predicted distribution, while aligning the feature means and variances of the source and target domains, enabling implicit learning of domain-invariant features without label guidance. Furthermore, combining inverse transformation compensation with estimation of the target domain's hot style parameters can proactively eliminate known physical biases, further improving adaptive efficiency and accuracy, and achieving plug-and-play model capabilities.
[0023] S5: Use the adaptive recognition model to infer the infrared data of the target domain, output the defect recognition result, and simultaneously record the physical style parameter information associated with the defect recognition result.
[0024] It should be noted that the adaptive recognition model refers to the adaptive model parameters after rapid fine-tuning in step S4. This parameter is fully adapted to the physical style distribution of the target domain and possesses stable recognition capabilities in new environments. Inference refers to the process of inputting the infrared image of the target domain into the model and obtaining the prediction result through forward propagation calculation. Defect recognition results include defect category (such as poor contact, insulation aging, overload heating, etc.), defect confidence (a measure of the model's certainty regarding the prediction, usually a probability value between 0 and 1), and spatial location information (the coordinate position of the defect in the image or a region mask). Physical style parameter information refers to the set of key physical quantities that affect the imaging quality of the current infrared image of the target domain, including emissivity. Atmospheric equivalent temperature Atmospheric transmittance Environmental radiation Fuzzy kernel Noise intensity stripe noise parameters and load parameters These parameters can serve as the basis for result traceability and model auditing.
[0025] Understandably, synchronously recording physical style parameters and recognition results allows each detection decision to be correlated with the imaging conditions at the time. Engineers can compare recognition results under different style parameters to verify whether the model is overly sensitive to specific environmental parameters, thereby assessing the model's robustness. Introducing visual heatmaps such as Grad-CAM can intuitively display the image regions upon which the model's decisions are based, facilitating expert review of the rationality of defect localization and avoiding waste of maintenance resources due to model misjudgments. Storing internal state information such as batch normalized statistics and consistency loss convergence values provides data support for subsequent model performance degradation analysis. For example, when the consistency loss of a certain target domain consistently exceeds a threshold, model retraining or manual intervention can be triggered, forming a closed-loop quality control system. This auditing mechanism transforms infrared defect recognition from black-box prediction to white-box decision-making, greatly improving its credibility and acceptability in industrial applications.
[0026] Preferably, thermal style parameter randomization includes: Step S11: Set the emitted radiance of the target object. Satisfying the relation: ; Step S12: Emitted radiance Radiance reaching the detector after atmospheric transmission Satisfying the relation: ; Step S13: Radiance Camera calibration mapping function Convert to grayscale value ; By randomly sampling and perturbing the physical parameters in steps S11-S13, infrared training samples with physical style variations are generated. The following relation is satisfied: ; The temperature of the target area is modeled based on load changes, and the temperature update satisfies the following relationship: ; in, Indicates the emissivity of the target surface. Indicates the target surface temperature The relevant Planck radiation function, Indicates environmental radiation. Indicates the effect of propagation distance Varying atmospheric transmittance, Indicates the equivalent atmospheric temperature. This represents the convolution kernel used to simulate field blur. This indicates that the expression follows a pattern with a mean of zero and a variance of . Gaussian distributed thermal noise Indicates the stripe noise parameters Controlled stripe noise disturbance term, and These represent the reference load and the random sampled load in the load parameters, respectively. and These represent the target area temperatures under the corresponding loads. The thermal response coefficient is greater than zero.
[0027] It should be noted that the Planck radiation function It is a nonlinear function describing the relationship between the radiative exitance of a blackbody and temperature within a specific wavelength band. In the infrared band, it is usually calculated using a narrowband approximation or a band integral form. Its value increases exponentially with increasing temperature T, and it is the core physical basis for quantitative infrared imaging radiation. (Environmental radiation) This is the total amount of external infrared radiation received by the target surface, including background radiation from the sky, ground-reflected radiation, and thermal radiation from surrounding equipment. Its value directly affects the apparent radiance of the target, especially contributing significantly to targets with high reflectivity. Atmospheric transmittance. Follows the law of exponential decay ,in The atmospheric extinction coefficient is determined by the absorption and scattering characteristics of water vapor, carbon dioxide, and suspended particles in the atmosphere. The transmission path length is a parameter that characterizes the degree of attenuation of radiant energy during atmospheric transmission. The equivalent atmospheric temperature is... This is the equivalent blackbody temperature describing atmospheric path radiation, used to quantify the contribution of thermal radiation emitted by the atmosphere itself to the signal received by the detector. This value increases significantly under hazy or high humidity conditions. (Fuzzy kernel) This is a convolution kernel that simulates the spatial blurring effect caused by the finite instantaneous field of view (IFOV) of the detector. It typically uses a two-dimensional Gaussian function, whose standard deviation is related to the detector pixel size and the focal length of the optical system. The convolution operation achieves the smoothing effect of the point spread function on the ideal image. (Stripe noise) Linear artifacts are caused by non-uniformity in the detector readout circuit or by the integration effect of time delay. Their parameters are... The direction, frequency, and amplitude of the stripes are controlled, typically modeled as a superposition of a sine function or sawtooth wave function and an image matrix. Thermal response coefficient. It is a physical parameter characterizing the rate of temperature rise in the target area with load change. Its value depends on the heat capacity of the equipment material, heat dissipation conditions and defect thermal resistance. In defects of metallic conductors, this coefficient is usually positive and proportional to the square of the current.
[0028] Understandably, by establishing a complete physical link equation from target surface radiation, atmospheric transmission to camera response, and applying random perturbations to key parameters within this link, the technical problem of traditional data augmentation methods lacking physical realism in generated samples due to their detachment from the radiative transmission mechanism is fundamentally solved. Specifically, steps S11-S13 construct a radiative transmission model consistent with the essence of infrared imaging. The nonlinear temperature-radiative conversion relationship of the Planck function ensures the quantitative accuracy of defect temperature rise and image grayscale changes. The atmospheric transmission equation introduces the physical effects of distance attenuation and path radiation, while camera calibration mapping simulates the detector's photoelectric conversion and quantization encoding process. Based on this, by randomly sampling parameters such as emissivity and atmospheric transmittance and applying perturbations at the front end of the radiative link instead of directly transforming them in the image pixel domain, the generated samples... This naturally follows the physical laws of infrared imaging, avoiding artifacts and structural distortions common in style transfer methods. Load-temperature model Furthermore, by incorporating the equipment operating status into the randomization framework, the generated samples not only simulate environmental changes but also realistically reflect the differences in thermal response under different load conditions. This comprehensively covers domain drift scenarios in actual engineering, providing a physically consistent and diverse source of tasks for subsequent meta-learning.
[0029] Preferably, constructing several meta-learning tasks based on the infrared training samples includes: Each set of randomized thermal style parameters, along with its corresponding infrared training samples and defect labels, is divided into a meta-learning task. and in The inner part is further divided into support sets. With query set ; Meta-learning training of the recognition model includes inner-layer and outer-layer update processes, where: For each task Based on the support set Perform inner layer updates to obtain task-specific parameters. The following relation is satisfied: ; In all tasks On the query set, based on the task-specific parameters Calculate the outer layer loss and update the global model parameters. The following relation is satisfied: ; When using the Meta-SGD framework, the inner layer learning rate is... Given a learnable parameter vector, the corresponding inner layer update satisfies the following relation: ; in, This represents the global parameters of the recognition model. Indicates the task Updated task-specific parameters, This represents the inner learning rate or learnable update step size vector. Indicates the outer learning rate. Represents the cross-entropy loss function. This represents a physically consistent regularization term. This indicates a style-invariant consistency constraint. This represents the supervised contrastive loss function. , and These are the weighting coefficients for the corresponding loss terms. Indicates the model parameters Find the gradient. This indicates all tasks Seeking expectations, This represents the element-wise multiplication operation between vectors. This represents the inner layer optimization objective loss.
[0030] It should be noted that the task-specific parameters This refers to optimizing the inner layers of meta-learning from global parameters. Departure, targeting a specific hot style task The temporary model parameters obtained after a small number of gradient updates, while performing better on the current task, are not yet fixed into the global parameters. Their role is to provide a performance evaluation benchmark for the outer optimization under this task. Inner layer updates and outer double-layer updates are the core mechanisms of meta-learning. Inner layer updates simulate the model's rapid adaptation process in a single scenario, while outer layer updates optimize the initial values of the global parameters based on the results of all inner layer updates, enabling it to possess meta-knowledge that can be quickly transferred across tasks. Global model parameters It is a shared parameter vector that runs throughout the entire meta-learning training process, storing the model's weights and biases. After training, it serves as the initial model parameters for subsequent deployment. Inner learning rate. With outermost learning rate Control the step size of the inner and outer layers respectively, where The magnitude of parameter adjustment along the gradient direction is determined in the inner layer update. The outer layer update controls the speed at which global parameters converge to the optimal initial point across tasks. Weighting coefficients. , and These are hyperparameters used to balance the contributions of different loss terms. By adjusting these coefficients, the relative importance of physical consistency, style stability, and class separability in the total loss can be controlled. Element-wise multiplication. This refers to the element-wise multiplication of corresponding positions of two vectors of the same dimension. The Meta-SGD framework utilizes this operation to implement personalized update steps for each parameter dimension. (Expected outcome) It is a statistical average of the losses from all meta-learning tasks, ensuring that the outer optimization objective takes into account the overall task distribution rather than being optimal for a single task. The inner optimization objective loss... It is a weighted sum of cross-entropy loss on the support set, physical regularization and consistency constraints, which constitutes the complete optimization objective of the inner update.
[0031] Understandably, by organizing multi-domain samples generated through thermal style parameterization and randomization into a task set and employing a two-layer optimization framework for training, the problem of weak generalization ability and the need for extensive retraining in new environments caused by single-domain training in traditional deep learning is fundamentally solved. Specifically, the data corresponding to each set of physical style parameters is treated as an independent task, ensuring that the task distribution aligns with the distribution of changes in the real domain. The inner layer update simulates the rapid adaptation process in the field on the support set of this task, through computation... , and The joint gradient enables the model to quickly fit the current style while maintaining physical consistency and style stability; the outer update aggregates the expected loss across all task query sets, through... Calculate the global parameter update direction to ensure initial parameters Good performance can be achieved on any new task with only a few updates. When using Meta-SGD, a fixed learning rate is used. Extending to learnable vectors enables the model to automatically learn the sensitivity of different parameter dimensions to style changes. For example, a larger stride is assigned to the weights of the classification layer to quickly adjust the decision boundary, while a smaller stride is assigned to the lower-level convolutional kernels to maintain general feature extraction capabilities. This personalized update mechanism significantly improves the granularity and efficiency of cross-domain adaptation. Supervised contrastive loss The outer layer optimization enhances the clustering of similar samples and the separation of dissimilar samples on the query set, avoiding the blurring of category boundaries caused by style perturbation, thereby constructing a style-robust and category-separable feature space.
[0032] Preferably, in step S3, the style-invariant consistency constraint is implemented through a consistency loss function. Satisfying the relation: ; The supervised comparison loss function Satisfying the relation: ; The physical consistency regularization based on load parameters Satisfying the relation: ; in, and These represent the recognition model's recognition of two infrared training samples with the same structure but different physical styles. and The extracted intermediate layer features are embedded. Represents Euclidean distance. Indicates the first The embedding representation of each sample in the recognition model Indicates the relationship with the first A set of positive samples belonging to the same category. Represents the set of positive samples Feature embedding of mid-samples This represents the feature embedding of all samples involved in the loss calculation. Represents the feature similarity function. Indicates the temperature coefficient. and These represent the load parameters respectively. and The prediction confidence of the identification model for the same defect described below, and .
[0033] It should be noted that the intermediate layer feature embedding Euclidean distance refers to the high-dimensional vector representation output of the convolutional or fully connected layers preceding the classification layer in a recognition model. Its dimensions are typically 512 or 1024. This vector encodes the abstract semantic information of the input image. Under style-invariant consistency constraints, by forcing different style versions of the same sample to have similar output vectors at this layer, the model can ignore style perturbations and preserve the structural essence. It is the L2 norm for calculating the linear distance between two vectors. Its squared form provides a smooth optimization gradient in the loss function, causing style difference features of the same sample to cluster together in the vector space. Supervised contrastive loss function positive sample set in This refers to the same training batch, and the first... A set of indices for all other samples of the same defect category, dynamically constructed within each batch of data. This set maximizes the similarity between samples of the same category, ensuring the feature space maintains class discriminative power under style variations. Feature similarity function. Cosine similarity can be used for calculation, with a value range of [-1, 1]. In contrastive learning, it can eliminate the influence of vector magnitude and focus on directional consistency. Temperature coefficient. It is a hyperparameter for scaling similarity scores, and a smaller one... Values (such as 0.07) will make the softmax distribution sharper, strengthening the distinction between the hardest negative samples. Larger values... The value makes the distribution smoother, which helps stabilize convergence in the early stages of training. Prediction confidence It is the probability output of the identification model for the existence of defects. It is usually the probability value of the defect category after softmax. The physical consistency regularity constrains the confidence level to remain monotonically unchanged with the load through monotonicity constraint, ensuring that the model decision conforms to the thermodynamic laws. The function represents taking the larger value between x and 0. The system implements a hinge-loss-style penalty, which only generates gradient backpropagation when the confidence level violates monotonicity, thus avoiding imposing unnecessary constraints on predictions that conform to physical laws.
[0034] Understandably, by explicitly defining the mathematical forms of the three regularization terms, a triple constraint system of style stability, class separability, and physical consistency is formed during the meta-learning training process. This fundamentally solves the cross-domain performance degradation and uninterpretable decision-making problems caused by overfitting the training domain style in deep models. Specifically, consistency loss... By directly constraining style differences within the same sample in the feature embedding space, the gradient forces the model to adjust the convolution kernel weights, making the feature responses under different emissivity, atmospheric transmittance, or noise levels tend to be consistent. This explicit alignment is more robust than implicit regularization that relies on data augmentation, especially in suppressing overfitting under small sample conditions. Supervised contrastive loss By constructing dynamic positive and negative sample pairs within a batch, cross-style category boundaries are strengthened on the query set. The principle is to use diverse samples generated by style randomization as a supplement, allowing similar defects to form compact clusters under different styles, while dissimilar clusters are separated by a temperature coefficient in the cosine similarity space. The softmax boundary of the regulation is clearly separated, thus avoiding category confusion caused by style perturbations. Physically consistent regularization. By directly embedding the load-confidence monotonicity prior into the loss function, its hinge-loss form activates the penalty only when the prediction violates physical laws, guiding the model to learn decision logic that conforms to the heat conduction mechanism, such as in the case of load... The confidence level is 0.75, and the load is... The confidence level is 0.90 at this time. If noise interference causes the confidence score to reverse, a penalty gradient correction model is immediately generated. This mechanism makes the model output have engineering credibility. The triple loss works synergistically to constrain the rapid adaptation direction of task-specific parameters in the inner layer update of meta-learning, and to optimize the generalization properties of global initial parameters in the outer layer update, ultimately enabling the model to have both cross-domain stability and physical interpretability.
[0035] Preferably, step S4 includes: When labeled samples exist in the infrared data of the target domain, a fast parameter update is performed on the recognition model to obtain adaptive model parameters. The following relation is satisfied: ; in, This represents the initial model parameters. This represents the training sample set for the target domain. This represents the learnable update step vector. Represents the cross-entropy loss function. This represents the style-invariant consistency constraint. express The weighting coefficients are preferentially applied to the feature normalization layer, conditional modulation layer, and classification output layer of the recognition model when performing fast parameter updates on the recognition model. When the infrared data in the target domain is unlabeled or weakly labeled, the identification model is tested adaptively, including minimizing the prediction entropy of the model on the infrared data in the target domain and aligning and correcting the feature distribution statistics of the source domain and the target domain. Meanwhile, based on the thermal style parameter estimation results of the target domain infrared data... Inverse style transformation compensation is performed on the input data or features within the model. in, This includes emissivity, atmospheric equivalent temperature, atmospheric transmittance, environmental radiation, convolution kernel for simulated field blur, noise intensity, stripe noise parameters, and load parameters.
[0036] It should be noted that the adaptive model parameters This refers to the final model weights after rapid fine-tuning in the target domain. While retaining general knowledge from the source domain, this parameter is locally adjusted for the physical style of the target domain, aligning its decision function with the target data distribution. Learnable update step size vector. It is an extension of the Meta-SGD framework in the adaptive phase, with its dimensions and model parameters... Similarly, each element independently controls the update magnitude of its corresponding parameters, learned online using a small amount of target domain data, enabling fine-tuning at the parameter level rather than a uniform learning rate. The Batch Normalization layer is a layer in deep networks used to standardize the distribution of intermediate features. Its mean and variance statistics directly reflect the data style characteristics. Prioritizing adjustment of this layer in fast adaptation can effectively correct inter-domain statistical differences without modifying the underlying feature extractor. The Conditional Modulation (FiLM) layer is a module that dynamically adjusts the feature response through affine transformation, predicting scaling and shift coefficients from style parameters. Fine-tuning this layer in adaptation allows the feature extraction process to proactively adapt to the target style. The classification output layer is the last fully connected layer of the model; including it in the priority adjustment range can quickly reshape the decision boundary to adapt to the class distribution shift in the target domain. Test-time adaptation refers to the technique of dynamically adjusting model parameters during the inference phase using unlabeled test data after model deployment, achieving online domain adaptation without manual labeling. Prediction entropy is an indicator in information theory that measures the uncertainty of probability distribution; minimizing the entropy value... This allows the model to make its predictions of the target domain data more sharply and concentrated, thus implicitly learning domain-invariant features. Feature distribution statistic alignment refers to calculating the mean of the intermediate layer features between the source and target domains. With variance Furthermore, by constraining the two to be close through L2 loss or maximum mean difference (MMD), feature shifts caused by changes in environmental parameters are eliminated. Inverse style transformation compensation refers to compensating for the estimated target domain thermal style parameters. Apply mathematical transformations to the input image or feature level that are opposite to the S1 generation process, such as subtracting the estimated environmental radiation component, dividing by atmospheric transmittance, or deconvolution blur kernel, to actively eliminate known physical biases and make the data distribution return to the source domain space.
[0037] Understandably, by designing two fast adaptive modes—labeled and unlabeled—and combining efficient parameter updates and inverse style compensation strategies, the performance degradation problem of meta-learning pre-trained models in actual deployment due to unknown physical style of the target domain or scarce labels is systematically solved. Specifically, when there are a few labeled samples in the target domain, by updating only the normalization layer, conditional modulation layer, and classification layer, the backbone feature extractor is frozen while retaining the general knowledge of the source domain. This efficient parameter fine-tuning strategy can quickly correct statistics and decision boundaries by modifying only layers accounting for less than 5% of the total parameters, avoiding the catastrophic overfitting of full parameter updates on small data. The learnable nature of the model allows each parameter to obtain an optimal step size. For example, a larger step size is assigned to the weights of the classification layer to quickly adapt to new class distributions, while a smaller step size is assigned to the statistics of the BN layer to ensure stable convergence. When the target domain is unlabeled, the test-time adaptive model minimizes entropy to make the model's predictions of the target samples tend from a uniform distribution to a deterministic distribution, forcing the model to actively explore the intrinsic structure of the target domain. Meanwhile, feature statistics alignment achieves unsupervised distribution matching by constraining the mean and variance of the features in the source and target domains to be consistent. The combination of these two methods can effectively mitigate domain shift without the need for manual labeling. Inverse style transformation compensation utilizes the values estimated in the S4 stage. Parameters are used to actively perform physical bias correction on the target domain data, for example, when estimating the atmospheric transmittance of the target domain. When the image grayscale value is below the source domain, perform [further processing]. Linear stretching compensation, or in estimating the fuzzy kernel Wiener deconvolution is performed in real time. This combination of explicit physical compensation and implicit parameter fine-tuning greatly improves the efficiency and accuracy of adaptive processing, enabling truly plug-and-play deployment.
[0038] Preferably, in step S5, the defect identification result includes defect category, defect confidence level, spatial location information, and an interpretability heatmap for visualizing the decision region of the model; It also includes recording audit information associated with the defect identification results, the audit information including a set of thermal style parameters estimated from the target domain infrared data during the inference phase. The changes in the normalized layer statistics of the recognition model during the adaptive process, and the convergence value of the style invariant consistency constraint term.
[0039] It should be noted that the defect category is the defect type label identified by the recognition model for abnormal areas in the infrared image, such as poor contact, insulation degradation, overload overheating, etc. Its output is a discrete classification result, directly guiding maintenance personnel's repair decisions. The defect confidence score is the model's degree of certainty regarding its prediction of the current defect category, typically taken as the probability value output by the softmax function, ranging from 0 to 1. This value reflects the reliability of the model's judgment; if it falls below a preset threshold, a manual review mechanism can be triggered to avoid resource waste due to misjudgments. Spatial location information refers to the geometric location description of the defect in the infrared image, which can be expressed using bounding box coordinates. Precise localization, using either pixel-level segmentation masks or other methods, helps maintenance personnel quickly locate fault points and shorten repair time. Interpretable heatmaps are visualizations generated based on Grad-weighted Class Activation Maps (Grad-CAM) or attention mappings. By weighting the classification layer weights and the feature map of the last convolutional layer, they highlight key regions upon which the model's decisions are based, making the focus of the black-box model transparent and facilitating expert verification of the detection's rationality. Audit information consists of structured data records used for result traceability and model performance evaluation, including a set of hotspot style parameters. The data includes physical parameters such as emissivity, atmospheric transmittance, and noise level of the target domain at the inference time. These parameters reveal the imaging environment conditions and provide a basis for result reproduction and bias analysis. The change in the normalized layer statistics refers to the difference between the running mean and variance of the batch normalized layer before and after target domain adaptation. This change quantifies the degree of domain shift. When the change exceeds an empirical threshold, it indicates that the model may be facing unseen extreme styles, requiring retraining or manual intervention. The consistency constraint convergence value is the style-invariant consistency loss. The final value at the end of the adaptive iteration reflects the stability of the model to style perturbations in the target domain. The smaller the convergence value, the stronger the model's style robustness in that domain, and it can be used as a continuous monitoring indicator after the model is deployed.
[0040] Understandably, by simultaneously outputting defect identification results and multi-dimensional audit information during the inference phase, this system systematically solves the problems of difficulty in verification, accountability, and continuous optimization caused by the lack of traceability and transparency in the process of existing infrared defect identification technologies in engineering applications. Specifically, the direct output of defect category, confidence level, and spatial location meets the basic information needs of on-site operation and maintenance. The generation of interpretable heatmaps visualizes the model's area of interest through Grad-CAM technology, enabling engineers to intuitively determine whether the model is focusing on real defect hotspots rather than background noise or artifacts. This mechanism effectively avoids invalid maintenance due to model misjudgment and improves decision-making credibility. The recording of audit information constructs a complete chain of evidence, including the thermal style parameter set. The system records the physical environment context for each detection. When an anomaly is detected, engineers can compare style parameters with historical data to determine whether the anomaly is caused by extreme weather, equipment aging, or imaging system malfunction, rather than model failure. The normalized layer statistics provide a quantitative indicator of the model's internal state transitions. If the statistics for a target domain consistently exceed the maximum range observed during training, the system automatically triggers an alert, indicating that the domain may exceed the model's generalization ability and requiring data collection to augment the training set. The consistency constraint convergence value directly reflects the model's style stability in the target domain. If this value remains consistently high, it indicates that the model is sensitive to current imaging conditions, requiring further strengthening of regularization or adjustment of the adaptive strategy. This design, which bundles the recognition results, physical parameters, and model internal states into the output, upgrades infrared defect recognition from a single prediction function to a complete system encompassing performance monitoring, fault diagnosis, and continuous learning capabilities, meeting the stringent requirements of industrial applications for safety, maintainability, and compliance.
[0041] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0042] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A defect recognition method for infrared images based on thermal style randomization and meta-learning, characterized in that, Includes the following steps: S1: Based on the infrared radiative transfer model, the physical parameters affecting the generation of infrared images are thermally styled and randomized to generate infrared training samples with different physical style characteristics; wherein, the physical parameters include emissivity, atmospheric transmittance, ambient radiation, noise, imaging blur and load parameters. S2: Based on the infrared training samples, construct several meta-learning tasks, and use the Model Independent Meta-Learning (MAML) or Learnable Step Size Meta-SGD framework to perform meta-learning training on the recognition model to obtain initial model parameters with cross-domain adaptability. S3: During the meta-learning training process, style-invariant consistency constraints and physical consistency regularization based on load parameters are applied to the recognition model; S4: Acquire infrared data of the target domain, and based on the initial model parameters, use the infrared data of the target domain to perform fast adaptive adjustment on the recognition model to adjust the model parameters to adapt to the physical style of the target domain; S5: Use the adaptive recognition model to infer the infrared data of the target domain, output the defect recognition result, and simultaneously record the physical style parameter information associated with the defect recognition result.
2. The infrared image defect recognition method based on thermal style randomization and meta-learning according to claim 1, characterized in that, Hot style parameterization randomization includes: Step S11: Set the emitted radiance of the target object. Satisfying the relation: ; Step S12: Emitted radiance Radiance reaching the detector after atmospheric transmission Satisfying the relation: ; Step S13: Radiance Camera calibration mapping function Convert to grayscale value ; By randomly sampling and perturbing the physical parameters in steps S11-S13, infrared training samples with physical style variations are generated. The following relation is satisfied: ; The temperature of the target area is modeled based on load changes, and the temperature update satisfies the following relationship: ; in, Indicates the emissivity of the target surface. Indicates the target surface temperature The relevant Planck radiation function, Indicates environmental radiation. Indicates the effect of propagation distance Varying atmospheric transmittance, Indicates the equivalent atmospheric temperature. This represents the convolution kernel used to simulate field blur. This indicates that the expression follows a pattern with a mean of zero and a variance of . Gaussian distributed thermal noise Indicates the stripe noise parameters Controlled stripe noise disturbance term, and These represent the reference load and the random sampled load in the load parameters, respectively. and These represent the target area temperatures under the corresponding loads. The thermal response coefficient is greater than zero.
3. The infrared image defect recognition method based on thermal style randomization and meta-learning according to claim 1, characterized in that, Several meta-learning tasks are constructed based on the infrared training samples, including: Each set of randomized thermal style parameters, along with its corresponding infrared training samples and defect labels, is divided into a meta-learning task. and in The inner part is further divided into support sets. With query set ; Meta-learning training of the recognition model includes inner-layer and outer-layer update processes, where: For each task Based on the support set Perform inner layer updates to obtain task-specific parameters. The following relation is satisfied: ; In all tasks On the query set, based on the task-specific parameters Calculate the outer layer loss and update the global model parameters. The following relation is satisfied: ; When using the Meta-SGD framework, the inner layer learning rate is... Given a learnable parameter vector, the corresponding inner layer update satisfies the following relation: ; in, This represents the global parameters of the recognition model. Indicates the task Updated task-specific parameters, This represents the inner learning rate or learnable update step size vector. Indicates the outer learning rate. Represents the cross-entropy loss function. This represents a physically consistent regularization term. This indicates a style-invariant consistency constraint. This represents the supervised contrastive loss function. , and These are the weighting coefficients for the corresponding loss terms. Indicates the model parameters Find the gradient. This indicates all tasks Seeking expectations, This represents the element-wise multiplication operation between vectors. This represents the inner layer optimization objective loss.
4. The infrared image defect recognition method based on thermal style randomization and meta-learning according to claim 3, characterized in that, In step S3, the style-invariant consistency constraint is implemented through a consistency loss function. Satisfying the relation: ; The supervised comparison loss function Satisfying the relation: ; The physical consistency regularization based on load parameters Satisfying the relation: ; in, and These represent the recognition model's recognition of two infrared training samples with the same structure but different physical styles. and The extracted intermediate layer features are embedded. Represents Euclidean distance. Indicates the first The embedding representation of each sample in the recognition model Indicates the relationship with the first A set of positive samples belonging to the same category. Represents the set of positive samples Feature embedding of mid-samples This represents the feature embedding of all samples involved in the loss calculation. Represents the feature similarity function. Indicates the temperature coefficient. and These represent the load parameters respectively. and The prediction confidence of the identification model for the same defect described below, and .
5. The infrared image defect recognition method based on thermal style randomization and meta-learning according to claim 1, characterized in that, Step S4 includes: When labeled samples exist in the infrared data of the target domain, a fast parameter update is performed on the recognition model to obtain adaptive model parameters. The following relation is satisfied: ; in, This represents the initial model parameters. This represents the training sample set for the target domain. This represents the learnable update step vector. Represents the cross-entropy loss function. This represents the style-invariant consistency constraint. express The weighting coefficients are preferentially applied to the feature normalization layer, conditional modulation layer, and classification output layer of the recognition model when performing fast parameter updates on the recognition model. When the infrared data in the target domain is unlabeled or weakly labeled, the identification model is tested adaptively, including minimizing the prediction entropy of the model on the infrared data in the target domain and aligning and correcting the feature distribution statistics of the source domain and the target domain. Meanwhile, based on the thermal style parameter estimation results of the target domain infrared data... Inverse style transformation compensation is performed on the input data or features within the model. in, This includes emissivity, atmospheric equivalent temperature, atmospheric transmittance, environmental radiation, convolution kernel for simulated field blur, noise intensity, stripe noise parameters, and load parameters.
6. The infrared image defect recognition method based on thermal style randomization and meta-learning according to claim 1, characterized in that, In step S5, the defect identification result includes defect category, defect confidence level, spatial location information, and an interpretability heatmap for visualizing the decision region of the model; It also includes recording audit information associated with the defect identification results, the audit information including a set of thermal style parameters estimated from the target domain infrared data during the inference phase. The changes in the normalized layer statistics of the recognition model during the adaptive process, and the convergence value of the style invariant consistency constraint term.