Thermal imaging image optimization processing method for lithium battery charger
By combining the fixed thermal imaging camera and deep learning model with four data enhancement technologies, the problem of insufficient thermal imaging detection efficiency and accuracy of lithium battery chargers is solved, and efficient and automated thermal imaging image detection of lithium battery chargers is achieved, improving the Accuracy and stability of detection.
Patent Information
- Application Number
- CN202410936588.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing lithium battery charger thermal imaging detection methods are inefficient and have poor accuracy, especially in production environments where data diversity and complexity lead to detection challenges, and manual detection is difficult to meet the requirements of high efficiency and accuracy.
Data acquisition is obtained by using a fixed thermal imaging camera, combining four data augmentation technologies (image rotation, flip, translation, scaling) and deep learning models (convolutional neural network, long and short-term memory network, and soft attention layer) to perform thermal imaging images. Data expansion and optimization preprocessing, extract spatiotemporal features, and realize automated detection.
It improves the efficiency and accuracy of lithium battery charger detection, reduces manual error and cost, enhances model robustness, significantly reduces noise and misjudgment rates, and ensures the reliability and consistency of detection results.
Smart Images

Figure CN118967569A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image processing, and in particular relates to a thermal imaging image optimization processing method for a lithium battery charger. Background Art
[0002] With the rapid development of science and technology, lithium batteries are used more and more widely in various electronic devices, especially in the fields of mobile phones, laptops and electric vehicles. The demand for lithium batteries is increasing year by year. As a supporting equipment, the production and detection of lithium battery chargers are particularly important. However, there is a risk of overheating and failure in the production process of lithium battery chargers. If not detected and handled in time, it may cause serious safety hazards. Therefore, it is particularly important to develop an efficient thermal imaging image processing technology for real-time detection and analysis of thermal imaging images of lithium battery chargers.
[0003] Traditional thermal imaging detection methods mainly rely on manual inspection and experience-based judgment, which is not only inefficient but also prone to misjudgment and missed judgment. Especially on the test line of lithium battery charger manufacturers, manual inspection is difficult to meet the requirements of efficiency and accuracy. With the continuous advancement of artificial intelligence and machine learning technologies, the use of deep learning algorithms such as convolutional neural networks to automatically process and analyze thermal imaging images has become an important way to solve this problem. By performing data enhancement, optimized preprocessing and feature extraction on thermal imaging images, the accuracy and robustness of detection can be significantly improved.
[0004] In recent years, researchers have achieved many results in the field of thermal imaging detection technology for lithium battery chargers. However, the existing methods still have some shortcomings, including insufficient data sets, inadequately optimized preprocessing algorithms, etc. Especially in actual production environments, the diversity and complexity of data pose huge challenges to detection. In order to solve these problems, the present invention proposes a thermal imaging image optimization processing method for lithium battery chargers, which combines four data enhancement technologies and advanced deep learning models to improve the detection accuracy and efficiency of thermal imaging images of lithium battery chargers and ensure the safety and reliability of the production process. Summary of the invention
[0005] The present invention proposes a thermal imaging image optimization processing method for a lithium battery charger, aiming to improve the safety and reliability of the lithium battery charger during production and testing by using efficient and automated image processing technology.
[0006] A thermal imaging image optimization processing method for a lithium battery charger comprises the following steps: S1. Preparation of test thermal imaging image data set for lithium battery charger. Use fixed thermal imaging camera to collect thermal imaging image data of lithium battery charger test line, and classify and annotate corresponding thermal imaging images according to manual inspection results, including normal images and fault images, and annotate high temperature fault parts; S2. The collected thermal imaging images of lithium battery chargers are made into a detection data set, and four data enhancement techniques are used to perform data expansion operations to expand the size and diversity of training data and thus improve the robustness of the model. The expansion operations include image rotation, image flipping, image translation, and image scaling. S3, perform data optimization processing operations on the dataset file, including TITS threshold segmentation, morphological opening operation, non-local mean denoising and contrast-limited adaptive histogram equalization operations. After preprocessing the image data, the network can highlight the area of interest, remove small noise and isolated points, smooth the boundaries of objects, and maintain the main structure of the image; S4. Combining convolutional neural network, long short-term memory network and soft attention layer, the features of the optimized processed thermal imaging image data of lithium battery charger are extracted and classified and detected. The hybrid model can effectively capture the spatiotemporal characteristics of the image and improve the detection accuracy. S5. Train the thermal imaging detection model of lithium battery charger and perform model reasoning detection. Use the test thermal imaging image data set of lithium battery charger to train the thermal imaging detection model of lithium battery charger. After the training is completed, perform data preprocessing operations on the new thermal imaging images of lithium battery charger to be detected collected in real time on the quality inspection assembly line, and then input them into the thermal imaging detection model of lithium battery charger to obtain the detection results. The detection results include the quality inspection results of the lithium battery charger and the types of existing faults.
[0007] Preferably, in step S2, the four data enhancement techniques include the following steps: S21, random rotation operation of the image, with θ as the image rotation angle, the value range of θ is -90° to +90°, the step number is 30°, and the specific formula of the operation coordinates is as follows: Among them, f x and f y Represents the coordinate value after transformation, x and y represent the pixel value of the original image; when the image is rotated, blank areas will appear on the edge, and the blank areas are filled by constant filling. In this process, the replaced blank pixels are filled with constant values. The specific operation is to fill the blank area pixels with 0, that is, black pixels; S22, image horizontal flip operation, flipping the image to its horizontal axis is called horizontal flipping. In the horizontal flipping process, the left side is flipped to the right side, and the right side is flipped to the left side. The specific formula of the operation coordinates is as follows: Among them, f x and f y represents the transformed coordinate value, and x and y represent the pixel value of the original image; S23, image translation operation, performing horizontal or vertical movement operation on the thermal imaging image of the lithium battery charger. The specific formula of this operation is as follows: f'(x',y')=f(xT x ,yT y ); Where f′(x′, y′) represents the transformed coordinate value, x and y represent the pixel value of the original image; T x and T y Define the amount of horizontal and vertical movement respectively. After translation, use the constant 0, i.e. black pixels, to fill the blank area. S24, image zooming operation, performing zooming operations of different scales on the thermal imaging image of the lithium battery charger. The specific formula of this operation is as follows: f(x,y)=f(S*x,S*y); Among them, f(x, y) represents the new coordinates after scaling, S is the scale factor, when S is greater than 1, it indicates a zoom-in operation, and when S is between 0 and 1, it indicates a zoom-out. During the zoom-out process, a constant 0, i.e., black pixels, is used to fill the blank area.
[0008] Preferably, in step S3, the TITS threshold segmentation operation in the data optimization preprocessing operation on the data set file specifically includes the following steps: In the thermal imaging images collected by the thermal imaging camera in the S31 data set, the bright orange represents the heating condition of the lithium battery charger under the test state. First, the TITS threshold segmentation algorithm is used to segment the lithium battery charger part in the thermal imaging image. The TITS threshold algorithm formula is as follows: Among them, is a function of the k-level threshold, represents the average intensity, μ(k) represents the average intensity of class k, and the class weight is represented by ω(k); S32, calculating the optimal threshold and processing the image, the processing process includes binarizing the image in combination with the threshold, and then segmenting and cropping the thermal imaging image of the lithium battery charger according to the binarized image. The optimal threshold formula at level k* is: in, Represents the optimal threshold at k*, and L represents the grayscale of the pixel; the algorithm can determine the optimal threshold for separating the foreground and the background, and then convert the thermal imaging image of the lithium battery charger into a binary image, that is, if the pixel value is stronger than the TITS threshold, a black pixel is output, otherwise a white pixel is output; the original image and the binary black and white image output by the TITS threshold are used to process the collected thermal imaging image of the lithium battery charger, and the area of interest where the charger is located is cropped out.
[0009] Preferably, in step S3, the morphological opening operation and non-local mean denoising operation in the data optimization preprocessing operation on the data set file specifically include the following steps: S33, using morphological opening operation to process the thermal imaging image of the lithium battery charger, the morphological opening specifically includes two operations: erosion and dilation; after the morphological opening operation, the noise and smooth contour of the thermal imaging image of the lithium battery charger can be reduced, and the specific formula of the operation is as follows: Where B is the structural element, A represents the thermal image of the lithium battery charger, and the morphological opening operation is performed by applying the erosion operation ⊙ and the dilation operation conducted; S34. Use the improved non-local mean to remove the noise information of the thermal imaging image of the lithium battery charger. The operation is performed by averaging the pixel values in the neighborhood around the target pixel to process the color image u=u(u1, u2, u3) from pixel p to q, where p is the target pixel, q is the adjacent pixel of p, u represents a color image, and u1, u2, and u3 represent three channels of the color image. The specific formula of the operation is as follows: in, is the value of the target pixel p in color channel i after denoising, B(p, r) represents the neighborhood with p as the center and radius r, u i (q) is the value of pixel q in color channel i, ω(p, q) represents the weight between pixels p and q, and C(p) represents a normalization constant used to ensure that the sum of the weights is 1.
[0010] Preferably, in step S3, the improved contrast limited adaptive histogram equalization operation in the data optimization preprocessing operation on the data set file specifically includes the following steps: S35, dividing the image into blocks, dividing the input image into sub-images of size m×n; and performing histogram equalization on each sub-image block, calculating its cumulative distribution function and normalizing it. The specific calculation formula is as follows: Among them, H(i) and H(j) are the histogram values of gray level i and j, CDF(i) represents the cumulative distribution function value of gray level i, and CDF norm (i) represents the normalized cumulative distribution function value of gray level i, m and n are the width and height of the sub-block, I(x, y) is the gray value of the image at position (x, y), CDF min Represents the minimum value of the cumulative distribution function; S36, calculating the clipped histogram and redistributing the redundant part, clipping the histogram of each sub-block so that the frequency of each gray level does not exceed the predefined contrast limit threshold. The specific formula is as follows: H clipped (i) = min(H(i), ClipLimit); Among them, H clipped (i) represents the clipped histogram value of gray level i, H(i) represents the histogram value of gray level i, ClipLimit represents the contrast limit threshold, and L represents the number of gray levels; S37, mapping new grayscale values and performing bilinear interpolation, mapping the original image pixels to new grayscale values according to the normalized cumulative distribution function, and performing bilinear interpolation on adjacent sub-blocks to eliminate block effects to achieve smooth transition, the specific formula is as follows: I′(x, y) = CDF norm (I(x, y))×(L-1); I′ final (x, y) = (1-a)(1-b) I' 00 +a(1-b)I′ 10 +(1-a)bI′ 01 +abI′ 11 ; Among them, the gray value of the image after Γ(x, y) equalization at position (x, y), CDF norm (I(x, y)) represents the normalized cumulative distribution function value of the grayscale value of the original image at the position (x, y); I' final (x, y) The gray value of the final interpolated image at position (x, y), I′ 00 , I′ 10 , I′ 01 , I′ 11 represents the equalization result of four adjacent sub-blocks, a and b represent the interpolation coefficients, and represent the position ratio of the interpolation point relative to the four adjacent points.
[0011] Preferably, in step S4, the design of the hybrid network structure includes the following structure: an input layer for receiving an input image of size 112x112x32; a multi-layer convolutional network component, including: a first convolutional layer, including 32 3x3 filters, generating a feature map of 56x56x32; a first pooling layer, using a 2x2 pooling window, generating a feature map of 28x28x64; a second convolutional layer, including 64 3x3 filters, generating a feature map of 14x14x64; a second pooling layer, using a 2x2 pooling window, generating a feature map of 7x7x64; a third convolutional layer, including 64 3x3 filters, generating a feature map of 3x3x64; a third pooling layer, using a 2x2 pooling window, generating a feature map of 1x1x64; a soft attention layer, used to pay attention to the feature map Force weighting, generating 1x1x64 and 16x1x1 feature maps; connection layer, used to splice the output feature maps of the third pooling layer and the soft attention layer to generate a 1x1x128 feature map; activation layer, applying ReLU activation function, performing nonlinear transformation on the spliced feature map, and outputting a 1x1x128 feature map; Dropout layer, with a dropout rate of 0.5, is used to prevent overfitting; Flatten layer, used to flatten the feature map into a one-dimensional vector, generating a 1x16x8 feature map; reshaping layer, used to reshape the one-dimensional vector to adapt to LSTM input, generating a 128 feature map; long short-term memory network layer, using tanh activation function, processing time series data, and outputting a 128 feature map; fully connected layer, containing 2 neurons, using softmax activation function, outputs classification results.
[0012] Compared with the prior art, the beneficial effects of the present invention are: first, by using a fixed thermal imaging camera and an assembly line detection method, continuous and real-time monitoring of lithium battery chargers is achieved, detection efficiency is improved, human errors are reduced, and the cost and time of manual detection are greatly reduced; second, four data enhancement technologies are adopted, namely image rotation, flipping, translation and scaling, which expand the diversity and size of training data, improve the robustness of the model, and can effectively process various complex thermal imaging images; finally, the present invention combines convolutional neural networks, long short-term memory networks and soft attention layers, which can extract the spatiotemporal characteristics of thermal imaging images of lithium battery chargers and achieve high-precision fault detection and classification. The hybrid model captures more image details and dynamic changes, further improving the accuracy and stability of detection. Through optimized data preprocessing and feature extraction technology, the noise and misjudgment rate are significantly reduced, ensuring the reliability and consistency of the detection results, and meeting the efficient and safe quality control needs of lithium battery charger manufacturers. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1The present invention is a flow chart of a thermal imaging image optimization processing method for lithium battery charger.
[0014] Figure 2 It is a comparison between normal images and fault images in the thermal imaging image dataset of lithium battery charger.
[0015] Figure 3 It is a flow chart of the thermal imaging image data enhancement stage of a lithium battery charger.
[0016] Figure 4 It is a schematic diagram of the thermal imaging image optimization processing flow of the lithium battery charger.
[0017] Figure 5 It is a hybrid network structure diagram of thermal imaging image anomaly detection for lithium battery chargers. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0019] See also Figure 1-Figure 5 The present invention provides a technical solution for optimizing the thermal imaging image processing of a lithium battery charger.
[0020] The present invention proposes a thermal imaging image optimization processing method for lithium battery chargers, aiming to improve the safety and reliability of lithium battery chargers in the production and testing process through efficient and automated image processing technology; first, reference Figure 1 A flowchart of a thermal imaging image optimization processing method for a lithium battery charger, comprising the following steps: S1. Preparation of test thermal imaging image data set for lithium battery charger. Use fixed thermal imaging camera to collect thermal imaging image data of lithium battery charger test line, and classify and annotate corresponding thermal imaging images according to manual inspection results, including normal images and fault images, and annotate high temperature fault parts; S2. The collected thermal imaging images of lithium battery chargers are made into a detection data set, and four data enhancement techniques are used to perform data expansion operations to expand the size and diversity of training data and thus improve the robustness of the model. The expansion operations include image rotation, image flipping, image translation, and image scaling. S3, perform data optimization processing operations on the dataset file, including TITS threshold segmentation, morphological opening operation, non-local mean denoising and contrast-limited adaptive histogram equalization operations. After preprocessing the image data, the network can highlight the area of interest, remove small noise and isolated points, smooth the boundaries of objects, and maintain the main structure of the image; S4. Combining convolutional neural network, long short-term memory network and soft attention layer, the features of the optimized processed thermal imaging image data of lithium battery charger are extracted and classified and detected. The hybrid model can effectively capture the spatiotemporal characteristics of the image and improve the detection accuracy. S5. Train the thermal imaging detection model of lithium battery charger and perform model reasoning detection. Use the test thermal imaging image data set of lithium battery charger to train the thermal imaging detection model of lithium battery charger. After the training is completed, perform data preprocessing operations on the new thermal imaging images of lithium battery charger to be detected collected in real time on the quality inspection assembly line, and then input them into the thermal imaging detection model of lithium battery charger to obtain the detection results. The detection results include the quality inspection results of the lithium battery charger and the types of existing faults.
[0021] For further reference, Figure 2 are example images of the data set mentioned in step S1 above, where Figure (a), Figure (b), Figure (c), and Figure (d) are examples of normal thermal imaging images of a lithium battery charger, and Figure (e), Figure (f), Figure (g), and Figure (h) are examples of abnormal thermal imaging images of a lithium battery charger.
[0022] For further reference, Figure 3 This is the data enhancement process mentioned in step S2 above. Figure (a) is the original image. For the four data enhancement techniques mentioned above, the following steps are included: S21, random rotation operation of the image, with θ as the image rotation angle, the value range of θ is -90° to +90°, the step number is 30°, and the specific formula of the operation coordinates is as follows: Among them, f x and f y Represents the coordinate value after transformation, x and y represent the pixel value of the original image; when the image is rotated, blank areas will appear on the edge, and the blank areas are filled by constant filling. In this process, the replaced blank pixels are filled with constant values. The specific operation is to fill the blank area pixels with 0, that is, black pixels; S22, image horizontal flip operation, flipping the image to its horizontal axis is called horizontal flipping. In the horizontal flipping process, the left side is flipped to the right side, and the right side is flipped to the left side. The specific formula of the operation coordinates is as follows: Among them, fx and f y represents the transformed coordinate value, and x and y represent the pixel value of the original image; S23, image translation operation, performing horizontal or vertical movement operation on the thermal imaging image of the lithium battery charger. The specific formula of this operation is as follows: f'(x',y')=f(xT x ,yT y ); Where f′(x′, y′) represents the transformed coordinate value, x and y represent the pixel value of the original image; T x and T y Define the amount of horizontal and vertical movement respectively. After translation, use the constant 0, i.e. black pixels, to fill the blank area. S24, image zooming operation, performing zooming operations of different scales on the thermal imaging image of the lithium battery charger. The specific formula of this operation is as follows: f(x,y)=f(S*x,S*y); Among them, f(x, y) represents the new coordinates after scaling, S is the scale factor, when S is greater than 1, it indicates a zoom-in operation, and when S is between 0 and 1, it indicates a zoom-out. During the zoom-out process, a constant 0, i.e., black pixels, is used to fill the blank area.
[0023] For further reference, Figure 4 The overall process of optimizing the thermal imaging image of the lithium battery charger in step S3 is shown, wherein the TITS threshold segmentation operation in the data optimization preprocessing operation specifically includes the following steps: In the thermal imaging images collected by the thermal imaging camera in the S31 data set, the bright orange represents the heating condition of the lithium battery charger under the test state. First, the TITS threshold segmentation algorithm is used to segment the lithium battery charger part in the thermal imaging image. The TITS threshold algorithm formula is as follows: Among them, is a function of the k-level threshold, represents the average intensity, μ(k) represents the average intensity of class k, and the class weight is represented by ω(k); S32, calculating the optimal threshold and processing the image, the processing process includes binarizing the image in combination with the threshold, and then segmenting and cropping the thermal imaging image of the lithium battery charger according to the binarized image. The optimal threshold formula at level k* is: in, Represents the optimal threshold at k*, and L represents the grayscale of the pixel; the algorithm can determine the optimal threshold for separating the foreground and the background, and then convert the thermal imaging image of the lithium battery charger into a binary image, that is, if the pixel value is stronger than the TITS threshold, a black pixel is output, otherwise a white pixel is output; the original image and the binary black and white image output by the TITS threshold are used to process the collected thermal imaging image of the lithium battery charger, and the area of interest where the charger is located is cropped out.
[0024] For further reference, Figure 4 The overall process of optimizing the thermal imaging image of a lithium battery charger in step S3 is shown, wherein the morphological opening operation and the non-local mean denoising operation in the data optimization preprocessing operation of the data set file are specifically performed as follows: S33, using morphological opening operation to process the thermal imaging image of the lithium battery charger, the morphological opening specifically includes two operations: erosion and dilation; after the morphological opening operation, the noise and smooth contour of the thermal imaging image of the lithium battery charger can be reduced, and the specific formula of the operation is as follows: Where B is the structural element, A represents the thermal image of the lithium battery charger, and the morphological opening operation is performed by applying the erosion operation ⊙ and the dilation operation conducted; S34. Use the improved non-local mean to remove the noise information of the thermal imaging image of the lithium battery charger. The operation is performed by averaging the pixel values in the neighborhood around the target pixel to process the color image u=u(u1, u2, u3) from pixel p to q, where p is the target pixel, q is the adjacent pixel of p, u represents a color image, and u1, u2, and u3 represent three channels of the color image. The specific formula of the operation is as follows: in, is the value of the target pixel p in color channel i after denoising, B(p,r) represents the neighborhood with radius r and centered at p, and u i (q) is the value of pixel q in color channel i, ω(p,q) represents the weight between pixels p and q, and C(p) represents a normalization constant used to ensure that the sum of the weights is 1.
[0025] For further reference, Figure 4 The overall process of optimizing the thermal imaging image of the lithium battery charger in step S3 is shown, wherein the improved contrast-limited adaptive histogram equalization operation in the data optimization preprocessing operation of the data set file specifically includes the following steps: S35, dividing the image into blocks, dividing the input image into sub-images of size m×n; and performing histogram equalization on each sub-image block, calculating its cumulative distribution function and normalizing it. The specific calculation formula is as follows: Among them, H(i) and H(j) are the histogram values of gray level i and j, CDF(i) represents the cumulative distribution function value of gray level i, and CDF norm (i) represents the normalized cumulative distribution function value of gray level i, m and n are the width and height of the sub-block, I(x, y) is the gray value of the image at position (x, y), CDF min Represents the minimum value of the cumulative distribution function; S36, calculating the clipped histogram and redistributing the redundant part, clipping the histogram of each sub-block so that the frequency of each gray level does not exceed the predefined contrast limit threshold. The specific formula is as follows: H clipped (i) = min(H(i), ClipLimit) Among them, H clipped (i) represents the clipped histogram value of gray level i, H(i) represents the histogram value of gray level i, ClipLimit represents the contrast limit threshold, and L represents the number of gray levels; S37, mapping new grayscale values and performing bilinear interpolation, mapping the original image pixels to new grayscale values according to the normalized cumulative distribution function, and performing bilinear interpolation on adjacent sub-blocks to eliminate block effects to achieve smooth transition, the specific formula is as follows: I′(x, y) = CDF norm (I(x, y))×(L-1); I′ final (x, y) = (1-a)(1-b) I' 00 +a(1-b)I′ 10 +(1-a)bI′ 01 +abI′ 11 ; Among them, I′(x, y) is the gray value of the image after equalization at position (x, y), CDF norm (I(x, y)) represents the normalized cumulative distribution function value of the grayscale value of the original image at position (x, y); I′ final (x, y) The gray value of the final interpolated image at position (x, y), I′ 00 , I′ 10 , I′ 01 , I′ 11represents the equalization result of four adjacent sub-blocks, a and b represent the interpolation coefficients, and represent the position ratio of the interpolation point relative to the four adjacent points.
[0026] For further reference, Figure 5 Schematic diagram of the hybrid network structure described in step S4. The design of the hybrid network structure shown in the figure includes the following structures: an input layer for receiving an input image of size 112x112x32; a multi-layer convolutional network component, including: a first convolutional layer, including 32 3x3 filters, generating a 56x56x32 feature map; a first pooling layer, using a 2x2 pooling window, generating a 28x28x64 feature map; a second convolutional layer, including 64 3x3 filters, generating a 14x14x64 feature map; a second pooling layer, using a 2x2 pooling window, generating a 7x7x64 feature map; a third convolutional layer, including 64 3x3 filters, generating a 3x3x64 feature map; a third pooling layer, using a 2x2 pooling window, generating a 1x1x64 feature map; a soft attention layer for feature The graph is weighted for attention to generate feature maps of 1x1x64 and 16x1x1; the connection layer is used to splice the output feature maps of the third pooling layer and the soft attention layer to generate a feature map of 1x1x128; the activation layer applies the ReLU activation function to perform nonlinear transformation on the spliced feature map and output a feature map of 1x1x128; the Dropout layer has a dropout rate of 0.5 to prevent overfitting; the Flatten layer is used to flatten the feature map into a one-dimensional vector to generate a feature map of 1x16x8; the reshape layer is used to reshape the one-dimensional vector to adapt to the LSTM input and generate a feature map of 128; the long short-term memory network layer uses the tanh activation function to process time series data and outputs a feature map of 128; the fully connected layer contains 2 neurons, uses the softmax activation function, and outputs the classification result.
Claims
1. A thermal imaging image optimization processing method for a lithium battery charger, characterized in that: The following steps are involved: S1. Preparation of test thermal imaging image data set for lithium battery charger. Use fixed thermal imaging camera to collect thermal imaging image data of lithium battery charger test line, and classify and annotate corresponding thermal imaging images according to manual inspection results, including normal images and fault images, and annotate high temperature fault parts; S2. The collected thermal imaging images of lithium battery chargers are made into a detection data set, and four data enhancement techniques are used to perform data expansion operations to expand the size and diversity of training data and thus improve the robustness of the model. The expansion operations include image rotation, image flipping, image translation, and image scaling. S3, perform data optimization processing operations on the dataset file, including TITS threshold segmentation, morphological opening operation, non-local mean denoising and contrast-limited adaptive histogram equalization operations. After preprocessing the image data, the network can highlight the area of interest, remove small noise and isolated points, smooth the boundaries of objects, and maintain the main structure of the image; S4. Combining convolutional neural network, long short-term memory network and soft attention layer, the features of the optimized processed thermal imaging image data of lithium battery charger are extracted and classified and detected. The hybrid model can effectively capture the spatiotemporal characteristics of the image and improve the detection accuracy. S5. Train the thermal imaging detection model of lithium battery charger and perform model reasoning detection. Use the test thermal imaging image data set of lithium battery charger to train the thermal imaging detection model of lithium battery charger. After the training is completed, perform data preprocessing operations on the new thermal imaging images of lithium battery charger to be detected collected in real time on the quality inspection assembly line, and then input them into the thermal imaging detection model of lithium battery charger to obtain the detection results. The detection results include the quality inspection results of the lithium battery charger and the types of existing faults.
2. A thermal imaging image optimization processing method for a lithium battery charger according to claim 1, characterized in that: In step S2, for the four data enhancement techniques described above, the following steps are included: S21, random rotation operation of the image, with θ as the image rotation angle, the value range of θ is -90° to +90°, the step number is 30°, and the specific formula of the operation coordinates is as follows: Among them, f x and f y Represents the coordinate value after transformation, x and y represent the pixel value of the original image; when the image is rotated, blank areas will appear on the edge, and the blank areas are filled by constant filling. In this process, the replaced blank pixels are filled with constant values. The specific operation is to fill the blank area pixels with 0, that is, black pixels; S22, image horizontal flip operation, flipping the image to its horizontal axis is called horizontal flipping. In the horizontal flipping process, the left side is flipped to the right side, and the right side is flipped to the left side. The specific formula of the operation coordinates is as follows: Among them, f x and f y represents the transformed coordinate value, and x and y represent the pixel value of the original image; S23, image translation operation, performing horizontal or vertical movement operation on the thermal imaging image of the lithium battery charger. The specific formula of this operation is as follows: f'(x',y')=f(x-T x ,y-T y ); Where f′(x′, y′) represents the transformed coordinate value, x and y represent the pixel value of the original image; Tx and Ty define the amount of horizontal and vertical movement respectively. After translation, the blank area is filled with a constant of 0, i.e. black pixels. S24, image zooming operation, performing zooming operations of different scales on the thermal imaging image of the lithium battery charger. The specific formula of this operation is as follows: f(x,y)=f(S*x,S*y); Among them, f(x, y) represents the new coordinates after scaling, S is the scale factor, when S is greater than 1, it indicates a zoom-in operation, and when S is between 0 and 1, it indicates a zoom-out. During the zoom-out process, a constant 0, i.e., black pixels, is used to fill the blank area.
3. A thermal imaging image optimization processing method for a lithium battery charger according to claim 2, characterized in that: In step S3, the TITS threshold segmentation operation in the data optimization preprocessing operation for the data set file specifically includes the following steps: In the thermal imaging images collected by the thermal imaging camera in the S31 data set, the bright orange represents the heating condition of the lithium battery charger under the test state. First, the TITS threshold segmentation algorithm is used to segment the lithium battery charger part in the thermal imaging image. The TITS threshold algorithm formula is as follows: Among them, is a function of the k-level threshold, represents the average intensity, μ(k) represents the average intensity of class k, and the class weight is represented by ω(k); S32, calculating the optimal threshold and processing the image, the processing process includes binarizing the image in combination with the threshold, and then segmenting and cropping the thermal imaging image of the lithium battery charger according to the binarized image. The optimal threshold formula at level k* is: in, Represents the optimal threshold at k*, and L represents the grayscale of the pixel; the algorithm can determine the optimal threshold for separating the foreground and the background, and then convert the thermal imaging image of the lithium battery charger into a binary image, that is, if the pixel value is stronger than the TITS threshold, a black pixel is output, otherwise a white pixel is output; the original image and the binary black and white image output by the TITS threshold are used to process the collected thermal imaging image of the lithium battery charger, and the area of interest where the charger is located is cropped out.
4. A thermal imaging image optimization processing method for a lithium battery charger according to claim 3, characterized in that: In step S3, the morphological opening operation and non-local mean denoising operation in the data optimization preprocessing operation on the data set file specifically include the following steps: S33, using morphological opening operation to process the thermal imaging image of the lithium battery charger, the morphological opening specifically includes two operations: erosion and dilation; after the morphological opening operation, the noise and smooth contour of the thermal imaging image of the lithium battery charger can be reduced, and the specific formula of the operation is as follows: Where B is the structural element, A represents the thermal image of the lithium battery charger, and the morphological opening operation is performed by applying the erosion operation ⊙ and the dilation operation conducted; S34. Use the improved non-local mean to remove the noise information of the thermal imaging image of the lithium battery charger. The operation is performed by averaging the pixel values in the neighborhood around the target pixel to process the color image u=u(u1, u2, u3) from pixel p to q, where p is the target pixel, q is the adjacent pixel of p, u represents a color image, and u1, u2, and u3 represent three channels of the color image. The specific formula of the operation is as follows: in, is the value of the target pixel p in color channel i after denoising, B(p, r) represents the neighborhood with p as the center and radius r, u i (q) is the value of pixel q in color channel i, ω(p, q) represents the weight between pixels p and q, and C(p) represents a normalization constant used to ensure that the sum of the weights is 1.
5. A thermal imaging image optimization processing method for a lithium battery charger according to claim 4, characterized in that: In step S3, the improved contrast limited adaptive histogram equalization operation in the data optimization preprocessing operation on the data set file specifically includes the following steps: S35, dividing the image into blocks, dividing the input image into sub-images of size m×n; and performing histogram equalization on each sub-image block, calculating its cumulative distribution function and normalizing it. The specific calculation formula is as follows: Among them, H(i) and H(j) are the histogram values of gray level i and j, CDF(i) represents the cumulative distribution function value of gray level i, and CDF nom (i) represents the normalized cumulative distribution function value of gray level i, m and n are the width and height of the sub-block, I(x, y) is the gray value of the image at position (x, y), CDF min Represents the minimum value of the cumulative distribution function; S36, calculating the clipped histogram and redistributing the redundant part, clipping the histogram of each sub-block so that the frequency of each gray level does not exceed the predefined contrast limit threshold. The specific formula is as follows: H clpped (i)=min(H(i),ClipLimit); Among them, H clipped (i) represents the clipped histogram value of gray level i, H(i) represents the histogram value of gray level i, ClipLimit represents the contrast limit threshold, and L represents the number of gray levels; S37, mapping new grayscale values and performing bilinear interpolation, mapping the original image pixels to new grayscale values according to the normalized cumulative distribution function, and performing bilinear interpolation on adjacent sub-blocks to eliminate block effects to achieve smooth transition, the specific formula is as follows: I'(x,y)=CDF norm (I(x,y))×(L-1); I' inal (x,y)=(1-a)(1-b)I′ 00 +a(1-b)I′ 10 +(1-a)bI′ 01 +abI′ 11 ; Among them, I′(x, y) is the gray value of the image after equalization at position (x, y), CDF norm (I(x, y)) represents the normalized cumulative distribution function value of the grayscale value of the original image at the position (x, y); I' final (x, y) The gray value of the final interpolated image at position (x, y), I′ 00 , I′ 10 , I′ 01 ,I 11 represents the equalization result of four adjacent sub-blocks, a and b represent the interpolation coefficients, and represent the position ratio of the interpolation point relative to the four adjacent points.
6. A thermal imaging image optimization processing method for a lithium battery charger according to claim 5, characterized in that: In step S4, the design of the hybrid network structure includes the following structures: an input layer for receiving an input image of size 112x112x32; a multi-layer convolutional network component, including: a first convolutional layer, including 32 3x3 filters, generating a feature map of 56x56x32; a first pooling layer, using a 2x2 pooling window, generating a feature map of 28x28x64; a second convolutional layer, including 64 3x3 filters, generating a feature map of 14x14x64; a second pooling layer, using a 2x2 pooling window, generating a feature map of 7x7x64; a third convolutional layer, including 64 3x3 filters, generating a feature map of 3x3x64; a third pooling layer, using a 2x2 pooling window, generating a feature map of 1x1x64; a soft attention layer, used to pay attention to the feature map weights, generating feature maps of 1x1x64 and 16x1x1; the connection layer is used to splice the output feature maps of the third pooling layer and the soft attention layer to generate a feature map of 1x1x128; the activation layer applies the ReLU activation function to perform nonlinear transformation on the spliced feature map and output a feature map of 1x1x128; the Dropout layer has a dropout rate of 0.5 to prevent overfitting; the Flatten layer is used to flatten the feature map into a one-dimensional vector and generate a feature map of 1x16x8; the reshape layer is used to reshape the one-dimensional vector to adapt to the LSTM input and generate a feature map of 128; the long short-term memory network layer uses the tanh activation function to process time series data and outputs a feature map of 128; the fully connected layer contains 2 neurons, uses the softmax activation function, and outputs the classification result.
Citation Information
Patent Citations
Electrical equipment infrared image real-time detection and diagnosis method based on lightweight deep learning
CN113159334A
Blast furnace thermal load abnormal state monitoring method based on attention mechanism
CN114015825A
Image local contrast enhancement method for optimizing CLAHE
CN114092361A
Data enhancement method based on big law algorithm and channel attention mechanism
CN116912144A
Box beam internal crack detection method based on image processing
CN117670874A
Cited By
Accurate positioning method for battery puncture for new energy automobile fire
CN120852523A
