Road crack detection method based on causal decoupling, electronic equipment and storage medium
By introducing the transformer self -encoder between the characteristic extractor and the classifier of the deep learning model, separate and discard mixed features, only the cause and effect component is used for detection, solving the problem of identifying the difficulty of mixed characteristics in the road crack detection of the road. , Improve the accuracy and robustness of the detection.
Patent Information
- Application Number
- CN202411368410.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Existing deep learning models are difficult to effectively identify and filter mixed features in road crack detection, resulting in unsatisfactory detection results and lack of sufficient robustness.
By setting a variational autoencoder between the feature extractor and the classifier, the causal component and the confounding component are separated, the confounding component is discarded, and only the causal component is input into the classifier for classification detection.
Effectively eliminate unstable environmental interference, improve the accuracy of road crack detection, and enhance the generalization of target detection models.
Smart Images

Figure CN119360085A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of road detection, and in particular to a road crack detection method, electronic device and storage medium based on causal decoupling. Background Art
[0002] As the materials and structures of roads are inevitably damaged in long-term use, problems such as rutting, looseness and cracks will appear on the road surface. These problems reduce the bearing capacity and water resistance of the road surface, and pose a great safety hazard to the health of the road. As one of the most common and serious structural damages, the detection of road cracks is a prerequisite for subsequent maintenance and repair of the road surface.
[0003] In the prior art, it has been proposed to use deep learning models for road crack detection. However, since the process of road image acquisition is affected by environmental factors such as lighting conditions and road surface texture, and deep learning models often only learn statistical laws in training data rather than causal relationships, it is easy to establish false associations between mixed features and detection tasks, making it difficult for deep learning models to identify and filter out mixed features from input road images in actual applications, resulting in unsatisfactory road crack detection results. Summary of the invention
[0004] The main purpose of this application is to propose a road crack detection method, electronic device and storage medium based on causal decoupling, which can effectively eliminate the influence of unstable environmental interference, improve the accuracy of road crack detection, and enhance the generalization ability of the target detection model.
[0005] To achieve the above objectives, one aspect of the present application proposes a road crack detection method based on causal decoupling, the method comprising: Acquire a road image to be tested; The road image to be tested is input into a target detection model, which includes a feature extractor, a variational autoencoder and a classifier. The feature extractor is used to extract the image features to be tested from the road image to be tested. The variational autoencoder is used to decouple the causal features to be tested and the mixed features to be tested from the image features to be tested, and the mixed features are eliminated. The classifier is used to classify and detect the causal features to be tested to obtain a road crack detection result.
[0006] Furthermore, the target detection model is trained in the following way: Acquire multiple data groups, each of the data groups comprises an original road image and a first road image, the first road image is obtained by performing background intervention on the original road image, the original road image carries a true label, and the first road image carries true intervention intensity information; Inputting the multiple data groups into the initial detection model for processing to obtain multiple mixed feature information, multiple predicted probability distribution information and multiple predicted label information corresponding to the multiple data groups; Determining a total loss according to multiple pieces of mixed feature information, multiple pieces of predicted probability distribution information, multiple pieces of predicted label information, multiple true labels, and multiple pieces of true intervention intensity information corresponding to the multiple data groups; The initial detection model is trained according to the total loss to obtain the target detection model.
[0007] Furthermore, the first road image is obtained by: The original road image is subjected to brightness distortion according to the brightness adjustment parameter to obtain the first road image, and the brightness adjustment parameter is used as the real intervention intensity information.
[0008] Furthermore, the first road image is obtained by: The original road image is texture-smoothed by a Gaussian pyramid to obtain the first road image, and a standard deviation of a filter used in the Gaussian pyramid is used as the true intervention intensity information.
[0009] Further, the initial detection model includes an initial feature extractor, an initial variational autoencoder and an initial classifier; the inputting the multiple data groups into the initial detection model for processing to obtain multiple mixed feature information, multiple predicted probability distribution information and multiple predicted label information corresponding to the multiple data groups includes: Using the initial feature extractor to perform feature extraction on each of the data groups to obtain image feature information corresponding to each of the data groups; Using the initial variational autoencoder to perform feature decoupling on the image feature information corresponding to each of the data groups, to obtain causal feature information and mixed feature information corresponding to each of the data groups; The initial classifier is used to perform classification detection on the causal feature information corresponding to each of the data groups to obtain the predicted probability distribution information and predicted label information corresponding to each of the data groups.
[0010] Further, determining the total loss according to the multiple mixed feature information, the multiple predicted probability distribution information, the multiple predicted label information, the multiple real labels and the multiple real intervention intensity information corresponding to the multiple data groups includes: Determining distribution consistency loss according to multiple predicted probability distribution information corresponding to the multiple data groups; Determining background intervention loss according to multiple pieces of mixed feature information and multiple pieces of real intervention intensity information corresponding to the multiple data groups; Determining a classification loss according to a plurality of predicted label information and a plurality of true labels corresponding to the plurality of data groups; The total loss is determined according to the distribution consistency loss, the background intervention loss and the classification loss.
[0011] Further, the predicted probability distribution information corresponding to each of the data groups includes an original probability distribution corresponding to the original road image and a first probability distribution corresponding to the first road image; and determining the distribution consistency loss according to the multiple predicted probability distribution information corresponding to the multiple data groups includes: Evaluate the difference between the original probability distribution and the first probability distribution corresponding to each of the data groups by using a maximum mean difference loss function to obtain a first loss corresponding to each of the data groups; The distribution consistency loss is determined according to a plurality of first losses corresponding to the plurality of data groups.
[0012] Further, the confounding feature information corresponding to each of the data groups includes an original confounding feature corresponding to the original road image and a first confounding feature corresponding to the first road image; and determining the background intervention loss according to the multiple confounding feature information corresponding to the multiple data groups and the multiple real intervention intensity information includes: Determine feature difference information corresponding to each of the data groups according to the original mixed feature and the first mixed feature corresponding to each of the data groups; Using a multi-layer perceptron to process the feature difference information corresponding to each of the data groups, to obtain the predicted intervention intensity information corresponding to each of the data groups; Evaluate the difference between the predicted intervention intensity information and the actual intervention intensity information corresponding to each of the data groups by using an L1 norm loss function to obtain a second loss corresponding to each of the data groups; The background intervention loss is determined according to a plurality of second losses corresponding to the plurality of data groups.
[0013] To achieve the above objective, another aspect of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.
[0014] To achieve the above objective, another aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0015] The present application includes at least the following beneficial effects: by setting a variational autoencoder between a feature extractor and a classifier, using the variational autoencoder to reliably separate causal components and mixed components from the image features output by the feature extractor, explicitly discarding the mixed components, and only inputting the causal components into the classifier for classification detection, the influence of unstable environmental interference can be effectively eliminated, thereby improving the accuracy of road crack detection and enhancing the generalization ability of the target detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of a road crack detection method based on causal decoupling provided in an embodiment of the present application; Figure 2 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of systems and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0018] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0019] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0021] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0022] Variational Autoencoder (VAE) is a generative model specially designed to capture the potential probability distribution of a given data set and generate new samples. Its network architecture is formed by an encoder and a decoder. The encoder is used to convert the input data into a potential representation, and the decoder is used to reconstruct the original data based on the potential representation. The variational autoencoder is programmed to minimize the difference between the original data and the reconstructed data, so that it can understand the underlying data distribution and generate new samples that conform to the same distribution.
[0023] The construction of transportation infrastructure is crucial to ensuring people's livelihood and promoting development. As an important part of transportation hubs, roads not only bear the heavy responsibility of transportation, but also affect the safety of personnel. Due to the long-term use of road materials and structures, various damages are inevitable, resulting in rutting, looseness and cracks on the road surface. These problems reduce the bearing capacity and water resistance of the road surface, and pose a great safety hazard to the health of the road. As one of the most common and serious structural damages, the detection of road cracks is a prerequisite for subsequent maintenance and repair of the road surface.
[0024] In the prior art, some scholars have proposed to use deep learning models for road crack detection. The deep learning model can autonomously extract representative features from input road images, thereby realizing road crack detection in an end-to-end manner and avoiding cumbersome and unstable parameter adjustments. However, since the image acquisition process of the road is affected by environmental factors such as lighting conditions and road surface texture, the deep learning model relies too much on data-driven learning methods during training and lacks causal guidance. It often learns statistical laws in the training data rather than causal relationships, and easily establishes false associations between mixed features and detection tasks, making it difficult for the deep learning model to identify and filter out mixed features from the input road images in actual applications, resulting in unsatisfactory road crack detection results. That is, the deep learning model lacks sufficient robustness in complex environments and is easily disturbed by noise and uncertain factors.
[0025] In view of this, an embodiment of the present application provides a road crack detection method, an electronic device and a storage medium based on causal decoupling. The solution sets a variational autoencoder between a feature extractor and a classifier, uses the variational autoencoder to reliably separate causal components and mixed components from the image features output by the feature extractor, explicitly discards the mixed components, and only inputs the causal components into the classifier for classification detection. This can effectively eliminate the influence of unstable environmental interference, thereby improving the accuracy of road crack detection and enhancing the generalization ability of the target detection model.
[0026] A road crack detection method based on causal decoupling provided in an embodiment of the present application relates to the field of road detection technology, and can be applied to a terminal, a server, or software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a vehicle-mounted terminal, etc., but is not limited thereto; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the above-mentioned road crack detection method based on causal decoupling, etc., but is not limited to the above forms.
[0027] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0028] Figure 1 is an optional flow chart of a road crack detection method based on causal decoupling provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S102: Step S101, obtaining a road image to be tested; Step S102: input the road image to be tested into the target detection model. The target detection model includes a feature extractor, a variational autoencoder and a classifier. The feature extractor is used to extract the image features to be tested from the road image to be tested. The variational autoencoder is used to decouple the causal features to be tested and the mixed features to be tested from the image features to be tested, and the mixed features are eliminated. The classifier is used to classify and detect the causal features to be tested to obtain the road crack detection result.
[0029] Among them, the road crack detection result may include a prediction label for characterizing whether cracks appear on the road and a semantic segmentation feature map corresponding to the road image to be tested. The crack area and the non-crack area are clearly divided on the semantic segmentation feature map, and the non-crack area is the background area.
[0030] In steps S101 to S102 shown in the embodiment of the present application, a variational autoencoder is set between the feature extractor and the classifier, and the variational autoencoder is used to reliably separate the causal component and the mixed component from the image features output by the feature extractor, and the mixed component is explicitly discarded. Only the causal component is input into the classifier for classification detection, which can effectively eliminate the influence of unstable environmental interference, thereby improving the accuracy of road crack detection.
[0031] In step S102 of some embodiments, the target detection model is trained based on a pre-built initial detection model. The specific training process may include but is not limited to steps S201 to S204: Step S201, obtaining a plurality of data groups, each of which includes an original road image and a first road image, wherein the first road image is obtained by performing background intervention on the original road image; The original road image carries a real label, which is used to characterize whether cracks appear on the road surface, and the first road image carries real intervention intensity information; Step S202: inputting multiple data groups into the initial detection model for processing to obtain multiple mixed feature information, multiple predicted label information and multiple predicted probability distribution information corresponding to the multiple data groups; Step S203, determining a total loss according to multiple mixed feature information, multiple predicted label information, multiple predicted probability distribution information, multiple real intervention intensity information and multiple real labels corresponding to multiple data groups; Step S204: train the initial detection model according to the total loss to obtain a trained target detection model, and the present application preferably uses the Adam optimizer to complete the model training.
[0032] In steps S201 to S204 shown in the embodiment of the present application, multi-domain road image data is generated by introducing a background intervention method, so that the initial detection model learns domain-invariant information (such as feature expressions of different types of cracks) and domain-specific information (such as environmental feature expressions such as lighting conditions and background textures) between road image data in different domains during the training process to effectively guide the separation between causal components and confounding components, which is conducive to enhancing the generalization ability of the target detection model.
[0033] In step S201 of some embodiments, the multiple original road images included in the multiple data groups are preferably randomly selected from an existing CrackForest dataset, which is an annotated road crack image database that can roughly reflect the urban road surface conditions.
[0034] In step S201 of some embodiments, background intervention is performed on the original road image to obtain a first road image, which can be performed as follows: the original road image is subjected to brightness distortion according to a brightness adjustment parameter, that is, the RGB value of each pixel contained in the original road image is added to the brightness adjustment parameter to obtain the first road image having a brightness difference from the original road image, and the brightness adjustment parameter is used as the real intervention intensity information carried by the first road image.
[0035] Taking into account the changes in brightness conditions that may occur during road image acquisition, the original road image is enhanced by using brightness adjustment to form the data set required for training the model, so that the trained model can effectively eliminate the impact of environmental interference such as changes in brightness conditions when applied in practice.
[0036] In step S201 of some embodiments, background intervention is performed on the original road image to obtain a first road image, which can also be expressed as: texture smoothing is performed on the original road image through a Gaussian pyramid, that is, multiple Gaussian filtering and downsampling processes are performed on the original road image to obtain the first road image that has texture distinction from the original road image, and the standard deviation of the filter used in the Gaussian pyramid is used as the real intervention intensity information carried by the first road image.
[0037] It should be noted that, when the standard deviation of the filter used in the Gaussian pyramid is smaller, the smoothing effect on the original road image is weaker, so that more texture and details of the original road image are retained; on the contrary, when the standard deviation of the filter used in the Gaussian pyramid is larger, the smoothing effect on the original road image is stronger, so that more texture and details of the original road image are removed.
[0038] Taking into account the situation that the road surface texture may change during the process of road image acquisition, the original road image is enhanced by adopting a texture smoothing method based on Gaussian pyramid to form the data set required for training the model, so that the trained model can effectively eliminate the impact of environmental interference such as road surface texture change in practical application.
[0039] It should be noted that in order to improve the effectiveness and reliability of model training, when the model is only applied in an environment where brightness conditions change, different brightness adjustment parameters can be used directly to perform brightness distortion on different original road images; when the model is only applied in an environment where road surface texture changes, different filter standard deviations can be used directly to perform texture smoothing based on Gaussian pyramid on different original road images; when the model needs to be applied in a complex environment where brightness conditions change and road surface texture changes occur, multiple different original road images are divided into two non-intersecting image subsets, and all original road images contained in the first image subset are subjected to brightness distortion using different brightness adjustment parameters, and all original road images contained in the second image subset are subjected to texture smoothing based on Gaussian pyramid using different filter standard deviations; this application does not make any limitation on this.
[0040] In addition, considering that other types of environmental changes may occur in the process of road image acquisition, the original road image can be enhanced by formulating background intervention strategies related to these other types of environmental changes to form the data set required for training the model, so that the trained model can effectively eliminate the impact of these other types of environmental changes in actual application, thereby reflecting the flexibility of the model at the application level.
[0041] In step S202 of some embodiments, the initial detection model includes an initial feature extractor, an initial variational autoencoder and an initial classifier. The initial feature extractor is preferably constructed using an existing U-Net network architecture, and the initial classifier is preferably constructed using an existing logistic regression classifier.
[0042] In some embodiments, the above step S202 may include but is not limited to steps S301 to S303: Step S301, performing feature extraction on each data group by the initial feature extractor to obtain image feature information corresponding to each data group; Step S302: Decoupling the image feature information corresponding to each data group through the initial variational autoencoder to obtain the mixed feature information and causal feature information corresponding to each data group; Step S303: classify and detect the causal feature information corresponding to each data group through the initial classifier to obtain the predicted label information and predicted probability distribution information corresponding to each data group.
[0043] Taking any data group as an example, the implementation of the above step S202 is further described as follows: For the original road image and the first road image included in the data group, the initial feature extractor is used to perform feature extraction on the original road image to obtain an original image feature, and the initial feature extractor is used to perform feature extraction on the first road image to obtain a first image feature, and the image feature information corresponding to the data group includes the original image feature corresponding to the original road image and the first image feature corresponding to the first road image; The original image feature is feature decoupled by the initial variational autoencoder to obtain an original mixed feature and an original causal feature, the first image feature is feature decoupled by the initial variational autoencoder to obtain a first mixed feature and a first causal feature, the mixed feature information corresponding to the data group includes the original mixed feature corresponding to the original road image and the first mixed feature corresponding to the first road image, and the causal feature information corresponding to the data group includes the original causal feature corresponding to the original road image and the first causal feature corresponding to the first road image; The original causal feature is classified and detected by the initial classifier to obtain predicted label information and the original probability distribution, and the first causal feature is classified and detected by the initial classifier to obtain the first probability distribution. The predicted probability distribution information corresponding to the data group includes the original probability distribution corresponding to the original road image and the first probability distribution corresponding to the first road image. The predicted label information corresponding to the data group includes the predicted label corresponding to the original road image and the probability of belonging to the predicted label.
[0044] Steps S301 to S303 shown in the embodiment of the present application, by utilizing the initial detection model to parse multiple data groups to obtain relevant specific data therefrom, can provide data support for the subsequent steps of determining the total loss to further train the model.
[0045] In some embodiments, the above step S203 may include but is not limited to steps S401 to S404: Step S401: determining a distribution consistency loss according to multiple prediction probability distribution information corresponding to multiple data groups, and using the distribution consistency loss to guide the model to collect domain invariant information during the training process, so that the model can learn the ability to effectively separate causal features; Step S402: determining background intervention loss according to multiple real intervention intensity information and multiple confounding feature information corresponding to multiple data groups, and using the background intervention loss to guide the model to collect domain-specific information during training, so that the model can learn the ability to effectively separate confounding features; Step S403: Determine the classification loss according to the multiple real labels and the multiple predicted label information corresponding to the multiple data groups. The classification loss can enable the model to learn basic feature classification capabilities, and the present application preferably uses a cross entropy loss function for semantic prediction learning; Step S404: Determine the total loss according to the distribution consistency loss, the background intervention loss and the classification loss by using the following expression:
[0046] In the formula, For the total loss, is the classification loss, is the distribution consistency loss, is the weight of the distribution consistency loss in the total loss, is the background intervention loss, is the weight of the background intervention loss in the total loss.
[0047] In some embodiments, the above step S401 may include but is not limited to steps S501 to S502: Step S501: Use the Maximum Mean Discrepancy (MMD) loss function to evaluate the difference between the original probability distribution corresponding to each data group and the first probability distribution to obtain the first loss corresponding to each data group, which is specifically implemented by the following expression:
[0048] Step S502: According to the multiple first losses corresponding to the multiple data groups, the distribution consistency loss is determined by the following expression:
[0049] In the formula, is the original probability distribution corresponding to the i-th data group, is the first probability distribution corresponding to the i-th data group, To find the expected value of a probability distribution, is the first loss corresponding to the i-th data group, is the number of multiple data groups.
[0050] Steps S501 to S502 shown in the embodiment of the present application, by introducing the maximum mean difference loss function to perform the distribution consistency constraint task, can effectively guide the model to limit the causal components to generate a consistent prediction distribution under background intervention during the training process.
[0051] In some embodiments, the above step S402 may include but is not limited to steps S601 to S604: Step S601: According to the original mixed features and the first mixed features corresponding to each data group, the feature difference information corresponding to each data group is determined by the following expression:
[0052] Step S602: Use a multilayer perceptron (MLP) to process the feature difference information corresponding to each data group to obtain the predicted intervention intensity information corresponding to each data group. The following expression is used to implement this:
[0053] Step S603: Evaluate the difference between the predicted intervention intensity information and the actual intervention intensity information corresponding to each data group by using the L1 norm loss function to obtain the second loss corresponding to each data group, which is specifically implemented by the following expression:
[0054] Step S604: Determine the background intervention loss according to the multiple second losses corresponding to the multiple data groups by using the following expression:
[0055] In the formula, is the original mixed feature corresponding to the i-th data group, is the first mixed feature corresponding to the i-th data group, is the feature difference information corresponding to the i-th data group, is the predicted intervention intensity information corresponding to the i-th data group, is the real intervention intensity information corresponding to the i-th data group, is the second loss corresponding to the i-th data group.
[0056] Steps S601 to S604 shown in the embodiment of the present application, by introducing a multi-layer perceptron and an L1 norm loss function to perform the background intervention intensity prediction task, can effectively guide the model to capture as much domain-specific information as possible during the training process.
[0057] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned road crack detection method based on causal decoupling when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0058] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0059] See also Figure 2 , Figure 2 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes: The processor 701 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 702 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 702 may store an operating system and other application programs. When the technical solution provided in the embodiment of the present application is implemented by software or firmware, the relevant program code is stored in the memory 702, and the processor 701 calls and executes the technical solution provided in the embodiment of the present application; Input / output interface 703, used to implement information input and output; Communication interface 704, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.); A bus 705 that transmits information between various components of the device (e.g., the processor 701, the memory 702, the input / output interface 703, and the communication interface 704); The processor 701 , the memory 702 , the input / output interface 703 and the communication interface 704 are connected to each other in communication within the device via the bus 705 .
[0060] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned road crack detection method based on causal decoupling is implemented.
[0061] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0062] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0063] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0064] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0065] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0066] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0067] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0068] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0069] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0070] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0071] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0072] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0073] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A road crack detection method based on causal decoupling, characterized in that: The method comprises: Acquire a road image to be tested; The road image to be tested is input into a target detection model, which includes a feature extractor, a variational autoencoder and a classifier. The feature extractor is used to extract the image features to be tested from the road image to be tested. The variational autoencoder is used to decouple the causal features to be tested and the mixed features to be tested from the image features to be tested, and the mixed features are eliminated. The classifier is used to classify and detect the causal features to be tested to obtain a road crack detection result.
2. The road crack detection method based on causal decoupling according to claim 1 is characterized in that: The target detection model is trained in the following way: Acquire multiple data groups, each of the data groups comprises an original road image and a first road image, the first road image is obtained by performing background intervention on the original road image, the original road image carries a true label, and the first road image carries true intervention intensity information; Inputting the multiple data groups into the initial detection model for processing to obtain multiple mixed feature information, multiple predicted probability distribution information and multiple predicted label information corresponding to the multiple data groups; Determining a total loss according to multiple pieces of mixed feature information, multiple pieces of predicted probability distribution information, multiple pieces of predicted label information, multiple true labels, and multiple pieces of true intervention intensity information corresponding to the multiple data groups; The initial detection model is trained according to the total loss to obtain the target detection model.
3. The road crack detection method based on causal decoupling according to claim 2 is characterized in that: The first road image is obtained by: The original road image is subjected to brightness distortion according to the brightness adjustment parameter to obtain the first road image, and the brightness adjustment parameter is used as the real intervention intensity information.
4. The road crack detection method based on causal decoupling according to claim 2 is characterized in that: The first road image is obtained by: The original road image is texture-smoothed by a Gaussian pyramid to obtain the first road image, and a standard deviation of a filter used in the Gaussian pyramid is used as the true intervention intensity information.
5. The road crack detection method based on causal decoupling according to claim 2, characterized in that: The initial detection model includes an initial feature extractor, an initial variational autoencoder and an initial classifier; the inputting the multiple data groups into the initial detection model for processing to obtain multiple mixed feature information, multiple prediction probability distribution information and multiple prediction label information corresponding to the multiple data groups includes: Using the initial feature extractor to perform feature extraction on each of the data groups to obtain image feature information corresponding to each of the data groups; Using the initial variational autoencoder to perform feature decoupling on the image feature information corresponding to each of the data groups, to obtain causal feature information and mixed feature information corresponding to each of the data groups; The initial classifier is used to perform classification detection on the causal feature information corresponding to each of the data groups to obtain the predicted probability distribution information and predicted label information corresponding to each of the data groups.
6. The road crack detection method based on causal decoupling according to claim 2, characterized in that: The determining of the total loss according to the multiple mixed feature information, the multiple predicted probability distribution information, the multiple predicted label information, the multiple real labels and the multiple real intervention intensity information corresponding to the multiple data groups comprises: Determining distribution consistency loss according to multiple predicted probability distribution information corresponding to the multiple data groups; Determining background intervention loss according to multiple pieces of mixed feature information and multiple pieces of real intervention intensity information corresponding to the multiple data groups; Determining a classification loss according to a plurality of predicted label information and a plurality of true labels corresponding to the plurality of data groups; The total loss is determined according to the distribution consistency loss, the background intervention loss and the classification loss.
7. The road crack detection method based on causal decoupling according to claim 6 is characterized in that: The predicted probability distribution information corresponding to each of the data groups includes an original probability distribution corresponding to the original road image and a first probability distribution corresponding to the first road image; and determining the distribution consistency loss according to the multiple predicted probability distribution information corresponding to the multiple data groups includes: Evaluate the difference between the original probability distribution and the first probability distribution corresponding to each of the data groups by using a maximum mean difference loss function to obtain a first loss corresponding to each of the data groups; The distribution consistency loss is determined according to a plurality of first losses corresponding to the plurality of data groups.
8. The road crack detection method based on causal decoupling according to claim 6, characterized in that: The mixed feature information corresponding to each of the data groups includes original mixed features corresponding to the original road image and first mixed features corresponding to the first road image; The determining of the background intervention loss according to the multiple mixed feature information and the multiple real intervention intensity information corresponding to the multiple data groups comprises: Determine feature difference information corresponding to each of the data groups according to the original mixed feature and the first mixed feature corresponding to each of the data groups; Using a multi-layer perceptron to process the feature difference information corresponding to each of the data groups, to obtain the predicted intervention intensity information corresponding to each of the data groups; Evaluate the difference between the predicted intervention intensity information and the actual intervention intensity information corresponding to each of the data groups by using an L1 norm loss function to obtain a second loss corresponding to each of the data groups; The background intervention loss is determined according to a plurality of second losses corresponding to the plurality of data groups.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Remote sensing image cross-domain classification method based on interpretable deep learning
CN113537317A
Industrial system intelligent fault diagnosis system and method thereof
CN116520806A
Fault diagnosis method of time sequence convolutional network based on causal attention
CN116839900A
Face living body detection method based on hierarchical feature joint modulation
CN117711072A
Feature enhancement method and device for image recognition, equipment and storage medium
CN118397290A
Cited By
Multimedia data processing method and device
CN119940520A
Method and apparatus for processing multimedia data
CN119940520B
