Portable engine carbon deposition degree distinguishing equipment and use method

By using endoscopes and embedded devices, a lightweight model deployment was achieved, improving the accuracy and real-time performance of carbon buildup identification.

CN121074339APending Publication Date: 2025-12-05ZHONGBEI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511177376.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing methods for determining the degree of carbon buildup in engines suffer from problems such as large network structures and a lack of portable determination devices, leading to errors in manual judgment and low efficiency.

Method used

A portable engine carbon buildup assessment device, including an endoscope, an embedded Jetson Orin Nano, and a touchscreen display, was used to acquire engine images. The carbon buildup level was assessed using the self-distillation model ShuffleNetV2 and an adaptive classifier. Image enhancement and an adaptive channel attention module were used for feature enhancement to build a lightweight model.

Benefits of technology

Achieving high-efficiency engine carbon buildup identification accuracy and real-time detection on portable embedded devices, improving accuracy by 3.15%, and realizing the effect of a lightweight model, solving the problem of portable engine carbon buildup identification devices, solving the problem in existing technologies, realizing lightweight model deployment, improving the accuracy of carbon buildup identification, and solving the problem in personal technology, achieving lightweight accuracy and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074339A_ABST
    Figure CN121074339A_ABST
Patent Text Reader

Abstract

The invention discloses portable engine carbon deposition degree judgment equipment and a use method, and belongs to the technical field of automobile detection. In order to solve the problems of large model parameters, lack of hardware deployment work and the like of the existing engine carbon deposition degree distinguishing method, portable engine carbon deposition degree distinguishing equipment is designed, the distinguishing equipment is used for carrying out image enhancement on an engine carbon deposition image, a feature-enhanced carbon deposition image is obtained, and a carbon deposition data set is expanded; constructing a self-distillation carbon deposition degree discrimination model, and inputting the training set into the model for training to obtain a trained self-distillation carbon deposition degree discrimination model; the self-distillation carbon deposition degree identification model after training is deployed on an embedded device Jetson Orin Nano; an image acquisition instruction is sent to the endoscope through the embedded device Jetson Orin Nano to acquire an engine carbon deposition image, the carbon deposition image is input into the discrimination model to be recognized, and a discrimination result is obtained; and the judgment result is transmitted to a human-computer interaction interface for analysis and display.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of automobile detection, and particularly relates to a portable engine carbon deposition degree discrimination device and a use method. BACKGROUND

[0002] Carbon deposition is an adherent produced by the mixture of unburned gasoline and air during the operation of an engine, which can affect the operation efficiency of the engine and even cause damage to the engine in severe cases. Timely discrimination of the carbon deposition degree of the engine and taking appropriate cleaning measures are of great significance to prolong the service life of the engine.

[0003] The current engine carbon deposition degree discrimination method mainly relies on workers to observe the internal image of the engine through an endoscope to discriminate the internal carbon deposition degree of the engine, which is greatly affected by personal subjective judgment and professional experience. For example, the engine detection method, system, computer equipment and storage medium disclosed in CN202110661929.9 propose an engine contamination judgment method, which provides a theoretical basis for engine carbon deposition degree discrimination, but manual judgment is prone to misjudgment and low efficiency. For example, the automobile engine carbon deposition degree discrimination method based on endoscopic imaging disclosed in CN202410604271.1 effectively solves the problem of automatic discrimination of the engine carbon deposition degree through deep learning, but the network parameters are too large to be deployed on embedded devices. SUMMARY

[0004] In view of the problems of large network structure and lack of a portable discrimination device in the current engine carbon deposition degree discrimination method, the application provides a portable engine carbon deposition degree discrimination device and a use method.

[0005] In order to achieve the above purpose, the following technical solutions are adopted in the application:

[0006] A portable engine carbon deposition degree discrimination device, which comprises an endoscope, an embedded device Jetson Orin Nano and a touch display screen.

[0007] The endoscope communicates with the embedded device Jetson Orin Nano, is used for collecting real-time images of the internal engine of a vehicle, and transmits the images to the embedded device Jetson Orin Nano.

[0008] The embedded device Jetson Orin Nano is used for real-time analysis and processing of vehicle images, and discriminates the carbon deposition degree of the engine according to the analysis and processing results.

[0009] The touch display screen is used for controlling the engine carbon deposition degree discrimination system and displaying the discrimination results of the carbon deposition degree of the engine in real time.

[0010] The man-machine interaction interface in the touch display screen comprises a to-be-judged area, a function selection area and a judgment information display area;

[0011] The to-be-judged area displays a to-be-judged carbon deposition image;

[0012] The function selection area comprises selection of local carbon deposition degree judgment, local pictures and videos, selection of external pictures and external video streams, start of judgment, judgment result saving and program exit;

[0013] The judgment information display area displays a judgment result, outputs a judged engine part, a carbon deposition degree and a judgment process time consumption.

[0014] A use method of a portable engine carbon deposition degree judgment device, the method comprising the following steps:

[0015] Step 1: collecting an engine carbon deposition image, performing image enhancement on the engine carbon deposition image to obtain a feature-enhanced carbon deposition image and expand a carbon deposition data set; dividing the data set into a training set and a test set according to a ratio of 8:2;

[0016] The specific operation of step 1 is: performing noise filtering and contrast enhancement on the carbon deposition image to strengthen the image carbon deposition features, and expanding the engine carbon deposition data set through image rotation, cropping and padding.

[0017] Step 2: constructing a self-distillation carbon deposition degree judgment model composed of a backbone network ShuffleNetV2 and a self-adaptive classifier;

[0018] The self-distillation carbon deposition degree judgment model in step 2 is composed of a backbone network ShuffleNetV2 and a self-adaptive classifier;

[0019] The backbone network ShuffleNetV2 is divided into an initial convolutional layer, three stages, a global pooling layer and a fully connected layer;

[0020] The self-adaptive classifier comprises three components, namely an SE channel attention module, a reshaping module Reshape and a fully connected layer with an activation function Softmax; the SE channel attention module adds adaptive weights to the channels of the feature maps output by each stage of ShuffleNetV2, the reshaping module Reshape converts the output features of the SE channel attention module to the same dimension and calculates a feature extraction loss, and the output features pass through the fully connected layer with the activation function Softmax to obtain each classification prediction score; wherein:

[0021] The SE channel attention module includes: Squeeze global information aggregation, Excitation channel weight learning, and Scale feature recalibration; thereby achieving adaptive channel weight adjustment.

[0022] Squeeze, the global information aggregation, i.e., the compression stage, involves performing global average pooling (GAP) on each channel, transforming the feature map from... Compress to The formula is:

[0023]

[0024] in, The input feature map size of the c-th channel is , It is the compressed channel statistics. The compression stage focuses on eliminating the influence of spatial dimension and the relationship between channels, forming something similar to "channel-level global context information".

[0025] Excitation channel weight learning, i.e., the activation phase, is achieved through two fully connected layers (FC) and a non-linear activation function. The first fully connected layer reduces the dimensionality, and the input is... The output is Where r is the compression ratio, usually taken as 16, followed by a ReLU activation function, and then a second fully connected layer for dimensionality increase, with the input being... The output is Followed by the Sigmoid activation function, the output weights are calculated. The specific formula is as follows:

[0026]

[0027] in, , These are the weights of the fully connected layer. It is the ReLU activation function. It is the Sigmoid function. During the excitation phase, the number of parameters is reduced by using a bottleneck structure and a method of first reducing dimensions and then increasing dimensions. The weights are output through the Sigmoid function to represent the importance of each channel.

[0028] Scale feature recalibration, also known as the scaling stage, involves multiplying each channel of the input feature map channel by channel, as shown in the following formula:

[0029]

[0030] in, It is the first The weight of each channel, It is the first of the original feature maps One channel, This is the recalibrated feature map; it enhances the response of important channels, suppresses irrelevant channels, and maintains the same feature map size. .

[0031] The Reshape module is used to reshape the feature maps output by the attention module for each SE channel. Mapping to the same dimension yields feature output. This facilitates subsequent soft distillation and characteristic distillation.

[0032] The reshaping module Reshape consists of a 1x1 convolutional layer, a normalization layer, and an activation layer. The feature output in the Reshape module... The specific formula is as follows:

[0033]

[0034] in, Indicates the first The feature inputs of each reshaping module, Indicates the first The convolution operation corresponding to each basic block Represents the convolution kernel parameters. Representing the The normalization layer corresponding to each basic block;

[0035] The fully connected layer with the Softmax activation function yields the final prediction score for each classifier. The feature output of each Reshape module is then processed. The process is sequentially handled through fully connected layers, as shown in the following formula:

[0036]

[0037] in, Indicates the first For each basic block, the corresponding fully connected layer is converted into a probability distribution by Softmax.

[0038] Step 3: Input the training set into the model for training to obtain a trained self-distillation carbon deposition level discrimination model. Deploy the trained self-distillation carbon deposition level recognition model on the embedded device Jetson Orin Nano.

[0039] The specific operation of step 3 is as follows:

[0040] The total loss of the self-distillation carbon deposition discrimination model is composed of three loss functions: cross-entropy loss, KL divergence loss, and L2 loss. The specific formulas are as follows:

[0041]

[0042] where, represents the cross-entropy loss function, which is used to calculate the difference between the predicted probability distribution and the real label of the training set, represents the KL divergence loss, which is used to measure the difference between two probabilities, represents the square loss, which is used to measure the distance between two vectors, and represents the hyperparameter, which is used to adjust the contribution of the KL loss and loss to the total loss;

[0043] The cross-entropy loss only acts on the last adaptive classifier, and the predicted probability distribution of the last adaptive classifier serves as an indicator to promote the learning of the model, and the specific formula is as follows:

[0044]

[0045] where, represents the number of samples, represents the predicted score obtained by the deepest basic block, represents the real label of the category;

[0046] The KL divergence loss measures the difference between the two probability distributions obtained by the teacher classifier and the student classifier, and by minimizing the KL divergence loss, the student's prediction is made as close to the teacher's prediction as possible, and the specific formula is as follows:

[0047]

[0048] where, represents the KL divergence loss, represents the number of samples, represents the number of classifiers, represents the output probability of the sample in the classifier, and cancels the gradient update when performing gradient backpropagation; represents the output probability of the sample in the classifier;

[0049] The L2 loss makes the features extracted by the student network as close as possible to the features extracted by the teacher network, thereby improving the representation ability of the student network output features and achieving feature distillation of the network, and the specific formula is as follows:

[0050]

[0051] where, represents the L2 loss, represents the number of samples, represents the number of classifiers, represents the feature vector of the th sample in the th classifier and cancels the update of the gradient when gradient backpropagation is performed; represents the feature vector of the th sample in the th classifier.

[0052] Step 4: The image acquisition instruction is sent to the endoscope acquisition engine carbon deposition image by the embedded device Jetson Orin Nano, the carbon deposition image is input into the discrimination model for identification, and the discrimination result is obtained;

[0053] Step 5: The discrimination result is transmitted to the human-computer interaction interface for analysis and display.

[0054] Compared with the prior art, the present application has the following advantages:

[0055] The present application aims at the problems of large model parameters and lack of hardware deployment work in the existing engine carbon deposition degree discrimination method, and designs a portable engine carbon deposition degree discrimination device and use method, which ensures high-efficiency inference of a lightweight model on a portable embedded device, and improves the accuracy of carbon deposition degree recognition by 3.15% compared with the benchmark model ShuffleNetV2, effectively meeting the accurate discrimination and real-time detection requirements of engine carbon deposition degree on portable embedded devices with weak computing performance, and having good market prospect. BRIEF DESCRIPTION OF DRAWINGS

[0056] Figure 1 It is an engine carbon deposition degree discrimination system structure diagram;

[0057] Figure 2 It is a stage structure diagram of ShuffleNetV2;

[0058] Figure 3 It is a whole network structure diagram of ShuffleNetV2;

[0059] Figure 4 It is a self-distillation ShuffleNetV2 network structure of the present application;

[0060] Figure 5 It is a discrimination result of the lightweight self-distillation model of the present application on the Jetson Orin Nano device; DETAILED DESCRIPTION

[0061] For a more complete understanding of the present application, it will be described in detail with reference to the following description. However, the present application has various implementations and is not limited to the specific examples listed herein. The presentation of these examples is intended to deepen the overall understanding of the disclosure of the present application.

[0062] A portable engine carbon deposition degree discrimination device, the discrimination device comprising an endoscope, an embedded device Jetson Orin Nano and a touch display screen;

[0063] The endoscope: in communication with the embedded device Jetson Orin Nano, for collecting real-time images of the engine interior, and transmitting the images to the embedded device Jetson Orin Nano;

[0064] The embedded device Jetson Orin Nano: for real-time analysis and processing of vehicle images, and discriminating the engine carbon deposition degree according to the analysis and processing results;

[0065] The touch display screen: for controlling the engine carbon deposition degree discrimination system and displaying the engine carbon deposition degree discrimination results in real time.

[0066] The human-computer interaction interface in the touch display screen includes a to-be-discriminated area, a function selection area and a discrimination information display area;

[0067] The to-be-discriminated area displays the to-be-discriminated carbon deposition image;

[0068] The function selection area includes selecting local carbon deposition degree discrimination, local pictures, videos, selecting external pictures, external video streams, starting discrimination, saving discrimination results and program exiting;

[0069] The discrimination information display area discriminates the results, outputs the discriminated engine parts, carbon deposition degree and discrimination process time consumption.

[0070] A use method of a portable engine carbon deposition degree discrimination device, as shown in Figure 1 The method comprises the following steps:

[0071] Step 1: collect engine carbon deposition images, enhance the engine carbon deposition images, obtain feature-enhanced carbon deposition images, and expand the carbon deposition data set; divide the data set into a training set and a test set according to the ratio of 8:2;

[0072] The specific operation of step 1 is: filtering noise and enhancing contrast of the carbon deposition images, strengthening the image carbon deposition features, and expanding the engine carbon deposition data set through image rotation, cropping and padding.

[0073] Step 2: build a self-distillation carbon deposit degree discrimination model composed of backbone network ShuffleNetV2 and self-adaptive classifier;

[0074] The self-distillation carbon deposit degree discrimination model in the step 2 is composed of backbone network ShuffleNetV2 and self-adaptive classifier, as shown in Figure 4 .

[0075] The backbone network ShuffleNetV2 is divided into an initial convolutional layer, three stages, a global pooling layer and a fully connected layer, wherein the ShuffleNet Unit (SNU) structure in the stage is shown in the left structure of Figure 2 , the DownsampleShuffleNet Unit (DSNU) structure in the stage is shown in the right structure of Figure 2 , and the overall structure of ShuffleNetV2 is shown in Figure 3 .

[0076] The self-adaptive classifier includes three components, namely an SE channel attention module, a reshaping module Reshape and a fully connected layer with an activation function Softmax; the SE channel attention module adds adaptive weights to the channels of the feature map output by each stage of ShuffleNetV2, the reshaping module Reshape converts the output features of the SE channel attention module to the same dimension and calculates the feature extraction loss, and the output features obtain each classification prediction score through the fully connected layer with the activation function Softmax; wherein:

[0077] The SE channel attention module includes Squeeze global information aggregation, Excitation channel weight learning and Scale feature recalibration; thereby realizing adaptive channel weight adjustment.

[0078] Squeeze global information aggregation, i.e. compression stage: global average pooling (GAP) is performed on each channel, and the feature map is compressed from to , and the formula is:

[0079]

[0080] wherein, is the input feature map size of the cth channel , is the compressed channel statistic, and the compression stage focuses on eliminating the influence of the spatial dimension and focusing on the relationship between channels to form a similar "channel-level global context information".

[0081] Excitation channel weight learning, i.e., the activation phase, is achieved through two fully connected layers (FC) and a non-linear activation function. The first fully connected layer reduces the dimensionality, and the input is... The output is Where r is the compression ratio, usually taken as 16, followed by a ReLU activation function, and then a second fully connected layer for dimensionality increase, with the input being... The output is Followed by the Sigmoid activation function, the output weights are calculated. The specific formula is as follows:

[0082]

[0083] in, , These are the weights of the fully connected layer. It is the ReLU activation function. It is the Sigmoid function. During the excitation phase, the number of parameters is reduced by using a bottleneck structure and a method of first reducing dimensions and then increasing dimensions. The weights are output through the Sigmoid function to represent the importance of each channel.

[0084] Scale feature recalibration, also known as the scaling stage, involves multiplying each channel of the input feature map channel by channel, as shown in the following formula:

[0085]

[0086] in, It is the first The weight of each channel, It is the first of the original feature maps One channel, This is the recalibrated feature map; it enhances the response of important channels, suppresses irrelevant channels, and maintains the same feature map size. .

[0087] The Reshape module is used to reshape the feature maps output by the attention module for each SE channel. Mapping to the same dimension yields feature output. This facilitates subsequent soft distillation and characteristic distillation.

[0088] The reshaping module Reshape consists of a 1x1 convolutional layer, a normalization layer, and an activation layer. The feature output in the Reshape module... The specific formula is as follows:

[0089]

[0090] in, Indicates the first The feature inputs of each reshaping module, represents the convolution operation corresponding to the represents the normalization layer corresponding to the

[0091] The fully connected layer with the activation function Softmax obtains the final prediction score of each classifier The feature output of each reshaping module Reshape is processed in turn through the fully connected layer, and the specific formula is as follows:

[0092]

[0093] represents the corresponding fully connected layer of the

[0094] Step 3: input the training set into the model for training to obtain a trained self-distillation accumulated carbon degree discrimination model, deploy the trained self-distillation accumulated carbon degree discrimination model on an embedded device Jetson Orin Nano, convert the trained accumulated carbon degree discrimination model into an ONNX format, and use the builder and parser of the TensorRT engine to convert the ONNX into an.engine format file with FP16 half precision, and further optimize the inference performance.

[0095] The specific operation of step 3 is as follows:

[0096] The total loss of the self-distillation accumulated carbon degree discrimination model is composed of cross-entropy loss, KL divergence loss, and L2 loss, and the specific formula is as follows:

[0097]

[0098] represents the cross-entropy loss function, which is used to calculate the difference between the predicted probability distribution and the real label of the training set, represents the KL divergence loss, which is used to measure the difference between two probabilities, represents the square loss, which is used to measure the distance difference between two vectors, and represent hyperparameters, which are used to adjust the contribution of the KL loss and loss to the total loss;

[0099] The cross-entropy loss only acts on the last adaptive classifier, and the predicted probability distribution of the last adaptive classifier is used as an indicator to promote the learning of the model, and the specific formula is as follows:​​​​​​​

[0100]

[0101] in, Indicates the number of samples. This represents the prediction score obtained from the deepest basic block. Indicates the first The true label of the category;

[0102] The KL divergence loss measures the difference between the two probability distributions obtained by the teacher and student classifiers. By minimizing the KL divergence loss, the student's prediction is made as close as possible to the teacher's prediction. The specific formula is as follows:

[0103]

[0104] in, This represents the KL divergence loss. Indicates the number of samples. Indicates the number of classifiers. Indicates the first The classifier outputs probabilities, and gradient updates are canceled during gradient backpropagation; Indicates the first The output probability of the classifier;

[0105] L2 loss makes the features extracted by the student network as close as possible to the features extracted by the teacher network, thereby improving the representational ability of the student network's output features and realizing feature distillation of the network. The specific formula is as follows:

[0106]

[0107] in Indicates L2 loss, Indicates the number of samples. Indicates the number of classifiers. Indicates that the j-th sample is in The feature vector of the classifier is updated, and the gradient update is canceled during gradient backpropagation; Indicates that the j-th sample is in The feature vector of the classifier.

[0108] Step 4: Send image acquisition commands to the endoscope via the embedded device Jetson Orin Nano to acquire images of engine carbon deposits, input the carbon deposit images into the discrimination model for identification, and obtain the discrimination results;

[0109] Step 5: Transmit the judgment results to the human-computer interaction interface for analysis and display.

[0110] In a specific embodiment, the discrimination device includes a touch display screen and an embedded device Jetson Orin Nano, sends acquisition instructions to the endoscope through the embedded device to obtain real-time engine internal images, selects a carbon deposition degree discrimination model and a discrimination method through the human-computer interaction interface, transmits the images to the carbon deposition degree discrimination model to obtain a discrimination result, displays the detection result on the human-computer interaction interface, and selects whether to save the result.

[0111] Table 1 is a comparison of experimental results of the present application:

[0112] Model Accuracy % Precision % Recall % F1 -score % ShuffleNetV2 85.63 85.25 85.20 85.22 The method of the invention 88.75 88.33 88.31 88.32

[0113] In the performance test phase, compared with the baseline model ShuffleNetV2, the portable engine carbon deposition degree discrimination method proposed in the present application maintains low parameter quantity and calculation amount in the inference stage, and the accuracy, precision, recall and F1 are increased by 3.12%, 3.08%, 3.11% and 3.10% respectively. The method is better suitable for high-precision carbon deposition degree discrimination and real-time inference on portable embedded devices with weak computing performance, and has good market application prospect.

[0114] The contents not described in detail in the specification of the present application belong to the prior art known to those skilled in the art. Although the above describes the specific embodiments of the present application for the purpose of facilitating the understanding of the present application by those skilled in the art, it should be clear that the present application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the present application defined and determined by the appended claims, and all the inventions utilizing the concept of the present application are within the scope of protection.

Claims

1. A portable engine carbon deposit level determination device characterized by comprising: The discrimination device comprises an endoscope, an embedded device Jetson Orin Nano and a touch display screen. The endoscope is in communication with the embedded device Jetson Orin Nano, and is configured to collect real-time images inside the engine of the vehicle and transmit the images to the embedded device Jetson Orin Nano. The embedded device Jetson Orin Nano is configured to perform real-time analysis and processing on the vehicle images and discriminate the degree of engine carbon deposition according to the analysis and processing results. The touch display screen is configured to control the engine carbon deposition degree discrimination system and display the discrimination results of the engine carbon deposition degree in real time.

2. The portable engine carbon deposit level determination device according to claim 1, characterized by, The human-computer interaction interface in the touch display screen comprises a to-be-discriminated area, a function selection area and a discrimination information display area. The to-be-discriminated area displays the to-be-discriminated carbon deposition images. The function selection area comprises selection of local carbon deposition degree discrimination, local pictures and videos, selection of external pictures and external video streams, start of discrimination, saving of discrimination results and program exit. The discrimination information display area displays the discrimination results, outputs the discriminated engine parts, the degree of carbon deposition and the time consumption of the discrimination process.

3. A method of using the portable engine carbon deposit level determination device according to any one of claims 1 or 2, characterized by, The method comprises the following steps: Step 1: collecting engine carbon deposition images, performing image enhancement on the engine carbon deposition images to obtain feature-enhanced carbon deposition images, and expanding the carbon deposition data set; dividing the data set into a training set and a test set according to a ratio of 8:2; Step 2: constructing a self-distillation carbon deposition degree discrimination model composed of a backbone network ShuffleNetV2 and a self-adaptive classifier; Step 3: inputting the training set into the model for training to obtain a trained self-distillation carbon deposition degree discrimination model, and deploying the trained self-distillation carbon deposition degree discrimination model on the embedded device Jetson Orin Nano; Step 4: sending an image collection instruction to the endoscope through the embedded device Jetson Orin Nano to collect engine carbon deposition images, inputting the carbon deposition images into the discrimination model for recognition, and obtaining discrimination results; Step 5: transmitting the discrimination results to the human-computer interaction interface for analysis and display.

4. The method of using a portable engine carbon deposit level determination device according to claim 3, wherein The specific operation of step 1 is to filter noise and enhance contrast of the carbon deposition images, strengthen the carbon deposition features of the images, and expand the engine carbon deposition data set through image rotation, cropping and padding.

5. The method of using a portable engine carbon deposit level determination device according to claim 4, wherein, The self-distillation carbon deposition degree discrimination model in step 2 is composed of a backbone network ShuffleNetV2 and a self-adaptive classifier. The backbone network ShuffleNetV2 comprises an initial convolutional layer, three stages, a global pooling layer and a fully connected layer. The adaptive classifier comprises three components, namely, an SE channel attention module, a reshaping module Reshape, and a fully connected layer with an activation function Softmax; the SE channel attention module adds adaptive weights to channels of feature maps output by each stage of ShuffleNetV2, the reshaping module Reshape converts the output features of the SE channel attention module to the same dimension and calculates a feature extraction loss, and the output features pass through the fully connected layer with the activation function Softmax to obtain classification prediction scores; wherein: The SE channel attention module comprises: Squeeze global information aggregation, Excitation channel weight learning, and Scale feature recalibration; Squeeze global information aggregation, i.e. compression phase: global average pooling is performed on each channel to compress the feature map from to , the formula is: wherein, is the input feature map size of the cth channel , is the compressed channel statistics; Excitation channel weight learning, i.e. the excitation stage: realized by two fully connected layers and nonlinear activation functions, the first fully connected layer reduces dimensionality, the input is , and the output is , where r is the compression ratio, followed by a ReLU activation function, the second fully connected layer increases dimensionality, the input is , and the output is , followed by a Sigmoid activation function, the output weight is , and the specific formula is as follows: wherein, , is a fully connected layer weight, is a ReLU activation function, is a Sigmoid function; Scale feature recalibration, namely, a scaling stage: performing channel-by-channel multiplication on each channel of the input feature map, and the specific formula is as follows: wherein, is the weight of the th channel, is the th channel of the original feature map, is the re-calibrated feature map; The Reshape module is used to reshape the feature map output by each SE channel attention module to the same dimension to obtain a feature output ; The reshape module Reshape is composed of a 1x1 convolution layer, a normalization layer, and an activation layer. The specific formula of the feature output in the reshape module Reshape is as follows: ​ wherein, represents the feature input of the th reshaping module, represents the convolution operation corresponding to the th basic block, represents the convolution kernel parameter, represents the normalization layer corresponding to the th basic block; The full connection layer with the activation function Softmax obtains the final prediction score of each classifier The feature output of each reshaping module Reshape The full connection layer is processed in turn, and the specific formula is as follows: wherein, denotes the corresponding fully connected layer of the nth basic block, and Softmax converts the fully connected layer output into a probability distribution.

6. The method of using a portable engine carbon deposit level determination device according to claim 5, wherein, The specific operation of step 3 is as follows: The total loss of the training self-distillation accumulated carbon degree discrimination model is composed of three loss functions, namely, cross-entropy loss, KL divergence loss, and L2 loss, and the specific formula is as follows: where, represents the cross-entropy loss function, which is used to calculate the difference between the predicted probability distribution and the real label of the training set, represents the KL divergence loss, which is used to measure the difference between two probabilities, represents the square loss, which is used to measure the distance between two vectors, and represents the hyperparameter, which is used to adjust the contribution of the KL loss and loss to the total loss; The cross-entropy loss only acts on the last adaptive classifier, and the prediction probability distribution of the last adaptive classifier is used as an index to promote the learning of the model, and the specific formula is as follows: wherein, denotes the number of samples, denotes the prediction score obtained by the deepest base block, denotes the true label of the class, the class. The KL divergence loss measures the difference between the two probability distributions obtained by the teacher classifier and the student classifier, and by minimizing the KL divergence loss, the prediction of the student is made as close to the prediction of the teacher as possible, and the specific formula is as follows: wherein, denotes the KL divergence loss, denotes the number of samples, denotes the number of classifiers, denotes the output probability of the i-th classifier, denotes the output probability of the i-th classifier and cancels the update of the gradient when backpropagating the gradient; denotes the output probability of the i-th classifier, denotes the output probability of the i-th classifier. The L2 loss makes the features extracted by the student network as close as possible to the features extracted by the teacher network, thereby improving the representation ability of the output features of the student network and achieving feature distillation of the network, and the specific formula is as follows: ,in, Indicates L2 loss, Indicates the number of samples. Indicates the number of classifiers. Indicates that the j-th sample is in The feature vector of the classifier is updated, and the gradient update is canceled during gradient backpropagation; Indicates that the j-th sample is in The feature vector of the classifier.

Citation Information

Patent Citations

  • Engine detection method, system, computer device and storage medium

    CN113284131B

  • Automobile engine carbon deposition degree discrimination method based on endoscopic imaging

    CN118537636A