Visual detection method for powder particle foreign matters in high-pressure aluminum pipe
Through physical model-driven image enhancement and spatiotemporal attention feature extraction network STAF-Net, combined with a small sample adaptive classifier, the problems of low accuracy and poor anti-interference ability in powder particle foreign body detection inside high-pressure aluminum pipes are solved, efficient multimodal information fusion and small sample learning are achieved, and the accuracy and adaptability of detection are improved.
Patent Information
- Application Number
- CN202510715208.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies for detecting powder particle foreign matter inside high-pressure aluminum pipes have problems such as low detection accuracy, poor anti-interference ability, and a narrow scope of application. In particular, it is difficult to achieve effective learning and generalization under dynamic detection and small sample conditions.
A physical model-driven image enhancement module is used to remove reflection interference, and the spatiotemporal attention feature extraction network STAF-Net is combined to fuse multimodal information. A small sample adaptive foreign object classifier is used for detection, and the generative adversarial network GAN is used to generate data and the meta-learning algorithm MAML is used to optimize model parameters.
It achieves real-time and accurate identification of powder particle foreign objects inside high-pressure aluminum tubes, improves detection accuracy and robustness, and significantly enhances adaptability and generalization performance under small sample conditions.
Smart Images

Figure BDA0005428049810000021 
Figure BDA0005428049810000051 
Figure FDA0005428049800000021
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision and industrial inspection technology, specifically targeting the intelligent detection of powdery and granular foreign matter inside high-voltage electrical aluminum pipes used in power transmission and transformation equipment. This system is primarily used in aluminum pipes in key locations such as high-voltage gas-insulated switchgear (GIS) in power systems. By real-time monitoring and accurate identification of foreign matter inside the pipes, it ensures the safe and stable operation of power equipment and prevents equipment failures and power outages caused by foreign matter. Background Art
[0002] Current aluminum pipe foreign body detection technology faces many challenges:
[0003] 1. Static defect detection: Existing detection algorithms (such as CN119131012A) mostly focus on the identification of static surface defects. When faced with dynamically flowing powder particle foreign matter, due to its rapidly changing shape and position, traditional algorithms have difficulty in accurately capturing and identifying it, resulting in a significant decrease in detection accuracy.
[0004] 2. Reflection Interference: The inner wall of aluminum tubes is highly reflective. Under complex lighting conditions, traditional image preprocessing methods (such as multi-angle oblique light sources) are easily interfered with by reflected light, obscuring or misjudging foreign object features in the image, resulting in a serious lack of robustness. For example, in actual inspections, the false alarm rate due to reflected light can reach over 30%, seriously affecting the reliability of detection results.
[0005] 3. Single feature: Most existing patents rely solely on single-modal data for detection, such as visible light images (CN222014072U) or vibration signals, ignoring the differences and complementarities in the features of foreign objects across different modalities. This single-modal detection approach fails to fully utilize multi-scale spatiotemporal information, limiting improvements in detection accuracy.
[0006] 4. Insufficient learning with small samples: Due to the complex environment and difficulty in data collection inside high-pressure aluminum tubes, available labeled data is extremely limited. Existing deep learning models (such as the CNN in CN119360202A) typically rely on large amounts of labeled data for training, making it difficult to achieve effective learning and generalization under small sample conditions, limiting their applicability in real-world industrial scenarios. Summary of the Invention
[0007] The purpose of the present invention is to provide a method for visually detecting foreign matter in powder particles inside a high-pressure aluminum tube, so as to solve the technical problems of low detection accuracy, poor anti-interference ability and narrow application range in the prior art. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows: a method for visually detecting foreign matter in powder particles inside a high-pressure aluminum tube,
[0008] The original image is preprocessed through the image enhancement module driven by the physical model to remove reflection interference and enhance the features of foreign objects to obtain the enhanced image sequence;
[0009] The spatiotemporal attention feature extraction network STAF-Net is used to extract features from the enhanced image sequence, integrating information from spatial and temporal dimensions to capture the dynamic characteristics of foreign objects.
[0010] The dynamic characteristics of the extracted foreign matter are detected by a small sample adaptive foreign matter classifier, thereby realizing the visual detection of powder particle foreign matter inside the high-pressure aluminum tube.
[0011] Preferably, the removal of reflection interference and enhancement of foreign body characteristics include:
[0012] 1.1) Reflection separation model:
[0013] A bidirectional reflectance distribution function (BRDF) model of the aluminum tube surface is established. By calibrating the reflection parameters of the aluminum material, the specular reflection and diffuse reflection components are separated. The specific model formula is:
[0014] 1.2) Dynamic lighting compensation:
[0015] A ring-shaped LED array is deployed, and a dual-band light source is used to make the enhanced metal powder stand out in the image and obtain a clear image. Combined with pulse synchronous exposure technology, a method for adaptively adjusting the light source intensity is proposed, which dynamically adjusts the light source intensity according to the image grayscale variance \(\Delta G\).
[0016] Preferably, in the above 1.1), the formula of the bidirectional reflectance distribution function BRDF model of the aluminum tube surface is:
[0017] L o (θ o )=∫Ωf r (θ i ,θ o )L i (θ i )cosθ i dω i
[0018] Among them, L o (θ o ) represents the intensity of reflected light in the observation direction, ∫Ωf r (θ i ,θ o ) is the reflectivity function, L i (θ i ) is the incident light intensity, θ i and θ o are the incident angle and observation angle, respectively.
[0019] Preferably, in 1.2), the dual-band light source is a 405nm and 850nm dual-band light source. The 405nm band is used to enhance the reflective properties of the metal powder, making it stand out in the image; and the 850nm infrared band with strong penetrating ability is used to penetrate dust interference and obtain a clear image.
[0020] Preferably, in 1.2), the formula for dynamically adjusting the light source intensity according to the image grayscale variance \(\Delta G\) is:
[0021]
[0022] Among them, ΔG is the image grayscale variance, and k is the calibration coefficient.
[0023] Preferably, the construction method of the spatiotemporal attention fusion network STAF-Net is:
[0024] 2.1) Input layer:
[0025] The input layer includes a 30-frame-per-second time-series image sequence and synchronously acquired inertial measurement unit (IMU) data. The IMU data is used to perform motion compensation on the image sequence to eliminate image blur and jitter caused by flow in the pipeline or robot motion.
[0026] 2.2) Feature Extraction
[0027] Spatial branch: The spatial branch uses an improved ResNet-50 architecture and embeds a deformable convolution module. Deformable convolution can adaptively adjust the shape and position of the convolution kernel to adapt to the irregular deformation of foreign objects. Deformable convolution can flexibly extract the edge and texture features of foreign objects, effectively dealing with various posture changes of foreign objects in the image.
[0028] Temporal branch: The temporal branch uses a 3D convolutional layer to extract inter-frame optical flow features, capturing the motion trajectory of foreign objects in time-series images. Combined with the Transformer self-attention mechanism, it captures the dependencies of foreign objects in long-range time series, enhancing understanding of their dynamic behavior. The temporal branch can identify the instantaneous position and shape of foreign objects and analyze their motion trends and speed changes.
[0029] 2.3) Feature Fusion:
[0030] The dynamic weight allocation module DWA is used to concatenate and process the spatial features F_{spa}\ and the temporal features F_{temp}\ through a multi-layer perceptron MLP. The output values are then normalized to the range (0, 1) using the Sigmoid function σ to obtain the dynamic weights w_{spa / temp) of the spatial and temporal features.
[0031] 2.4) Network training:
[0032] The present invention adopts an end-to-end training method and optimizes network parameters through the back-propagation algorithm; adopts data enhancement technology, including random cropping, rotation, and flipping operations, to expand the training data; and introduces Dropout and BatchNormalization technologies to prevent network overfitting.
[0033] Preferably, in the above 2.3), the dynamic weight w_{spa / temp) of the spatial and temporal features is calculated as follows:
[0034]
[0035] in, Represents the feature splicing operation; through dynamic weight allocation, the network can adaptively adjust the importance of spatial and temporal features in the fusion process according to the characteristics of the current input data, capture the multimodal characteristics of foreign objects, and output multi-scale fusion feature maps covering multiple resolutions from 1 / 8 to 1 / 32 of the original image size, providing feature information for subsequent classifiers.
[0036] Preferably, the small and medium sample adaptive foreign body classifier is specifically:
[0037] 3.1.) Data Generation:
[0038] Because data on the interior of high-pressure aluminum tubes is difficult to obtain, a method based on a generative adversarial network (GAN) was used to synthesize images of foreign objects inside the tubes. The generator inputs include physical simulation parameters, which are used to generate foreign object images that are highly similar to the actual scene. Spectral normalization (SN) technology was introduced into the discriminator to suppress gradient explosion and mode collapse problems during training.
[0039] 3.2) Meta-learning framework:
[0040] The model-agnostic meta-learning algorithm MAML is used to train the small-shot classifier. MAML optimizes the model's initial parameters by learning on multiple tasks, enabling rapid adaptation to new tasks. The inner loop fine-tunes the classification head on the 5-shot support set to learn task-specific feature representations. The outer loop optimizes the model's initial parameters to improve its generalization ability on new tasks.
[0041] The loss function comprehensively considers the cross entropy loss Γ CE , triplet loss Γ Triplet And the constraint term Γ based on the physical properties of the foreign body Physical ; for Γ CE , Γ Triplet and Γ Physical Set the weight coefficient to get the final loss function Γ.
[0042] Preferably, the formula of the loss function Γ in step 3.2) is
[0043] Γ=αΓ CE +βΓ Triplet +γΓ Physical
[0044] Among them, cross entropy loss is used to measure the difference between the model output and the true label; triplet loss is used to enhance the model's ability to distinguish different categories of foreign objects; the physical property constraint term uses physical characteristics to guide model learning and improve classification accuracy; Γ Physical is a constraint term based on the physical properties of the foreign body, namely, density and dielectric constant;
[0045] By setting the weight coefficients α, β, and γ, we can balance the impact of different loss terms on model training, so that the model can achieve optimal performance under small sample conditions.
[0046] The beneficial effects of the present invention are:
[0047] Compared with the prior art, the technical effects of the present invention are as follows:
[0048] 1. Dynamic Detection Capabilities: The existing patent CN119131012A primarily detects static surface defects and cannot effectively capture the characteristics of foreign matter in flowing powders. This invention, through time series modeling and a spatiotemporal attention mechanism, enables real-time tracking and precise identification of foreign matter in flowing powders, addressing the shortcomings of existing technologies in dynamic detection.
[0049] 2. Multimodal Fusion: The existing patent CN222014072U relies solely on a single vibration signal for foreign object detection, ignoring the importance of visual and motion information. This invention integrates multiple modal data, including visual, motion, and physical attributes. Through multimodal feature fusion, it can more comprehensively capture the characteristics of foreign objects, improving the accuracy and reliability of detection.
[0050] 3. Small Sample Learning: The existing CNN model in patent CN119360202A relies on a large amount of labeled data for training, making it difficult to achieve effective learning and generalization under small sample conditions. However, this invention uses a meta-learning algorithm, which improves accuracy by 38% compared to traditional CNNs with only 5 samples, significantly improving the model's adaptability and generalization performance under small sample conditions. DETAILED DESCRIPTION
[0051] A visual detection method for powder particle foreign matter inside high-pressure aluminum tubes is proposed. The original image is preprocessed using a physical model-driven image enhancement module to remove reflection interference and enhance foreign matter features. The enhanced image sequence is then extracted using a spatiotemporal attention feature extraction network (STAF-Net), fusing information from spatial and temporal dimensions to accurately capture the dynamic characteristics of foreign matter. Finally, a small-sample adaptive foreign matter classifier is used to classify and identify the extracted features, achieving accurate detection of foreign matter inside high-pressure aluminum tubes.
[0052] Specifically:
[0053] AThe technical steps of dynamic denoising enhancement based on physical reflection model are:
[0054] 1. Reflection separation model:
[0055] This paper establishes a bidirectional reflectance distribution function (BRDF) model for the aluminum tube surface. By precisely calibrating the aluminum's reflectance parameters (specular reflection accounts for >80%), it is able to accurately separate the specular and diffuse reflection components. Experiments show that using non-local mean filtering (NLM) to separate the specular reflection component clearly enhances the features of foreign objects in the image. Compared with traditional methods, the contrast of foreign objects is improved by over 40%, significantly improving the accuracy of subsequent analysis.
[0056] The specific model formula is:
[0057] L o (θ o )=∫Ωf r (θ i ,θ o )L i (θ i )cosθ i dω i
[0058] Among them, L o (θ o ) represents the intensity of reflected light in the observation direction, ∫Ωf r (θ i ,θ o ) is the reflectivity function, L i (θ i ) is the incident light intensity, θ i and θ o are the incident angle and observation angle, respectively.
[0059] 2. Dynamic lighting compensation:
[0060] To overcome interference from the highly reflective inner wall of the aluminum tube, this invention employs a ring-shaped LED array, employing dual-band light sources at 405nm and 850nm. The 405nm wavelength enhances the reflective properties of metal powder, making it stand out more clearly in the image. The 850nm infrared wavelength, with its strong penetrating power, effectively penetrates dust interference, resulting in clearer images. Combined with pulsed synchronous exposure technology, image quality is further enhanced.
[0061] At the same time, the present invention proposes a method for adaptively adjusting the light source intensity, which dynamically adjusts the light source intensity according to the image grayscale variance \(\Delta G\). The formula is:
[0062]
[0063] Where (ΔG is the image grayscale variance and k is the calibration coefficient. Experimental results show that after adopting this dynamic illumination compensation method, the signal-to-noise ratio of the image is improved by more than 20%, the interference of reflected light is effectively suppressed, and the robustness of detection is improved.
[0064] B. Spatiotemporal Attention Fusion Network STAF-Net:
[0065] Network structure:
[0066] 1. Input layer:
[0067] The input layer of the proposed method includes a time-series image sequence (30 frames per second) and synchronously collected inertial measurement unit (IMU) data. The IMU data is used to perform motion compensation on the image sequence, eliminating image blur and jitter caused by flow in the pipeline or robot motion, ensuring that the network can accurately extract foreign object features.
[0068] 2. Feature extraction:
[0069] Spatial Branch: The spatial branch utilizes a modified ResNet-50 architecture and embeds a DeformableConv module. Deformable convolution adaptively adjusts the shape and position of the convolution kernel to better adapt to the irregular deformation of foreign objects, thereby improving the ability to extract foreign object shape features. Compared to traditional convolution, deformable convolution is more flexible in extracting foreign object edge and texture features, effectively addressing the various pose variations of foreign objects in images.
[0070] Temporal Branch: The temporal branch uses 3D convolutional layers to extract inter-frame optical flow features, capturing the motion trajectory of foreign objects in time-series images. Combined with the Transformer self-attention mechanism, it captures the dependencies of foreign objects in long-range time series, further enhancing understanding of their dynamic behavior. This approach not only identifies the instantaneous position and shape of foreign objects but also analyzes their motion trends and speed changes, providing richer information for subsequent classification and identification.
[0071] 3. Feature Fusion:
[0072] To effectively integrate spatial and temporal features, we designed a dynamic weight allocation module (DWA). This module uses a multi-layer perceptron (MLP) to concatenate and process the spatial and temporal features F_{spa}\ and F_{temp}\. The output is then normalized to the range (0, 1) using the Sigmoid function σ to obtain the dynamic weights w_{spa / temp} of the spatial and temporal features. The specific formula is:
[0073]
[0074] in, Represents a feature concatenation operation. Through dynamic weight assignment, the network adaptively adjusts the importance of spatial and temporal features in the fusion process based on the characteristics of the current input data, thereby better capturing the multimodal characteristics of foreign objects. Ultimately, the output multi-scale fused feature map covers a range of resolutions, from 1 / 8 to 1 / 32 the original image size. This provides rich feature information for subsequent classifiers, enabling more accurate foreign object identification.
[0075] Network training and optimization:
[0076] During the training process, the present invention adopts an end-to-end training method and optimizes the network parameters through the back-propagation algorithm. In order to improve the generalization ability of the network, data enhancement technology is adopted, including random cropping, rotation, flipping and other operations to expand the training data. At the same time, technologies such as Dropout and Batch Normalization are introduced to prevent network overfitting. Compared with the traditional convolutional neural network (CNN), STAF-Net has significant advantages in handling dynamic foreign body detection tasks. Experimental results show that STAF-Net improves the detection accuracy by 14.4 percentage points compared with the traditional CNN. At the same time, it also performs well in real-time performance and can meet the requirements of industrial sites for real-time detection.
[0077] C Few-shot meta-learning classifier:
[0078] Training strategy:
[0079] 1. Data generation:
[0080] Due to the difficulty in acquiring data on the interior of high-pressure aluminum tubes, this paper uses a generative adversarial network (GAN)-based method to synthesize images of foreign matter inside the tubes. The generator inputs include physical simulation parameters, such as powder flow rate and particle size distribution, which are used to generate foreign matter images that closely resemble the actual scene. To improve the stability of GAN training, spectral normalization (SN) technology is introduced into the discriminator. This effectively suppresses gradient explosion and mode collapse during training, resulting in higher-quality images that more closely resemble the actual data distribution.
[0081] 2. Meta-learning framework:
[0082] This paper uses the model-independent meta-learning algorithm MAML to train a small-sample classifier. The MAML algorithm optimizes the model's initial parameters by learning on multiple tasks, enabling it to quickly adapt to new tasks. Specifically, the inner loop fine-tunes the classification head on the 5-shot support set to learn the feature representations for a specific task, while the outer loop optimizes the model's initial parameters to improve its generalization ability on new tasks. This meta-learning framework can quickly adjust model parameters with only a small number of samples, achieving accurate classification of new foreign object types.
[0083] The loss function comprehensively considers the cross entropy loss Γ CE , triplet loss Γ Triplet And the constraint term Γ based on the physical properties of the foreign body Physical Among them, cross entropy loss is used to measure the difference between the model output and the true label; triple loss is used to enhance the model's ability to distinguish different types of foreign objects; physical property constraints use the physical properties of foreign objects such as density and dielectric constant to further guide model learning and improve classification accuracy. The specific form of the loss function is:
[0084] Γ=αΓ CE +βΓ Triplet +γΓ Physical
[0085] where Γ Physical It is a constraint based on the physical properties of the foreign body (density, dielectric constant).
[0086] By reasonably setting the weight coefficients α, β, and γ, the impact of different loss terms on model training can be balanced, so that the model can achieve optimal performance under small sample conditions.
[0087] Comparison with other few-shot learning methods:
[0088] Compared to traditional deep learning models, the small-sample meta-learning classifier of the present invention exhibits significant advantages when using limited sample sizes. For example, when trained with only five samples, the classification accuracy of the present invention reaches 89.4%, a 26.3 percentage point improvement over the traditional CNN. This demonstrates that the present invention can better utilize limited sample data, quickly adapt to new foreign object detection tasks, and possess greater generalization and practicality.
[0089] 3. Verification of the Example
[0090] To validate the performance of our proposed method, we conducted experimental tests in a 550kV GIS aluminum pipeline (200mm inner diameter). A mixture of Al2O3 powder (particle size 50-200μm) and metal debris was injected into the pipeline to simulate the foreign matter environment found in actual operating conditions. We used both a traditional CNN and our proposed STAF-Net for detection, and conducted a detailed analysis of the results.
[0091] Table 1: Performance comparison table
[0092] index Traditional CNN This invention (STAF-Net) Detection accuracy 82.30% 96.70% Small sample adaptability (5-shot) 63.10% 89.40% Anti-reflection interference capability (PSNR) 28.6dB 41.2dB Real-time performance (FPS) 15 27
[0093] Experimental steps and conditions:
[0094] 1. Data Acquisition: An industrial camera (Basler acA2440-75gc, global shutter, 75 fps) was used to capture time-series images of the pipeline interior and simultaneously collect inertial measurement unit (IMU) data. A ring-shaped dual-band LED light source (405 nm + 850 nm, adjustable light intensity from 0 to 5000 Lux) was deployed to provide stable lighting conditions for image acquisition.
[0095] 2. Data Preprocessing: The collected image sequences are fed into a physical model-driven image enhancement module to remove reflection interference and enhance foreign object features. The enhanced image sequences and IMU data are then fed into STAF-Net for feature extraction and classification.
[0096] 3. Performance Evaluation: By comparing with traditional CNNs, the performance of the proposed method was evaluated in four aspects: detection accuracy, small sample adaptability, anti-reflection interference capability, and real-time performance. Detection accuracy was calculated by comparing the model output with the true label; small sample adaptability was tested under 5-shot conditions to evaluate the model's generalization ability with a small number of samples; anti-reflection interference capability was measured by calculating the peak signal-to-noise ratio (PSNR) of the image; and real-time performance was evaluated by calculating the model's frame rate (FPS).
[0097] Analysis of experimental results:
[0098] Experimental results show that the detection accuracy of the present invention is 14.4 percentage points higher than that of traditional CNN, reaching 96.7%, and can more accurately identify foreign objects inside the pipe. In terms of small sample adaptability, the accuracy of the present invention is 26.3 percentage points higher than that of traditional CNN when only 5 samples are used for training, reaching 89.4%, showing stronger generalization ability and rapid adaptability to new tasks. In terms of anti-reflection interference capability, the PSNR value of the present invention is 12.6dB higher than that of traditional CNN, indicating that the present invention can more effectively remove the interference of reflected light and improve image quality. In terms of real-time performance, the frame rate of the present invention reaches 27fps, which is 12fps higher than that of traditional CNN, and can meet the requirements of industrial sites for real-time detection.
Claims
1. A visual inspection method for powder particles and foreign matter inside high-pressure aluminum tubes, characterized in that: The original image is preprocessed through the image enhancement module driven by the physical model to remove reflection interference and enhance the features of foreign objects to obtain the enhanced image sequence; The spatiotemporal attention feature extraction network STAF-Net is used to extract features from the enhanced image sequence, integrating information from spatial and temporal dimensions to capture the dynamic characteristics of foreign objects. The dynamic characteristics of the extracted foreign matter are detected by a small sample adaptive foreign matter classifier, thereby realizing the visual detection of powder particle foreign matter inside the high-pressure aluminum tube.
2. The method for visually detecting powder particles and foreign matter inside a high-pressure aluminum tube according to claim 1, characterized in that: The removal of reflection interference and enhancement of foreign body features include: 1.1) Reflection separation model: A bidirectional reflectance distribution function (BRDF) model of the aluminum tube surface is established. By calibrating the reflection parameters of the aluminum material, the specular reflection and diffuse reflection components are separated. The specific model formula is: 1.2) Dynamic lighting compensation: A ring-shaped LED array is deployed, and a dual-band light source is used to make the enhanced metal powder stand out in the image and obtain a clear image. Combined with pulse synchronous exposure technology, a method for adaptively adjusting the light source intensity is proposed, which dynamically adjusts the light source intensity according to the image grayscale variance \(\DeltaG\).
3. The method for visually detecting powder particles and foreign matter inside a high-pressure aluminum tube according to claim 2, characterized in that: In the above 1.1), the formula of the bidirectional reflection distribution function BRDF model of the aluminum tube surface is: L o (i o )=∫ Ω f r (i i ,i o )L i (i i )cosθ i dω i Among them, L o (θ o ) represents the intensity of reflected light in the viewing direction, ∫ Ω f r (θ i ,θ o ) is the reflectivity function, L i (θ i ) is the incident light intensity, θ i and θ o are the incident angle and observation angle, respectively.
4. The method for visually detecting powder particles and foreign matter inside a high-pressure aluminum tube according to claim 2, characterized in that: In the above 1.2), the dual-band light source is a 405nm and 850nm dual-band light source. The 405nm band is used to enhance the reflective properties of the metal powder, making it stand out in the image; the 850nm infrared band with strong penetrating ability is used to penetrate the dust interference and obtain a clear image.
5. The method for visually detecting powder particles and foreign matter inside a high-pressure aluminum tube according to claim 2, characterized in that: In the above 1.2), the formula for dynamically adjusting the light source intensity according to the image grayscale variance \(\Delta G\) is: Among them, ΔG is the image grayscale variance, and k is the calibration coefficient.
6. The method for visually detecting powder particles and foreign matter inside a high-pressure aluminum tube according to claim 1, characterized in that: The construction method of the spatiotemporal attention fusion network STAF-Net is as follows: 2.1) Input layer: The input layer includes a 30-frame-per-second time-series image sequence and synchronously acquired inertial measurement unit (IMU) data. The IMU data is used to perform motion compensation on the image sequence to eliminate image blur and jitter caused by flow in the pipeline or robot motion. 2.2) Feature Extraction: Spatial branch: The spatial branch uses an improved ResNet-50 architecture and embeds a deformable convolution module. Deformable convolution can adaptively adjust the shape and position of the convolution kernel to adapt to the irregular deformation of foreign objects. Deformable convolution can flexibly extract the edge and texture features of foreign objects, effectively dealing with various posture changes of foreign objects in the image. Temporal branch: The temporal branch uses a 3D convolutional layer to extract inter-frame optical flow features, capturing the motion trajectory of foreign objects in time-series images. Combined with the Transformer self-attention mechanism, it captures the dependencies of foreign objects in long-range time series, enhancing understanding of their dynamic behavior. The temporal branch can identify the instantaneous position and shape of foreign objects and analyze their motion trends and speed changes. 2.3) Feature Fusion: The dynamic weight allocation module DWA is used to concatenate and process the spatial features F_{spa}\ and the temporal features F_{temp}\ through a multi-layer perceptron MLP. The output values are then normalized to the range (0, 1) using the Sigmoid function σ to obtain the dynamic weights w_{spa / temp) of the spatial and temporal features. 2.4) Network training: The present invention adopts an end-to-end training method and optimizes network parameters through the back-propagation algorithm; adopts data enhancement technology, including random cropping, rotation, and flipping operations, to expand the training data; and introduces Dropout and BatchNormalization technologies to prevent network overfitting.
7. The method for visually detecting powder particles and foreign matter inside a high-pressure aluminum tube according to claim 6, characterized in that: In the above 2.3), the dynamic weight w_{spa / temp) of spatial and temporal features is calculated as follows: in, Represents the feature splicing operation; through dynamic weight allocation, the network can adaptively adjust the importance of spatial and temporal features in the fusion process according to the characteristics of the current input data, capture the multimodal characteristics of foreign objects, and output multi-scale fusion feature maps covering multiple resolutions from 1 / 8 to 1 / 32 of the original image size, providing feature information for subsequent classifiers.
8. The method for visually detecting powder particles and foreign matter inside a high-pressure aluminum tube according to claim 1, characterized in that: The small sample adaptive foreign body classifier is specifically: 3.1.) Data Generation: Because data on the interior of high-pressure aluminum tubes is difficult to obtain, a method based on a generative adversarial network (GAN) was used to synthesize images of foreign objects inside the tubes. The generator inputs include physical simulation parameters, which are used to generate foreign object images that are highly similar to the actual scene. Spectral normalization (SN) technology was introduced into the discriminator to suppress gradient explosion and mode collapse problems during training. 3.2) Meta-learning framework: The model-agnostic meta-learning algorithm MAML is used to train the small-shot classifier. MAML optimizes the model's initial parameters by learning on multiple tasks, enabling rapid adaptation to new tasks. The inner loop fine-tunes the classification head on the 5-shot support set to learn task-specific feature representations. The outer loop optimizes the model's initial parameters to improve its generalization ability on new tasks. The loss function comprehensively considers the cross entropy loss Γ CE , triplet loss Γ Triplet And the constraint term Γ based on the physical properties of the foreign body Physical ; for Γ CE , Γ Triplet and Γ Physical Set the weight coefficient to get the final loss function Γ.
9. The method for visually detecting powder particles and foreign matter inside a high-pressure aluminum tube according to claim 8, characterized in that: The formula of the loss function Γ in 3.2) is: C = aC CE +βΓ Triplet +yG Physical Among them, cross entropy loss is used to measure the difference between the model output and the true label; triplet loss is used to enhance the model's ability to distinguish different categories of foreign objects; the physical property constraint term uses physical characteristics to guide model learning and improve classification accuracy; Γ Physical is a constraint term based on the physical properties of the foreign body, namely, density and dielectric constant; By setting the weight coefficients α, β, and γ, we can balance the impact of different loss terms on model training, so that the model can achieve optimal performance under small sample conditions.
Citation Information
Patent Citations
Bus surface quality detection method based on machine vision
CN119131012A
Power grid overhead line foreign matter identification method based on machine vision
CN119360202A
Detection device for detecting particle foreign matters in powdery material
CN222014072U