CN116188973A - Crack detection method based on cognitive generation mechanism - Google Patents

Crack detection method based on cognitive generation mechanism Download PDF

Info

Publication number
CN116188973A
CN116188973A CN202211627479.2A CN202211627479A CN116188973A CN 116188973 A CN116188973 A CN 116188973A CN 202211627479 A CN202211627479 A CN 202211627479A CN 116188973 A CN116188973 A CN 116188973A
Authority
CN
China
Prior art keywords
image
crack
sampling
generating
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211627479.2A
Other languages
Chinese (zh)
Other versions
CN116188973B (en
Inventor
张德津
李清泉
田霖
何莉
郭文浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN202211627479.2A priority Critical patent/CN116188973B/en
Publication of CN116188973A publication Critical patent/CN116188973A/en
Application granted granted Critical
Publication of CN116188973B publication Critical patent/CN116188973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/182Network patterns, e.g. roads or rivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/809Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of classification results, e.g. where the classifiers operate on the same input data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a crack detection method of a cognitive generation mechanism, which comprises the following steps: acquiring an image containing a crack and an ambient light image based on the illumination model, and generating a sampling label based on a domain-first random sampling algorithm and the image containing the crack; generating a crack image and a surface image according to the crack generation algorithm, the surface generation algorithm and the sampling label; fusing the crack image and the surface image, and comparing the crack image and the surface image with an original image to be detected to obtain a comparison result; selecting a region with the largest pixel difference from the comparison result, returning to the sampling step if the region is larger than the threshold value, resampling the region, and regenerating a crack image and a surface image; and repeating the process until the area with the largest pixel difference in the comparison result is smaller than the threshold value. The method combines semantic generation detection and visual feature detection; the consistency of information in the generated image and the original image is solved by solving the problem of improving the signal sampling method; and correcting the deviation through local feedback, so as to ensure the reliability of the result.

Description

Crack detection method based on cognitive generation mechanism
Technical Field
The invention relates to the field of crack detection, in particular to a crack detection method based on a cognitive generation mechanism.
Background
Currently, there is increasing attention to automatic or semi-automatic detection of cracks in surfaces (pavement, tunnel lining, and building walls, etc.). Among them, computer vision technology is used as a substitute for human eyes in a specific scene (such as a road surface or a wall), and cracks can be rapidly detected and quantified. Existing crack detection methods can be broadly classified into three types, namely, a classification-based detection method, a detection-based detection method, and a segmentation-based detection method.
Classification-based detection methods: the problem of crack detection is regarded as a classification problem, the purpose of which is to determine whether the output image has a label containing a crack. The common practice is to divide the image into a plurality of blocks, classify the block image by using a method such as a CNN (Convolutional Neural Networks, convolutional neural network) series network, and return a label as a crack image if the block image contains a certain number of crack pixels;
detection method based on detection: the problem of crack detection is considered as a classification plus localization problem, the purpose of which is to determine whether an image contains a crack, if so, to give the location of the crack, usually circled with a rectangular frame. The method has two main ideas of a two-stage method and a single-stage method: the two-stage method is to calculate candidate areas first and then classify the candidate areas, such as RCNN (Region-CNN) series network; the single-stage method is to output classification and positioning results simultaneously, such as SSD (Single Shot MultiBox Detector, an object detection algorithm) series network and YOLO (You Only Look Once, an object detection algorithm) series network.
Segmentation-based detection method: the crack detection problem is regarded as a segmentation problem, and the purpose of the crack detection problem is to divide each pixel point in an input image into corresponding categories, so that not only can the target model be classified, but also accurate positions and features (such as directions, lengths and the like) can be obtained. This class of methods is currently the most commonly used, covering the classical threshold segmentation to SVM (Support Vector Machine ), FCN (Fully Convolutional Networks, full convolutional neural network) series networks, and U-NET series networks, etc.
For the conventional detection algorithm, ensuring that the detection results have both 'semantic similarity' and 'visual similarity' is a difficult challenge. However, the actual crack detection has the characteristics of complex acquisition scene, diversity of background pavement, multi-objective property and the like, particularly the objects such as asphalt rough pavement, edges, linear shadows and the like, has extremely strong deception on the detection algorithm based on visual similarity, and influences the accuracy and reliability of the measurement result.
Disclosure of Invention
The invention provides a crack detection method of a cognitive generation mechanism, which integrates a semantic generation mechanism into a detection process, and realizes double verification of semantic features and visual features in the crack detection process. By the method for sampling the crack signals on the premise of not losing the crack information, consistency and completeness of the generated image and the information in the image to be detected are guaranteed. And by correcting the local cognitive deviation, the reliability of the detection result is ensured.
The invention provides a crack detection method of a cognitive generation mechanism, which comprises the following steps:
carrying out component decomposition on an image to be detected based on an illumination model to obtain an image containing cracks and an ambient light image, and generating a sampling label based on a domain-first random sampling algorithm and the image containing cracks;
generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label;
comparing the fusion result of the crack image and the surface image with the image to be detected to obtain a comparison result;
and selecting a region with the largest pixel difference from the comparison result, returning to a sampling step if the region is larger than a threshold value, resampling the region to generate a new sampling label, and returning to a step of generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label until the pixel difference region in the comparison result is smaller than the threshold value.
According to the crack detection method of the cognitive generation mechanism provided by the invention, the generation of the sampling label based on the domain-first random sampling algorithm and the image containing the crack comprises the following steps:
randomly extracting pixel samples from the image containing the cracks, and carrying out gray level sequencing on the pixel samples to obtain a sequencing result;
adding pixels in the sorting result to a target sample based on a preset proportion;
and returning to the step of randomly extracting pixel samples from the image containing the cracks, and carrying out gray level sequencing on the pixel samples to obtain a sequencing result until the number of pixels in the target sample is larger than the product of the sampling rate and the sum of pixels of the image containing the cracks, wherein the pixel samples do not belong to the target sample.
According to the crack detection method of the cognitive generation mechanism provided by the invention, the crack image and the surface image are generated according to the crack generation algorithm, the surface generation algorithm and the sampling label, and the crack image and the surface image comprise the following steps:
training a crack generator based on generating an countermeasure network;
in the training process, determining that a target of a generating network is a picture for generating a spoofing judging network, and judging that the target of the judging network is a picture and a real picture generated by the generating network;
after training, inputting the sampling point coordinates and the sampling point gray values corresponding to the sampling label into a crack generator in a generated countermeasure network to obtain a crack image output by the crack generator.
According to the crack detection method of the cognitive generation mechanism provided by the invention, the crack image and the surface image are generated according to the crack generation algorithm, the surface generation algorithm and the sampling label, and the method further comprises the following steps:
calculating the priority of the point to be repaired corresponding to the sampling label;
and determining a to-be-repaired area corresponding to the target repair point and a filling area corresponding to the to-be-repaired area, wherein the priority of the target repair point is highest in the to-be-repaired points corresponding to the sampling labels.
According to the method for detecting the crack by the cognitive generation mechanism provided by the invention, the step of comparing the fusion result of the crack image and the surface image with the image to be detected to obtain a comparison result comprises the following steps:
fusing the crack image and the surface image based on poisson fusion to obtain a fusion result;
determining pixel differences between the crack image and the surface image based on a target sampling point in the fusion result and a nearby area corresponding to the target sampling point;
and determining a resampling point in a comparison result and a pixel difference area corresponding to the resampling point based on the pixel difference and the resampling rate.
The invention also provides a crack detection device of the cognitive generation mechanism, which comprises:
the sampling label generation module is used for carrying out component decomposition on an image to be detected based on the illumination model to obtain an image containing cracks and an ambient light image, and generating a sampling label based on a domain-first random sampling algorithm and the image containing cracks;
the crack image and surface image generation module is used for generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label;
the comparison module is used for comparing the fusion result of the crack image and the surface image with the image to be detected to obtain a comparison result;
and the circulation module is used for selecting a region with the largest pixel difference from the comparison result, returning to a sampling step if the region is larger than a threshold value, resampling the region to generate a new sampling label, and returning to a step of generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label until the pixel difference region in the comparison result is smaller than the threshold value.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a cognitive generation mechanism crack detection method as described in any one of the above.
The crack detection method based on the cognitive generation mechanism has the core ideas that: several pixel subsets of the image to be detected are generated by a sampling algorithm, and images (such as crack images, surface images and the like) with semantic information are respectively generated based on the pixel subsets. Comparing the image to be detected with the fused generated image, if the two images are consistent in visual characteristics, determining that the image to be detected and the fused cognition generated image have visual and semantic dual consistency, eliminating the semantic gap of a crack detection algorithm, and improving the accuracy and reliability of crack detection.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a crack detection method of a cognitive generation mechanism provided by the invention;
FIG. 2 is a schematic diagram of a crack detection method based on a cognitive generation mechanism provided by the invention;
fig. 3 is a schematic diagram of a crack detection principle based on a cognitive generation mechanism provided by the invention;
FIG. 4 is a schematic diagram of a deviation correction method based on a cognitive feedback mechanism provided by the invention;
FIG. 5 is a second flow chart of the method for detecting cracks in a cognitive generation mechanism according to the present invention;
fig. 6 is a schematic structural diagram of a crack detection device with a cognitive generation mechanism.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The cognitive generation mechanism crack detection method of the present invention is described below with reference to fig. 1-5.
Referring to fig. 1, the present invention provides a crack detection method of a cognitive generation mechanism, including:
step 100, carrying out component decomposition on an image to be detected based on an illumination model to obtain an image containing a crack and an ambient light image, and generating a sampling label based on a domain-first random sampling algorithm and the image containing the crack;
specifically, as shown in fig. 2, the steps are divided into four steps: preprocessing, random sampling with grey-scale sparsity priors, detection object (liner/surface) generator, and feedback.
Fig. 2 is a schematic diagram of a crack detection method based on a cognitive generation mechanism, and first, an image to be detected is decomposed by a light model to obtain an image containing a crack and an ambient light image. The sampling label is generated by a (gray) domain-first random sampling algorithm, wherein the pixels with labels of 1 (white pixels in the sampling label of fig. 2) constitute a subset of the slit pixels and the pixels with labels of 0 (black pixels in the sampling label of fig. 2) constitute a subset of the surface pixels. Based on these subsets, the generator generates a crack image and a surface image, respectively. The crack/lining images are fused and compared to the image to be detected. And selecting a region with the largest pixel difference from the comparison result, returning to a sampling step if the region is larger than a threshold value, resampling the region to generate a new sampling label, and returning to a step of generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label until the pixel difference region in the comparison result is smaller than the threshold value.
As shown in fig. 3, fig. 3 is a schematic diagram of a crack detection principle based on a cognitive generation mechanism, and the first problem solved by the present solution is: how to sample the fracture signal efficiently without losing fracture information. The scheme provides a sparse domain-first random sampling algorithm. Specifically, if a signal has only a small number of non-zero values in a certain domain, then the signal is sparse in that domain, which is also referred to as the sparse domain of the signal. Typically, a signal approximately meets sparsity, and can be considered a compressible signal. The crack signal has sparsity (i.e., spatially discrete) in the spatial domain, while the crack signal has consistency in the frequency domain (the width of the crack in the image is typically within a certain range) and the gray domain (the crack pixels are darker than the background and independent in the gray distribution) etc. Taking a space domain and a gray domain as an example, according to a compressed sensing theory, the crack information is not carried in order by random sampling in space, and the crack information is leaked uniformly by random carrying, so that the possibility of recovery is provided. Meanwhile, according to the information theory, darker pixels in a gray scale domain generally contain more crack information, the pixels are worthy of preferential selection, and the efficient sampling of the crack signals on the premise of not losing the crack information is realized through the sparse domain preferential random sampling algorithm.
Step 200, generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label;
specifically, a crack image is generated using a crack generation algorithm, a surface image is generated using a surface generation algorithm, and when more objects than cracks and surfaces need to be detected, new domain sampling conditions and corresponding object generation algorithms need to be added.
Step 300, comparing the fusion result of the crack image and the surface image with the image to be detected to obtain a comparison result;
and 400, selecting a region with the largest pixel difference from the comparison result, returning to a sampling step if the region is larger than a threshold value, resampling the region to generate a new sampling label, and returning to a step of generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label until the pixel difference region in the comparison result is smaller than the threshold value.
As shown in fig. 4, fig. 4 is a schematic diagram of a deviation correction method based on a cognitive feedback mechanism, and the second problem solved by the present solution is: how to correct the cognitive bias. Specifically, let x be the crack image, which is the value to be solved. The known ρ is the observation matrix, corresponding to the sampling process. It projects the high-dimensional signal x into the low-dimensional space, the sampling result y is also known and satisfies y=ρx, μ is the cognitive matrix, is also known for the crack generation process and satisfies x=μy.
The observation matrix ρ and the cognitive matrix μ satisfy μ=ρ -1 The conventional generation algorithm can construct a cognitive matrix by adjusting parameters, and the data-driven generation algorithm can construct the cognitive matrix by training. In the actual detection process, an error delta exists between an observation matrix used by random sampling and an observation matrix for generating a cognitive matrix ρ The actual acquisition result is y+delta y And satisfy y+delta y =(ρ+δ ρ ) x, wherein delta y Is the value to be corrected. In this case, a strip-biased crack x+delta is generated x And satisfies x+delta x =μ(y+δ y ) Wherein delta x The image to be detected and the cognition generated image can be compared to obtain a known quantity, namely, the generated crack image and the surface image are fused, and the fused image and the image to be detected are compared to obtain the pixel difference delta between the two images x
The scheme provides a correction method based on a cognitive feedback mechanism, and as shown in fig. 4, sampling and cognizing generation are carried out on an image to be detected to obtain a crack image and a surface image. Fusing the crack image and the surface image, comparing the fused image with the image to be detected, and comparing the pixel difference delta in the image x The maximum area is determined, if the pixel difference delta x Greater than the threshold, resampling. Repeating the above process until the algorithm is terminated, i.e. the image of all regions in the imageThe pixel difference is less than a threshold. And outputting images such as crack images, surface images and the like as detection results.
The crack detection method based on the cognitive generation mechanism has the core ideas that: several pixel subsets of the image to be detected are generated by a sampling algorithm, and images (such as crack images, surface images and the like) with semantic information are respectively generated based on the pixel subsets. Comparing the image to be detected with the fused generated image, if the two images are consistent in visual characteristics, determining that the image to be detected and the fused cognition generated image have visual and semantic dual consistency, eliminating the semantic gap of a crack detection algorithm, and improving the accuracy and reliability of crack detection.
In another embodiment, the method for detecting a crack by using a cognitive generation mechanism provided in the embodiment of the present application may further include:
step 130, randomly extracting pixel samples from the image containing the cracks, and carrying out gray level sequencing on the pixel samples to obtain a sequencing result;
step 140, adding the pixels in the sorting result to a target sample based on a preset proportion;
and 150, returning to the step of randomly extracting pixel samples from the image containing the cracks, and carrying out gray level sequencing on the pixel samples to obtain a sequencing result until the number of pixels in the target sample is larger than the product of the sampling rate and the sum of pixels of the image containing the cracks, wherein the pixel samples do not belong to the target sample.
Specifically, the steps of the gray domain priority random sampling algorithm provided in this embodiment are as follows algorithm 1:
Figure BDA0004004181560000081
Figure BDA0004004181560000091
randomly extracting n pixels from the image x to be sampledFor sample x 0 (i.e., pixel samples in this embodiment), for x 0 The gray scale of each pixel is sorted to obtain the gray scale sorting result (i.e. sorting in the embodiment), then the darkest pixel of the previous p% (i.e. preset ratio in the embodiment) of the gray scale sorting result is added to the sample y (i.e. target sample in the embodiment), and when the second distribution is performed, the sample x should be detected 0 Whether the pixel in (c) has been assigned to sample y or to change random decimation to non-repeated decimation. Calculating the product j of the sampling rate r and the total number of pixels of the image to be sampled, and repeating the pixel allocation process until the number of samples y is greater than j.
Similar to algorithm 1 above, when the sampling algorithm is used to collect a greater variety of samples, it is still necessary to randomly extract n pixels from the image x to be sampled as the samples x 0 . Then, according to the domain priority principle, p1% pixels prioritized on domain 1 are added to sample y1, and p2% pixels prioritized on domain 2 are added to sample y2, respectively. It should be detected before allocation whether the pixel has been allocated. Repeating the above process until the number of samples Σy n Greater than j.
Referring to fig. 5, in another embodiment, the method for detecting a crack by using a cognitive generation mechanism according to the embodiment of the present application may further include:
step 210, training a crack generator based on generating an countermeasure network;
step 220, in the training process, determining that the object of generating the network is to generate a picture of a spoofing discrimination network, and the object of discriminating the network is to discriminate the picture generated by the generating network and the real picture;
and 230, after training is finished, inputting the sampling point coordinates and the sampling point gray values corresponding to the sampling label to generate a crack generator in an countermeasure network, and obtaining a crack image output by the crack generator.
Specifically, the crack generation algorithm provided in the present embodiment is implemented by GAN (Generative Adversarial Networks, generation countermeasure network), and the main structure of GAN includes one crack generator G and one crack discriminator D. For the crack generator G, the input of the crack generator G is the crack information obtained through the domain-first random sampling algorithm in the above embodiment, including the sampling point (pixel) coordinates (x, y) (i.e., the sampling point coordinates in the present embodiment) and the sampling point gray-scale G value (i.e., the sampling point gray-scale value in the present embodiment), and the output of the crack generator G is an image of a specified resolution (i.e., the specified resolution image in the present embodiment); the input of the crack discriminator D is a picture, and the output is an authenticity label of the picture.
First, the parameter θ of the crack discriminator D is initialized d And parameter θ of crack generator G G . M samples { x1, x2, & gt, xm } are extracted from the real samples, m noise samples { z1, z2, & gt, zm } are sampled from the a priori distributed noise, and m generated samples are output by the crack generator G
Figure BDA0004004181560000101
Fixing the crack generator G, training the crack discriminator D, and training the real sample and the generated sample as well as possible, wherein after the crack discriminator D is updated for k times in a circulating way, the smaller learning rate is used for updating the primary parameter theta G Training the crack generator G, so that the difference between the generated sample and the real sample is reduced as much as possible, and the crack discriminator D is equivalent to discriminating errors as much as possible. After a plurality of update iterations, the final situation is that the crack discriminator D does not discriminate whether the sample is the output from the crack generator G or the actual output, i.e. the final sample discrimination probability is 50%.
In another embodiment, the method for detecting a crack by using a cognitive generation mechanism provided in the embodiment of the present application may further include:
step 240, calculating the priority of the point to be repaired corresponding to the sampling label;
step 250, determining a to-be-repaired area corresponding to a target repair point and a filling area corresponding to the to-be-repaired area, wherein the priority of the target repair point is highest in the to-be-repaired points corresponding to the sampling labels.
Specifically, the specific procedure of the pavement generation algorithm provided in this embodiment is as follows: calculating points to be repairedThe priority of P, where the priority P (P) is composed of two parts, as shown in equation 1. Wherein C (p) in formula 1 indicates the reliability of the point to be repaired p, D (p) is a term calculated from the surrounding data of the region to be repaired, C (p) can be regarded as the reliability of the points surrounding the point to be repaired p, the purpose of which is to preferentially fill those regions with more known points around, and C (p) is calculated as shown in formula 2, wherein ψ is as follows p Represents a repair block centered on the point to be repaired p, i.e., the area to be repaired, |ψ p And I is the area of the whole area to be repaired.
P (P) =c (P) D (P) formula 1
Figure BDA0004004181560000111
Figure BDA0004004181560000112
D (p) is used to preferentially fill points with stronger texture structures, and D (p) is calculated as shown in equation 3, where n p In order to obtain the normal direction of the contour to be filled at the point to be repaired p,
Figure BDA0004004181560000113
indicating that the gradient direction is rotated by 90 degrees, so that the point with stronger structural characteristics can be found, after the point p with the highest priority is found, taking the point p with the highest priority as a central block, ψ p For the region to be repaired, a block ψ with the highest similarity is searched for in the known image q′ Filling ψ as a fill value p . After the filling is completed, C (p), i.e., C (p) =c (q'), is updated. The above process is then repeated until all areas are filled, resulting in a surface image.
In another embodiment, the method for detecting a crack by using a cognitive generation mechanism provided in the embodiment of the present application may further include:
step 310, fusing the crack image and the surface image based on poisson fusion to obtain a fusion result;
step 320, determining a pixel difference between the crack image and the surface image based on the target sampling point and the vicinity area corresponding to the target sampling point in the fusion result;
and step 330, determining a resampling point in the comparison result and a pixel difference area corresponding to the resampling point based on the pixel difference and the resampling rate.
Specifically, the specific procedure of the sampling correction algorithm proposed in this embodiment is as follows: the image to be detected is I (p), and the crack image and the surface image generated in the above embodiment are fused into a new image G (p) based on the poisson fusion method. Sampling point is p, pi p For a vicinity region centered on p, the pixel difference δx between the image I (p) to be detected and the fusion image G (p) satisfies the following equation 4. And selecting a sampling point of k% in the pixel difference delta x for resampling, wherein k% is the resampling rate.
Figure BDA0004004181560000121
The cognitive generation mechanism crack detection device provided by the invention is described below, and the cognitive generation mechanism crack detection device described below and the cognitive generation mechanism crack detection method described above can be correspondingly referred to each other.
Referring to fig. 6, the present invention further provides a crack detection device with a cognitive generation mechanism, including:
the sampling tag generation module 601 is configured to perform component decomposition on an image to be detected based on an illumination model to obtain an image containing a crack and an ambient light image, and generate a sampling tag based on a domain-first random sampling algorithm and the image containing the crack;
the crack image and surface image generation module 602 is configured to generate a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm, and the sampling tag;
the comparison module 603 is configured to compare the fusion result of the crack image and the surface image with the image to be detected, so as to obtain a comparison result;
and a circulation module 604, configured to select a region with the largest pixel difference from the comparison result, and if the region is greater than a threshold, return to a sampling step, resample the region to generate a new sampling label, and return to a step of generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label until the pixel difference regions in the comparison result are all less than the threshold.
Optionally, the sampling tag generation module further includes:
the pixel sample extraction unit is used for randomly extracting pixel samples from the image containing the cracks, and carrying out gray level sequencing on the pixel samples to obtain a sequencing result;
a pixel adding unit, configured to add pixels in the sorting result to a target sample based on a preset ratio;
and the gray level sequencing unit is used for returning to randomly extracting pixel samples from the image containing the cracks, and performing gray level sequencing on the pixel samples to obtain a sequencing result until the number of pixels in the target sample is larger than the product of the sampling rate and the sum of pixels of the image containing the cracks, wherein the pixel samples do not belong to the target sample.
Optionally, the crack image and surface image generation module includes:
a crack generator training unit for training a crack generator based on a generated countermeasure network;
the training unit is used for determining that the object of the generating network is to generate a picture of the spoofing judging network in the training process, and the object of the judging network is to judge the picture generated by the generating network and the real picture;
and the crack image generation unit is used for inputting the sampling point coordinates and the sampling point gray values corresponding to the sampling label to generate a crack generator in the countermeasure network after training is finished, so as to obtain a crack image output by the crack generator.
Optionally, the crack image and surface image generation module further comprises:
the priority calculating unit is used for calculating the priority of the point to be repaired corresponding to the sampling label;
the filling area determining unit is used for determining an area to be repaired corresponding to a target repairing point and a filling area corresponding to the area to be repaired, and the priority of the target repairing point is highest in the areas to be repaired corresponding to the sampling labels.
Optionally, the comparing module includes:
the image fusion unit is used for fusing the crack image and the surface image based on poisson fusion to obtain a fusion result;
a pixel difference determining unit, configured to determine a pixel difference between the crack image and the surface image based on a target sampling point in the fusion result and a vicinity area corresponding to the target sampling point;
and the pixel difference region determining unit is used for determining a resampling point in the comparison result and a pixel difference region corresponding to the resampling point based on the pixel difference and the resampling rate.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute the method for detecting the crack of the cognitive generation mechanism provided by the above methods.
In yet another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the cognitive generation mechanism crack detection method provided by the methods described above.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. A cognitive generation mechanism crack detection method, comprising:
carrying out component decomposition on an image to be detected based on an illumination model to obtain an image containing cracks and an ambient light image, and generating a sampling label based on a domain-first random sampling algorithm and the image containing cracks;
generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label;
comparing the fusion result of the crack image and the surface image with the image to be detected to obtain a comparison result;
and selecting a region with the largest pixel difference from the comparison result, returning to a sampling step if the region is larger than a threshold value, resampling the region to generate a new sampling label, and returning to a step of generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label until the pixel difference region in the comparison result is smaller than the threshold value.
2. The cognitive generation mechanism crack detection method of claim 1, wherein the generating a sampling tag based on a domain-first random sampling algorithm and the crack-containing image comprises:
randomly extracting pixel samples from the image containing the cracks, and carrying out gray level sequencing on the pixel samples to obtain a sequencing result;
adding pixels in the sorting result to a target sample based on a preset proportion;
and returning to the step of randomly extracting pixel samples from the image containing the cracks, and carrying out gray level sequencing on the pixel samples to obtain a sequencing result until the number of pixels in the target sample is larger than the product of the sampling rate and the sum of pixels of the image containing the cracks, wherein the pixel samples do not belong to the target sample.
3. The cognitive generation mechanism crack detection method of claim 1, wherein the generating crack images and surface images from the crack generation algorithm, the surface generation algorithm, and the sampling tag comprises:
training a crack generator based on generating an countermeasure network;
in the training process, determining that a target of a generating network is a picture for generating a spoofing judging network, and judging that the target of the judging network is a picture and a real picture generated by the generating network;
after training, inputting the sampling point coordinates and the sampling point gray values corresponding to the sampling label into a crack generator in a generated countermeasure network to obtain a crack image output by the crack generator.
4. The cognitive generation mechanism crack detection method of claim 1, wherein generating the crack image and the surface image from the crack generation algorithm, the surface generation algorithm, and the sampling tag further comprises:
calculating the priority of the point to be repaired corresponding to the sampling label;
and determining a to-be-repaired area corresponding to the target repair point and a filling area corresponding to the to-be-repaired area, wherein the priority of the target repair point is highest in the to-be-repaired points corresponding to the sampling labels.
5. The method for detecting cracks by using a cognitive generation mechanism according to claim 1, wherein comparing the fusion result of the crack image and the surface image with the image to be detected to obtain a comparison result comprises:
fusing the crack image and the surface image based on poisson fusion to obtain a fusion result;
determining pixel differences between the crack image and the surface image based on a target sampling point in the fusion result and a nearby area corresponding to the target sampling point;
and determining a resampling point in a comparison result and a pixel difference area corresponding to the resampling point based on the pixel difference and the resampling rate.
6. A crack detection device based on a cognitive generation mechanism, comprising:
the sampling label generation module is used for carrying out component decomposition on an image to be detected based on the illumination model to obtain an image containing cracks and an ambient light image, and generating a sampling label based on a domain-first random sampling algorithm and the image containing cracks;
the crack image and surface image generation module is used for generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label;
the comparison module is used for comparing the fusion result of the crack image and the surface image with the image to be detected to obtain a comparison result;
and the circulation module is used for selecting a region with the largest pixel difference from the comparison result, returning to a sampling step if the region is larger than a threshold value, resampling the region to generate a new sampling label, and returning to a step of generating a crack image and a surface image according to a crack generation algorithm, a surface generation algorithm and the sampling label until the pixel difference region in the comparison result is smaller than the threshold value.
7. A computer program product comprising a computer program which, when executed by a processor, implements the cognitive generation mechanism crack detection method of any one of claims 1 to 5.
CN202211627479.2A 2022-12-16 2022-12-16 Crack detection method based on cognitive generation mechanism Active CN116188973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211627479.2A CN116188973B (en) 2022-12-16 2022-12-16 Crack detection method based on cognitive generation mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211627479.2A CN116188973B (en) 2022-12-16 2022-12-16 Crack detection method based on cognitive generation mechanism

Publications (2)

Publication Number Publication Date
CN116188973A true CN116188973A (en) 2023-05-30
CN116188973B CN116188973B (en) 2024-02-13

Family

ID=86435451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211627479.2A Active CN116188973B (en) 2022-12-16 2022-12-16 Crack detection method based on cognitive generation mechanism

Country Status (1)

Country Link
CN (1) CN116188973B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109345507A (en) * 2018-08-24 2019-02-15 河海大学 A kind of dam image crack detection method based on transfer learning
CN109544555A (en) * 2018-11-26 2019-03-29 陕西师范大学 Fine cracks dividing method based on production confrontation network
CN110120038A (en) * 2019-05-07 2019-08-13 重庆同济同枥信息技术有限公司 A kind of pavement crack defect inspection method generating network based on confrontation
CN111711820A (en) * 2020-05-13 2020-09-25 哈尔滨工业大学 Crack image compression sampling method based on generation countermeasure network
CN114049538A (en) * 2021-11-25 2022-02-15 江苏科技大学 Airport crack image confrontation generation method based on UDWGAN + + network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109345507A (en) * 2018-08-24 2019-02-15 河海大学 A kind of dam image crack detection method based on transfer learning
CN109544555A (en) * 2018-11-26 2019-03-29 陕西师范大学 Fine cracks dividing method based on production confrontation network
CN110120038A (en) * 2019-05-07 2019-08-13 重庆同济同枥信息技术有限公司 A kind of pavement crack defect inspection method generating network based on confrontation
CN111711820A (en) * 2020-05-13 2020-09-25 哈尔滨工业大学 Crack image compression sampling method based on generation countermeasure network
CN114049538A (en) * 2021-11-25 2022-02-15 江苏科技大学 Airport crack image confrontation generation method based on UDWGAN + + network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MAEDA等: "Generative adversarial network for road damage detection", 《WILEY》 *
张德津等: "基于局部纹理特征的沥青路面裂缝检测方法", 《计算机工程与设计》 *

Also Published As

Publication number Publication date
CN116188973B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
CN113160192B (en) Visual sense-based snow pressing vehicle appearance defect detection method and device under complex background
CN109544555B (en) Tiny crack segmentation method based on generation type countermeasure network
CN110148130B (en) Method and device for detecting part defects
CN110738125B (en) Method, device and storage medium for selecting detection frame by Mask R-CNN
CN111369572B (en) Weak supervision semantic segmentation method and device based on image restoration technology
US9330336B2 (en) Systems, methods, and media for on-line boosting of a classifier
CN113920107A (en) Insulator damage detection method based on improved yolov5 algorithm
CN112307919B (en) Improved YOLOv 3-based digital information area identification method in document image
CN112613350A (en) High-resolution optical remote sensing image airplane target detection method based on deep neural network
CN113971764B (en) Remote sensing image small target detection method based on improvement YOLOv3
CN114596290A (en) Defect detection method, defect detection device, storage medium, and program product
US11410300B2 (en) Defect inspection device, defect inspection method, and storage medium
CN113168687A (en) Image evaluation apparatus and method
CN112364881A (en) Advanced sampling consistency image matching algorithm
WO2018042208A1 (en) Street asset mapping
CN117557565A (en) Detection method and device for lithium battery pole piece
CN116994084A (en) Regional intrusion detection model training method and regional intrusion detection method
CN116188973B (en) Crack detection method based on cognitive generation mechanism
CN116030056A (en) Detection method and system for steel surface cracks
CN113362296B (en) Tunnel crack extraction method and system
CN113743218B (en) License plate recognition method, license plate recognition device and computer readable storage medium
CN116091784A (en) Target tracking method, device and storage medium
CN111666973B (en) Vehicle damage picture processing method and device, computer equipment and storage medium
Sarmadian et al. Optimizing the snake model using honey-bee mating algorithm for road extraction from very high-resolution satellite images
Sui et al. A boundary aware neural network for road extraction from high-resolution remote sensing imagery

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant