Road crack detection method, device, electronic equipment and storage medium
By using crack features and parallel features for image frame correlation in road crack detection, the problem of low detection accuracy in the existing technology is solved, and more accurate crack length measurement and more efficient road maintenance are achieved.
Patent Information
- Application Number
- CN202310640939.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-05-31
AI Technical Summary
Existing road crack detection methods cannot capture complete long cracks in one frame of image, resulting in low detection accuracy. Especially in the case of multiple cracks or crack fractures, mismatching is prone to occur, and road maintenance cannot be accurately guided.
Through the crack features and the parallel features associated with the crack features, two adjacent frames of images are associated to obtain the image frame sequence corresponding to each road crack, thereby determining the length of the crack, avoiding mismatching between different cracks, and improving detection accuracy Spend.
It achieves more accurate road crack detection, provides more refined maintenance guidance, and improves the efficiency of road maintenance work.
Smart Images

Figure CN116797559B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a road crack detection method, device, electronic equipment and storage medium. Background Art
[0002] With the continuous development of China's infrastructure technology, as of the end of 2020, the total mileage of China's roads has reached about 5.7 million kilometers. In terms of road maintenance technology, the road damage can be obtained by scanning the road through the visual system of the road scanning vehicle, but under the current technology, the scanning vehicle cannot capture a complete long crack in one frame of image. In general, the cracked road section can only be calibrated according to the starting and end points of the detected road cracks. In the case of multiple cracks and crack breaks, there may be mismatches between different cracks. For example, two cracks that are close to each other are matched as the same crack, and it is impossible to obtain accurate crack conditions to guide the road department to carry out refined maintenance. Therefore, the existing crack detection methods have the problem of low detection accuracy. Summary of the invention
[0003] The embodiment of the present invention provides a road crack detection method, which aims to solve the problem of low detection accuracy of existing crack detection methods. Two adjacent frames of images are associated through crack features and parallel features associated with the crack features to obtain an image frame sequence corresponding to each road crack. The length of the corresponding road crack is determined through the image frame sequence, which can avoid mismatching between different cracks and improve the detection accuracy of road cracks. In addition, more accurate crack conditions can be obtained to guide road departments to perform refined maintenance and improve the efficiency of road maintenance work.
[0004] In a first aspect, an embodiment of the present invention provides a road crack detection method, the method comprising:
[0005] Obtaining a sequence of images to be detected;
[0006] Performing feature extraction processing on each frame of the image in the image sequence to be detected, and obtaining crack features of each frame of the image and parallel features associated with the crack features;
[0007] Based on the crack feature and the parallel feature, adjacent frames in the image sequence to be detected are associated to obtain an image frame sequence corresponding to at least one road crack, where each road crack corresponds to one image frame sequence;
[0008] A length detection result corresponding to the road crack is determined based on the image frame sequence.
[0009] Optionally, the road crack detection method is characterized in that the feature extraction process is performed on each frame of the image sequence to be detected, and the crack features of each frame of the image and parallel features associated with the crack features are mentioned, including:
[0010] Extracting a first crack feature of an n-th frame image from the sequence of images to be detected, and extracting a first parallel feature corresponding to the first crack feature from a first designated area in the n-th frame image;
[0011] Extract the second crack feature of the n+1th frame image, and extract the second parallel feature corresponding to the second crack feature in the second designated area in the n+1th frame image, the first designated area and the second designated area are determined according to the overlapping area of the nth frame image and the n+1th frame image.
[0012] Optionally, the road crack detection method is characterized in that, before extracting the first crack feature of the n-th frame image and extracting the first parallel feature corresponding to the first crack feature in the first designated area in the n-th frame image, the method further comprises:
[0013] Determine an overlapping area between the nth frame image and the n+1th frame image;
[0014] Determine a first designated area in the n-th frame image according to the overlapped area;
[0015] A second designated area is determined in the (n+1)th frame image according to the overlapping area.
[0016] Optionally, the road crack detection method is characterized in that extracting a first parallel feature corresponding to the first crack feature in a first designated area in the nth frame image comprises:
[0017] Extracting a plurality of non-crack features corresponding to the first crack features in a first designated area in the nth frame image;
[0018] A first parallel feature is determined from a plurality of non-crack features according to the stability of the non-crack features.
[0019] Optionally, the road crack detection method is characterized in that, based on the crack feature and the parallel feature, adjacent frames in the image sequence to be detected are associated to obtain an image frame sequence corresponding to at least one road crack, each road crack corresponding to one image frame sequence, including:
[0020] Determining a first correlation between the first crack feature and the second crack feature, and determining a second correlation between the first parallel feature and the second parallel feature;
[0021] Matching the first crack feature with the second crack feature based on the first correlation degree and the second correlation degree;
[0022] If the match is successful, the nth frame image is associated with the n+1th frame image, and road crack marks are added to the associated nth frame image and the n+1th frame image, each road crack mark corresponding to a road crack.
[0023] Optionally, the road crack detection method is characterized in that the determining of the first correlation between the first crack feature and the second crack feature, and the determining of the second correlation between the first parallel feature and the second parallel feature, comprises:
[0024] Determining a first correlation between the first crack feature and the second crack feature according to a similarity between the first crack feature and the second crack feature;
[0025] A second degree of association between the first parallel feature and the second parallel feature is determined according to the similarity between the first parallel feature and the second parallel feature.
[0026] Optionally, the road crack detection method is characterized in that determining the length detection result corresponding to the road crack based on the image frame sequence includes:
[0027] Determining a corresponding road trajectory according to the image frame sequence;
[0028] Determining a starting position of a road crack in a first frame of the image frame sequence, and determining an ending position of the road crack in a last frame of the image frame sequence;
[0029] Projecting the starting position and the ending position onto the road trajectory to obtain a target road trajectory;
[0030] The length of the target road trajectory is determined as the length of the road crack, and a detection result of the length of the road crack is obtained.
[0031] In a second aspect, an embodiment of the present invention further provides a road crack detection device, the road crack detection device comprising:
[0032] An acquisition module, used for acquiring a sequence of images to be detected;
[0033] A processing module, used for performing feature extraction processing on each frame of the image sequence to be detected, and obtaining crack features and parallel features associated with the crack features of each frame of the image;
[0034] The association module is used to associate adjacent frames in the image sequence to be detected based on the crack feature and the parallel feature to obtain an image frame sequence corresponding to at least one road crack, wherein each road crack corresponds to an image frame sequence.
[0035] The first determination module is used to determine a length detection result corresponding to the road crack based on the image frame sequence.
[0036] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the road crack detection method provided in the embodiment of the present invention when executing the computer program.
[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the road crack detection method provided in the embodiment of the invention are implemented.
[0038] In an embodiment of the present invention, a sequence of images to be detected is obtained, and feature extraction processing is performed on each frame of the image sequence to be detected. The crack features of each frame of the image and the parallel features associated with the crack features are obtained. Based on the crack features and the parallel features, the adjacent frames in the image sequence to be detected are associated to obtain an image frame sequence corresponding to at least one road crack. Each road crack corresponds to an image frame sequence, and the length detection result corresponding to the road crack is determined based on the image frame sequence. By associating two adjacent frames of images through the crack features and the parallel features associated with the crack features, an image frame sequence corresponding to each road crack is obtained. The length of the corresponding road crack is determined through the image frame sequence, which can avoid mismatching between different cracks and improve the detection accuracy of road cracks. Further, a more accurate crack situation can be obtained to guide the road department to carry out refined maintenance and improve the efficiency of road maintenance work. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 is a flow chart of a road crack detection method provided by an embodiment of the present invention;
[0041] Figure 2is a schematic structural diagram of a road crack detection device provided in an embodiment of the present invention;
[0042] Figure 3 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] like Figure 1 As shown, Figure 1 : is a method flow chart of a road crack detection method provided by an embodiment of the present invention. The road crack detection method comprises the steps of:
[0045] 101. Obtain an image sequence to be detected.
[0046] In an embodiment of the present invention, the above-mentioned road crack detection method can be deployed on a road inspection platform, and the above-mentioned road inspection platform stores scanning information of each scanning vehicle. The above-mentioned scanning information includes a scanning image sequence uploaded by each scanning vehicle. The above-mentioned scanning image sequence can be a continuous scanning frame image, and the above-mentioned scanning image sequence can also be called a scanning video.
[0047] The scanning vehicle is provided with an image scanning system, and the road is scanned by the image scanning system. Specifically, when the scanning vehicle performs a road scanning task, the image scanning system is turned on, and the target road is scanned by the image scanning system to obtain a scanning image sequence of the target road, and the scanning image sequence of the target road is uploaded to the road inspection platform for storage.
[0048] The above-mentioned image sequence to be detected can be an image sequence with cracks in a scanned image sequence, or it can be an image sequence uploaded by a user. Specifically, the road inspection platform provides scanned image storage services and road crack detection services. After receiving the scanned image sequence uploaded by the scanning vehicle, the road inspection platform stores the scanned image sequence and performs the first crack detection on the scanned image sequence to obtain a segment of the image sequence with cracks as the image sequence to be detected. The above-mentioned first crack detection can be a crack detection based on a target detection algorithm, an image tracking algorithm, a Kalman filter algorithm, etc. Through the first crack detection, the image sequence containing cracks can be determined, and the image sequence containing cracks can be determined as the image sequence to be detected.
[0049] More specifically, the target detection algorithm can be used to perform crack detection on each frame image in the scanned image sequence to detect whether there is a crack in each frame image. If a crack exists, the frame image is marked. After completing target detection on all frame images in the scanned image sequence, the marked continuous frame images are determined as the image sequence to be detected.
[0050] The cracks in the scanned image sequence can be tracked by an image tracking algorithm, tracking marks can be assigned to the cracks in the image sequence by the image tracking algorithm, and frame images with the same tracking mark can be sorted in order of frame numbers to obtain an image sequence to be detected.
[0051] The crack state of each frame image in the scanned image sequence can be estimated by the Kalman filter algorithm. If the crack state is continuous, the frame image is also continuous. The continuous frame images corresponding to the continuous crack state are determined as the image sequence to be detected.
[0052] By performing the first crack detection on the scanned image sequence, a sequence of images to be detected with cracks can be obtained. It should be noted that the first crack detection is a qualitative detection of cracks, while the road crack detection method in the embodiment of the present application is a quantitative detection of cracks.
[0053] The cracks in the above-mentioned image to be detected may be cracks extending along the road direction. As the scanning vehicle moves forward, the scanning image sequence uploaded by the scanning vehicle may include complete cracks. By detecting the length of the complete cracks, a more accurate crack length can be detected.
[0054] 102. Perform feature extraction processing on each frame of the detected image sequence, and obtain crack features of each frame of the image and parallel features associated with the crack features.
[0055] In an embodiment of the present invention, after obtaining the image sequence to be detected, feature extraction processing can be performed on each frame of the image in the image sequence to be detected through a preset feature extraction engine. The above-mentioned feature extraction engine can be a feature extraction structure in a deep convolutional neural network, such as AlexNet, VGG, ResNet, DenseNet, centernet, yolo-v and other deep convolutional neural networks.
[0056] The above-mentioned image sequence to be detected can be input into a feature extraction engine for feature extraction processing, and the crack features and parallel features corresponding to each frame of image can be output through the above-mentioned feature extraction engine.
[0057] The above crack features can be used to characterize information such as the morphology and location of the cracks. The above crack features can include crack sub-features such as crack texture, crack contour, crack location, and crack key points. The above crack features can be represented by Ah = (a1, a2, ..., ah-1, ah), where ah represents the hth crack sub-feature. The above parallel features are non-crack features. The above parallel features can be used to characterize a relatively stable relationship between an object and a crack. The type of the above parallel features can be at least one of pavement features or roadside features. The pavement features can be at least one of features corresponding to pavement markings and features corresponding to non-crack pavement diseases. The above roadside features can be at least one of features corresponding to roadside markings, features corresponding to roadside plants, and features corresponding to roadside stones. Among the above different types of parallel features, each parallel feature can include parallel sub-features such as type, attribute, location, and distance from the crack, which can be represented by Bm = (b1, b2, ..., bm-1, bm), where bm represents the mth parallel sub-feature. The above parallel features can be associated with crack features through the distance from the crack.
[0058] 103. Based on the crack feature and the parallel feature, associate adjacent frames in the to-be-detected image sequence to obtain an image frame sequence corresponding to at least one road crack, where each road crack corresponds to one image frame sequence.
[0059] In the embodiment of the present invention, the above-mentioned image frame sequence may be composed of a series of static image frames, which are arranged in a certain order and then form a dynamic image or video. Image frames are usually used for dynamic tracking of vision. Image frames can more clearly compare an action or changing image frame by frame, and this comparison can highlight the instantaneous difference between the previous and next frames.
[0060] Specifically, whether the nth frame image and the n+1th frame image have an association relationship is determined by whether the first correlation degree between the first crack feature and the second crack feature is greater than a threshold. Similarly, whether the nth frame image and the n+1th frame image have an association relationship is determined by whether the second correlation degree between the first parallel feature and the second parallel feature is greater than a threshold.
[0061] More specifically, whether the n-th frame image and the n+1-th frame image have a correlation is determined based on whether the similarity calculation result between the first crack feature and the second crack feature is greater than the similarity threshold, thereby determining whether the adjacent frame images have a correlation relationship. Similarly, whether the n-th frame image and the n+1-th frame image have a correlation is determined based on whether the similarity calculation result between the first parallel feature and the second parallel feature is greater than the similarity threshold, thereby determining whether the adjacent frame images have a correlation relationship. If the similarity between the first crack feature and the second crack feature is greater than the similarity threshold and the similarity between the first parallel feature and the second parallel feature is also greater than the similarity threshold, it is determined that the adjacent frame images have a correlation, and the system associates the n-th frame image with the n+1-th frame image. Conversely, if one of the first correlation degree or the second correlation degree is less than the similarity threshold, it is determined that the n-th frame image and the n+1-th frame image do not have a correlation relationship, and the adjacent frame images are not associated.
[0062] In this embodiment, by associating adjacent frames based on crack features and parallel features, a complete image frame sequence is obtained, and the image frame sequence corresponds to a complete crack. The method of associating adjacent frames can effectively prevent the system from matching similar cracks, resulting in crack identification errors, and avoid the system from providing wrong data to road maintenance team members.
[0063] 104. Determine a length detection result corresponding to the road crack based on the image frame sequence.
[0064] In the embodiment of the present invention, the image vision system measures the length of the complete crack after splicing according to the associated image frame sequence.
[0065] Each scanning frame image may include a corresponding shooting time and shooting position. After obtaining the image frame sequence, the starting position of the crack can be determined according to the shooting position of the first frame image in the image frame sequence, and the ending position of the crack can be determined according to the shooting position of the last frame image in the image frame sequence. The length of the corresponding road crack can be determined according to the starting position and the ending position of the crack, thereby obtaining the road crack length detection result.
[0066] The scanning image sequence of the scanning vehicle corresponds to the driving trajectory of the scanning vehicle. The first scanning frame image in the scanning image sequence corresponds to a trajectory point in the driving trajectory. After obtaining the image frame sequence, the corresponding start and end trajectory points are determined in the driving trajectory according to the start and end frame positions of the image frame sequence in the scanning image sequence. The trajectory length between the start and end trajectory points is determined as the length of the road crack, thereby obtaining the length detection result of the road crack.
[0067] In the embodiment of the present invention, a sequence of images to be detected is obtained, and feature extraction processing is performed on each frame of the image sequence to be detected. The crack features of each frame of the image and the parallel features associated with the crack features are obtained. Based on the crack features and the parallel features, the adjacent frames in the image sequence to be detected are associated to obtain an image frame sequence corresponding to at least one road crack. Each road crack corresponds to an image frame sequence, and the length detection result of the corresponding road crack is determined based on the image frame sequence. By associating two adjacent frames of images through the crack features and the parallel features associated with the crack features, an image frame sequence corresponding to each road crack is obtained. The length of the corresponding road crack is determined through the image frame sequence, which can avoid mismatching between different cracks and improve the detection accuracy of road cracks. Further, a more accurate crack situation can be obtained to guide the road department to carry out refined maintenance and improve the efficiency of road maintenance work.
[0068] Optionally, in the step of performing feature extraction processing on each frame of the image sequence to be detected and mentioning the crack features of each frame of the image and the parallel features associated with the crack features, the first crack feature of the nth frame of the image in the image sequence to be detected can be extracted, and the first parallel feature corresponding to the first crack feature can be extracted from the first designated area in the nth frame of the image. The second crack feature of the n+1th frame of the image can be extracted, and the second parallel feature corresponding to the second crack feature can be extracted from the second designated area in the n+1th frame of the image, and the first designated area and the second designated area are determined based on the overlapping area of the nth frame of the image and the n+1th frame of the image.
[0069] In the embodiment of the present invention, the nth frame image and the n+1th frame image are adjacent frame images, and the first crack feature and the corresponding first parallel feature of the nth frame image can be extracted by the feature extraction engine, and the second crack feature and the corresponding second parallel feature of the n+1th frame image can be extracted. The extracted first crack feature, first parallel feature, second crack feature and second parallel feature can be further processed by filtering and denoising to obtain features with clearer details.
[0070] It should be noted that the above “first” and “second” are only used to distinguish crack features and parallel features in different frame images, and are not intended to limit the number of crack features and parallel features.
[0071] The first designated area may be the upper half of the nth frame image, or the first designated area may be the overlapped portion of the nth frame image and the n+1th frame image. Specifically, the area position may be determined based on the overlapped portion of the nth frame image and the n+1th frame image.
[0072] The first crack feature can be used to characterize information such as the morphology and position of the crack in the nth frame image. The crack feature can include crack sub-features such as crack texture, crack contour, crack position, and crack key points. The first crack feature can be represented by Ah=(a1, a2, ..., ah-1, ah), where ah represents the hth crack sub-feature. The first parallel feature can be a non-crack feature. The first parallel feature can be used to characterize a relatively stable relationship between an object and a crack in the nth frame image. The type of the first parallel feature can be at least one of a pavement feature or a roadside feature. The pavement feature can be at least one of a feature corresponding to a pavement mark and a feature corresponding to a non-crack pavement disease. The roadside feature can be at least one of a feature corresponding to a roadside mark, a feature corresponding to a roadside plant, and a feature corresponding to a roadside stone. Among the above different types of parallel features, each first parallel feature can include parallel sub-features such as type, attribute, position, and distance from the crack, which can be represented by Bm=(b1, b2, ..., bm-1, bm), where bm represents the mth parallel sub-feature. The first parallel feature can be associated with the first crack feature through the distance between the first parallel feature and the crack.
[0073] In this embodiment, the n+1th frame image and the nth frame image are adjacent frame images. The second designated area may be the lower half of the n+1th frame image, or the second designated area may be the overlapped portion of the nth frame image and the n+1th frame image. The second crack feature is the crack feature in the n+1th frame image, and the second parallel feature is in the n+1th frame image.
[0074] The second crack feature can be used to characterize information such as the morphology and position of the crack in the n+1 frame image. The crack feature can include crack sub-features such as crack texture, crack contour, crack position, and crack key points. The second crack feature can be represented by Ch=(c1, c2, ..., ch-1, ch), where ch represents the hth crack sub-feature. The second parallel feature can be a non-crack feature. The second parallel feature can be used to characterize a relatively stable relationship between an object and a crack. The type of the second parallel feature can be at least one of a pavement feature or a roadside feature. The pavement feature can be at least one of a feature corresponding to a pavement mark and a feature corresponding to a non-crack pavement disease. The roadside feature can be at least one of a feature corresponding to a roadside mark, a feature corresponding to a roadside plant, and a feature corresponding to a roadside stone. Among the different types of second parallel features, each second parallel feature can include parallel sub-features such as type, attribute, position, and distance from the crack, which can be represented by Dm=(d1, d2, ..., dm-1, dm), where dm represents the mth parallel sub-feature. The second parallel feature can be associated with the second crack feature by the distance from the crack.
[0075] Specifically, the above-mentioned feature extraction engine can extract the first crack feature in the nth frame image, extract the first parallel feature in the first designated area in the nth frame image, extract the second crack feature in the n+1th frame image, and extract the second parallel feature in the second designated area in the n+1th frame image.
[0076] Optionally, before extracting the first crack feature of the nth frame image and extracting the first parallel feature corresponding to the first crack feature in the first designated area in the nth frame image, the overlapping area between the nth frame image and the (n+1)th frame image can be determined, and the first designated area can be determined in the nth frame image based on the overlapping area, and the second designated area can be determined in the (n+1)th frame image based on the overlapping area.
[0077] In the embodiment of the present invention, the overlap area is the overlap area between the nth frame image and the n+1th frame image. The overlap area can be determined according to the sampling frame rate of the image scanning system and the driving speed of the scanning vehicle. When the scanning vehicle is traveling at a fixed driving speed, the larger the sampling frame rate, the faster the sampling speed, and the larger the overlap area. The smaller the sampling frame rate, the slower the sampling speed, and the smaller the overlap area. When executing the road scanning task, the road scanning is performed by fixing the sampling frame rate. Therefore, the overlap area between the nth frame image and the n+1th frame image can be determined according to the speed of the scanning vehicle. The faster the speed of the scanning vehicle, the smaller the overlap area between the nth frame image and the n+1th frame image. The slower the speed of the scanning vehicle, the larger the overlap area between the nth frame image and the n+1th frame image. However, in general, the overlap area is located in the upper half of the nth frame image and the lower half of the n+1th frame image. Specifically, a mapping table is set at different acquisition frame rates, and the mapping table includes a mapping relationship between the driving speed of the scanning vehicle and the overlapping area between the nth frame image and the n+1th frame image. After determining the driving speed between the nth frame image and the n+1th frame image, the overlapping area between the nth frame image and the n+1th frame image can be determined according to the driving speed.
[0078] In a possible embodiment, the overlapping area of two photos can be learned and trained based on a convolutional neural network, so as to achieve the purpose of inputting two adjacent frame images and determining the overlapping area, and then the nth frame image and the n+1th frame image can be input into the convolutional neural network to determine the overlapping area of the nth frame image and the n+1th frame image.
[0079] In another possible embodiment, the area with a high degree of overlap between images can be determined by a matching algorithm between images. Specifically, the upper half of the nth frame image and the lower half of the n+1th frame image can be compared at the pixel level. If the comparison is successful, the area corresponding to the upper half of the nth frame image is determined as the first designated area, and the area corresponding to the lower half of the n+1th frame image is determined as the second designated area. If the comparison fails, the size of the upper half of the nth frame image is reduced from bottom to top, and the size of the lower half of the n+1th frame image is reduced from top to bottom until the comparison is successful.
[0080] In a possible embodiment, the above-mentioned overlapping area can be an image area containing the same object in adjacent frame images, and can be an image area containing the same object or the same part of the same object. For example, the above-mentioned overlapping area can be the same flower in adjacent frame images or the same part of the same flower. For example, the flower in the nth frame image has petals and flower stems, and the flower in the n+1th frame image has petals. At this time, the overlapping area is the area containing petals in the image. After learning, the learning module can determine the petal area of the images of the previous and next two frames. Furthermore, the overlapping area can also be determined based on the pixel points of the similar calibration color of the petals, which will be more precise.
[0081] After determining the overlapping area of the nth frame image and the n+1th frame image, the regional position of the overlapping area in the nth frame image and the n+1th frame image can be obtained, the regional position of the overlapping area in the nth frame image is determined as the first designated area, and the regional position of the overlapping area in the n+1th frame image is determined as the second designated area.
[0082] In a possible embodiment, after determining the overlapped region of the nth frame image and the n+1th frame image, the overlapped region can be regarded as a new image, and the image and the nth frame image are input into the learning module together, the image is slid on the nth frame image, and the regional similarity between the image and the nth frame image under each sliding step is calculated to obtain the regional similarity between the image and the nth frame image, and the region with the largest regional similarity is determined as the first designated region. Similarly, the overlapped region and the n+1th frame image are calculated for regional similarity, and the region with the largest regional similarity is determined as the second designated region. It should be noted that there may be a situation where multiple regions have the same similarity. For the situation where multiple regions have the same similarity, a region with a high degree of stability is selected as the designated region. Specifically, a high degree of stability can be compared with the n-1th frame image. If there is also a repeated region in the n-1th frame image that is the same as the nth frame image and the n+1th frame image, the region is preferentially selected. By analogy, if the n-1th frame image cannot be compared, the n+2th or n-2th frame image is compared.
[0083] Optionally, in the step of extracting the first parallel feature corresponding to the first crack feature in the first designated area in the nth frame image, multiple non-crack features corresponding to the above-mentioned first crack feature can be extracted in the first designated area in the nth frame image, and a first parallel feature can be determined from the multiple non-crack features according to the stability of the non-crack feature.
[0084] In an embodiment of the present invention, after determining the first designated area, the non-crack features in the first designated area can be extracted by the feature extraction engine. If only one non-crack feature is extracted, the non-crack feature is determined as the first parallel feature. If multiple non-crack features are extracted, the non-crack feature with the highest stability is selected from the multiple non-crack features and determined as the first parallel feature. For example, features corresponding to flowers, features corresponding to stones, features corresponding to road signs, features corresponding to potholes, etc. are extracted in the first designated area. The stability corresponding to each feature can be determined first, and the feature with the highest stability is determined as the first parallel feature.
[0085] The non-crack feature extracted by the feature extraction engine may include the stability of the non-crack feature. The non-crack feature with the highest stability extracted by the feature extraction engine is the first parallel feature.
[0086] In a possible embodiment, the stability of each non-crack feature can be determined by a self-attention mechanism, and the attention parameter of each non-crack feature can be determined by the self-attention mechanism. The stability of the non-crack feature is determined according to the attention parameter. The higher the attention parameter, the stronger the stability of the non-crack feature, and the lower the attention parameter, the weaker the stability of the non-crack feature. The above non-crack feature includes multiple sub-features. The above non-crack feature can be represented by Bm=(b1, b2, ..., bm-1, bm). The above stability can be determined by the sub-features of the corresponding non-crack feature. For a non-crack feature Bm, it can be determined by w q 、w k 、w v Three weight parameters are used to process a non-crack feature Bm to obtain three feature vectors Q, K, and V. The self-attention parameter of the non-crack feature Bm can be calculated by the following formula:
[0087]
[0088] In the above formula, z is the self-attention parameter of the non-crack feature Bm, K T is the transposed vector of the feature vector K, d is the dimension of the non-crack feature Bm, and “||” is the vector modulus calculation, indicating that the self-attention parameter z of the non-crack feature Bm is a scalar. After obtaining the self-attention parameters z of each non-crack feature, the non-crack feature with the largest self-attention parameter is determined as the first parallel feature.
[0089] Similarly, after determining the second designated area, the non-crack features in the second designated area can be extracted by the feature extraction engine. If only one non-crack feature is extracted, the non-crack feature is determined as the second parallel feature. If multiple non-crack features are extracted, the non-crack feature with the highest stability is selected from the multiple non-crack features and determined as the second parallel feature. After extracting multiple non-crack features in the second designated area, the non-crack feature with the highest stability can be determined by the stability calculation method, and the non-crack feature with the highest stability is determined as the second parallel feature.
[0090] Optionally, in the step of associating adjacent frame images in the image sequence to be detected based on the crack feature and the parallel feature to obtain an image frame sequence corresponding to at least one road crack, wherein each road crack corresponds to an image frame sequence, a first correlation degree between the first crack feature and the second crack feature can be determined, and a second correlation degree between the first parallel feature and the second parallel feature can be determined. The first crack feature and the second crack feature are matched based on the first correlation degree and the second correlation degree. If the match is successful, the nth frame image is associated with the n+1th frame image, and a road crack mark is added to the n+1th frame image on the associated nth frame image, and each road crack mark corresponds to a road crack.
[0091] In an embodiment of the present invention, the first correlation between the first crack feature and the second crack feature may be the similarity between the first crack feature and the second crack feature. Specifically, the cosine similarity or Euclidean distance similarity between the first crack feature and the second crack feature may be directly calculated. In a possible embodiment, the crack features of the first crack feature in the first specified area may be extracted, and the crack features of the second crack feature in the second specified area may be extracted, and the similarity between the crack features of the first crack feature in the first specified area and the crack features of the second crack feature in the second specified area may be calculated, and the similarity between the crack features of the first crack feature in the first specified area and the crack features of the second crack feature in the second specified area may be determined as the first correlation between the first crack feature and the second crack feature.
[0092] The second correlation between the first parallel feature and the second parallel feature may be feature similarity between the first parallel feature and the second parallel feature. Specifically, the second correlation between the first parallel feature and the second parallel feature may be cosine similarity or Euclidean distance similarity between the first parallel feature and the second parallel feature.
[0093] The system matches the first crack feature with the second crack feature by determining the first correlation degree and the second correlation degree, associates the frame image of the first crack feature with the frame image of the second crack feature, and adds a road crack mark.
[0094] The road crack identification can be used in intelligent transportation systems to automatically detect and identify cracks on the road surface, and mark and classify them. Such a system can help road management departments find and repair cracks more quickly and accurately, improving road safety and reliability.
[0095] In an embodiment of the present invention, the system determines whether the first parallel feature matches the second parallel feature and whether the first crack feature matches the second crack feature according to whether the correlation passes the preset correlation value. If both the first correlation and the second correlation are matched, the frame image to which the first crack feature belongs is associated with the frame image to which the second crack feature value belongs. Specifically, when the first correlation between the first crack feature and the second crack feature is greater than the first correlation threshold, and the second correlation between the first parallel feature and the second parallel feature is greater than the second correlation threshold, it is determined that the first crack feature matches the second crack feature successfully, otherwise it is determined that the first crack feature matches the second crack feature unsuccessfully. When the first crack feature matches the second crack feature successfully, the nth frame image corresponding to the first crack feature is associated with the n+1th frame image corresponding to the second crack feature, and the same road crack identifier is added, so that the nth frame image and the n+1th frame image have the same road crack identifier, and each road crack identifier corresponds to a road crack. When the first crack feature fails to match the second crack feature, it means that the second crack feature is a new crack. At this time, the association between the nth frame image and the n+1th frame image can be stopped, and a new road crack identifier can be assigned to the crack in the n+1th frame image. The new road crack identifier is different from the road crack identifier of the nth frame image.
[0096] Optionally, in the steps of determining the first correlation between the first crack feature and the second crack feature, and determining the second correlation between the first parallel feature and the second parallel feature, the first correlation between the first crack feature and the second crack feature can be determined based on the similarity between the above-mentioned first crack feature and the second crack feature, and the second correlation between the first parallel feature and the second parallel feature can be determined based on the similarity between the first parallel feature and the second parallel feature.
[0097] In the embodiment of the present invention, the similarity between the first crack feature and the second crack feature is calculated to obtain the similarity between the first crack feature and the second crack feature, and the correlation between the first crack feature and the second crack feature is determined by the similarity between the first crack feature and the second crack feature. Similarly, the correlation between the first parallel feature and the second parallel feature can also be determined in this way.
[0098] The cosine similarity or Euclidean distance similarity between the first crack feature and the second crack feature can be calculated, and the cosine similarity or Euclidean distance similarity between the first crack feature and the second crack feature is determined as the first correlation between the first crack feature and the second crack feature. The cosine similarity or Euclidean distance similarity between the first parallel feature and the second parallel feature can be calculated, and the cosine similarity or Euclidean distance similarity between the first parallel feature and the second parallel feature is determined as the second correlation between the first parallel feature and the second parallel feature.
[0099] Optionally, in the step of determining the length detection result of the corresponding road crack based on the image frame sequence, the corresponding road trajectory can be determined according to the image frame sequence, the starting position of the road crack is determined in the first frame image of the image frame sequence, and the ending position of the road crack is determined in the last frame image of the image frame sequence, the starting position and the ending position are projected into the road trajectory to obtain the target road trajectory, the length of the target road trajectory is determined as the length of the road crack, and the road crack length detection result is obtained.
[0100] In an embodiment of the present invention, each image frame sequence corresponds to a crack. After obtaining the image frame sequence, the first frame image and the last frame image in the image frame sequence can be extracted. The first frame image includes the starting position of the crack, and the last frame image includes the ending position of the crack.
[0101] When the scanning vehicle performs a road scanning task, the road track during the road scanning task can be recorded by the vehicle positioning system. Each frame of the image in the above image frame sequence includes the shooting time and shooting location, that is, after determining the first frame image and the last frame image, the shooting location corresponding to the first frame image can be determined as the starting position of the crack, and the shooting location corresponding to the last frame image can be determined as the ending position of the crack. The starting position and the ending position are projected into the road track to obtain the target road track. After obtaining the target road track, the length of the target road track is calculated, and the length of the target road track is determined as the length of the corresponding road crack, thereby obtaining the length detection result of the road crack.
[0102] Furthermore, in the first frame image, the starting point of the road crack in the first frame image is detected, and the starting point of the road crack in the first frame image is projected into the real space to obtain the starting position of the road crack in the real space. In the last frame image, the end point of the road crack in the last frame image is detected, and the end point of the road crack in the last frame image is projected into the real space to obtain the ending position of the road crack in the real space, and the starting position and the ending position are projected into the road trajectory to obtain the target road trajectory. After obtaining the target road trajectory, the length of the target road trajectory is calculated, and the length of the target road trajectory is determined as the length of the corresponding road crack, thereby obtaining the length detection result of the road crack.
[0103] like Figure 2 As shown, an embodiment of the present invention provides a road crack detection device, comprising:
[0104] An acquisition module 201 is used to acquire a sequence of images to be detected;
[0105] A processing module 202 is used to perform feature extraction processing on each frame of the image sequence to be detected, and obtain crack features and parallel features associated with the crack features of each frame of the image;
[0106] The association module 203 is used to associate adjacent frames in the image sequence to be detected based on the crack feature and the parallel feature to obtain an image frame sequence corresponding to at least one road crack, where each road crack corresponds to an image frame sequence.
[0107] The first determination module 204 is configured to determine a length detection result corresponding to the road crack based on the image frame sequence.
[0108] Optionally, the processing module 202 includes:
[0109] A first processing submodule is used to extract a first crack feature of an n-th frame image in the sequence of images to be detected, and to extract a first parallel feature corresponding to the first crack feature in a first designated area in the n-th frame image;
[0110] The second processing submodule is used to extract the second crack feature of the n+1th frame image, and to extract the second parallel feature corresponding to the second crack feature in the second designated area in the n+1th frame image, and the first designated area and the second designated area are determined according to the overlapping area of the nth frame image and the n+1th frame image.
[0111] Optionally, the above device further comprises:
[0112] A second determining module, used to determine an overlapping area between the nth frame image and the (n+1)th frame image;
[0113] A third determining module, configured to determine a first designated area in the n-th frame image according to the overlapped area;
[0114] The fourth determining module is used to determine a second designated area in the (n+1)th frame image according to the overlapping area.
[0115] Optionally, the processing module 202 further includes:
[0116] A third processing submodule is used to extract a plurality of non-crack features corresponding to the first crack feature in a first designated area in the nth frame image;
[0117] The fourth determination submodule is used to determine a first parallel feature from a plurality of non-crack features according to the stability of the non-crack feature.
[0118] Optionally, the association module 203 includes:
[0119] a fifth determination submodule, configured to determine a first correlation between the first crack feature and the second crack feature, and to determine a second correlation between the first parallel feature and the second parallel feature;
[0120] A first matching submodule, configured to match the first crack feature with the second crack feature based on the first correlation degree and the second correlation degree;
[0121] The first associating submodule is used to associate the nth frame image with the n+1th frame image if the first matching submodule matches successfully, and add road crack identifiers to the associated nth frame image and the n+1th frame image, each road crack identifier corresponding to a road crack.
[0122] Optionally, the fifth determining submodule includes:
[0123] A first determining unit, configured to determine a first correlation between the first crack feature and the second crack feature according to a similarity between the first crack feature and the second crack feature;
[0124] The second determining unit is configured to determine a second degree of association between the first parallel feature and the second parallel feature according to a degree of similarity between the first parallel feature and the second parallel feature.
[0125] Optionally, the first determining module 204 includes:
[0126] a sixth determination submodule, configured to determine a corresponding road trajectory according to the image frame sequence;
[0127] a seventh determination submodule, configured to determine a starting position of a road crack in a first frame image of the image frame sequence, and to determine an ending position of a road crack in a last frame image of the image frame sequence;
[0128] A projection submodule, used for projecting the starting position and the ending position into the road trajectory to obtain a target road trajectory;
[0129] The eighth determination submodule is used to determine the length of the target road trajectory as the length of the road crack, and obtain a detection result of the length of the road crack.
[0130] like Figure 3As shown, an embodiment of the present invention further provides an electronic device, characterized in that it includes a processor, and the processor can execute any one of the above-mentioned road crack detection methods.
[0131] Specifically, it includes a processor 301 and a memory 302, and a computer program for executing the road crack detection method which is stored in the memory 302 and can be run on the processor 301, wherein:
[0132] The processor 301 runs the computer program of the smoking article state identification method stored in the memory 302 and performs the following steps:
[0133] Obtaining a sequence of images to be detected;
[0134] Performing feature extraction processing on each frame of the image in the image sequence to be detected, and obtaining crack features of each frame of the image and parallel features associated with the crack features;
[0135] Based on the crack feature and the parallel feature, adjacent frames in the image sequence to be detected are associated to obtain an image frame sequence corresponding to at least one road crack, where each road crack corresponds to one image frame sequence;
[0136] A length detection result corresponding to the road crack is determined based on the image frame sequence.
[0137] Optionally, in the above-mentioned feature extraction process for each frame of the image in the sequence of images to be detected, the crack features of each frame of the image and the parallel features associated with the crack features are mentioned, and the steps performed by the processor 301 include:
[0138] Extracting a first crack feature of an n-th frame image from the sequence of images to be detected, and extracting a first parallel feature corresponding to the first crack feature from a first designated area in the n-th frame image;
[0139] Extract the second crack feature of the n+1th frame image, and extract the second parallel feature corresponding to the second crack feature in the second designated area in the n+1th frame image, the first designated area and the second designated area are determined according to the overlapping area of the nth frame image and the n+1th frame image.
[0140] Optionally, before extracting the first crack feature of the nth frame image and extracting the first parallel feature corresponding to the first crack feature in the first designated area in the nth frame image, the processor 301 executes the method steps further comprising:
[0141] Determine an overlapping area between the nth frame image and the n+1th frame image;
[0142] Determine a first designated area in the n-th frame image according to the overlapped area;
[0143] A second designated area is determined in the (n+1)th frame image according to the overlapping area.
[0144] Optionally, the road crack detection method is characterized in that the processor 301 executes the step of extracting the first parallel feature corresponding to the first crack feature in the first designated area in the nth frame image, including:
[0145] Extracting a plurality of non-crack features corresponding to the first crack features in a first designated area in the nth frame image;
[0146] A first parallel feature is determined from a plurality of non-crack features according to the stability of the non-crack features.
[0147] Optionally, the road crack detection method is characterized in that the processor 301 executes the step of associating adjacent frames in the image sequence to be detected based on the crack feature and the parallel feature to obtain an image frame sequence corresponding to at least one road crack, wherein each road crack corresponds to an image frame sequence, including:
[0148] Determining a first correlation between the first crack feature and the second crack feature, and determining a second correlation between the first parallel feature and the second parallel feature;
[0149] Matching the first crack feature with the second crack feature based on the first correlation degree and the second correlation degree;
[0150] If the match is successful, the nth frame image is associated with the n+1th frame image, and road crack marks are added to the associated nth frame image and the n+1th frame image, each road crack mark corresponding to a road crack.
[0151] Optionally, the road crack detection method is characterized in that the processor 301 performs the steps of determining the first correlation between the first crack feature and the second crack feature, and determining the second correlation between the first parallel feature and the second parallel feature, including:
[0152] Determining a first correlation between the first crack feature and the second crack feature according to a similarity between the first crack feature and the second crack feature;
[0153] A second degree of association between the first parallel feature and the second parallel feature is determined according to the similarity between the first parallel feature and the second parallel feature.
[0154] Optionally, the road crack detection method is characterized in that the processor 301 executes the step of determining the length detection result corresponding to the road crack based on the image frame sequence, including:
[0155] Determining a corresponding road trajectory according to the image frame sequence;
[0156] Determining a starting position of a road crack in a first frame of the image frame sequence, and determining an ending position of the road crack in a last frame of the image frame sequence;
[0157] Projecting the starting position and the ending position onto the road trajectory to obtain a target road trajectory;
[0158] The length of the target road trajectory is determined as the length of the road crack, and a detection result of the length of the road crack is obtained.
[0159] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the road crack detection method or the application-end road crack detection method provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0160] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0161] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A road crack detection method, characterized in that: For detecting the length of a road crack, the method comprises the following steps: Obtaining a sequence of images to be detected; Performing feature extraction processing on each frame of the image in the sequence of images to be detected, obtaining a crack feature of each frame of the image and a parallel feature associated with the crack feature, wherein the parallel feature is a non-crack feature, and the parallel feature is used to characterize a relatively stable relationship between an object and a crack, and the type of the parallel feature is at least one of a road surface feature and a roadside feature; Based on the crack feature and the parallel feature, adjacent frame images in the image sequence to be detected are associated to obtain an image frame sequence corresponding to at least one road crack, where each road crack corresponds to an image frame sequence; A length detection result corresponding to the road crack is determined based on the image frame sequence.
2. The road crack detection method according to claim 1, characterized in that: The step of performing feature extraction processing on each frame of the image in the image sequence to be detected to obtain crack features of each frame of the image and parallel features associated with the crack features includes: Extracting a first crack feature of an n-th frame image from the sequence of images to be detected, and extracting a first parallel feature corresponding to the first crack feature from a first designated area in the n-th frame image; Extract the second crack feature of the n+1th frame image, and extract the second parallel feature corresponding to the second crack feature in the second designated area in the n+1th frame image, the first designated area and the second designated area are determined according to the overlapping area of the nth frame image and the n+1th frame image.
3. The road crack detection method according to claim 2, characterized in that: Before extracting the first crack feature of the n-th frame image and extracting the first parallel feature corresponding to the first crack feature in the first designated area in the n-th frame image, the method further includes: Determine an overlapping area between the nth frame image and the n+1th frame image; Determine a first designated area in the n-th frame image according to the overlapped area; A second designated area is determined in the (n+1)th frame image according to the overlapping area.
4. The road crack detection method according to claim 2, characterized in that: The extracting a first parallel feature corresponding to the first crack feature in a first designated area in the nth frame image includes: Extracting a plurality of non-crack features corresponding to the first crack features in a first designated area in the nth frame image; A first parallel feature is determined from a plurality of non-crack features according to the stability of the non-crack features.
5. The road crack detection method according to claim 2, characterized in that: The method of associating adjacent frame images in the image sequence to be detected based on the crack feature and the parallel feature to obtain an image frame sequence corresponding to at least one road crack, wherein each road crack corresponds to an image frame sequence, includes: Determining a first correlation between the first crack feature and the second crack feature, and determining a second correlation between the first parallel feature and the second parallel feature; Matching the first crack feature with the second crack feature based on the first correlation degree and the second correlation degree; If the match is successful, the nth frame image is associated with the n+1th frame image, and road crack marks are added to the associated nth frame image and the n+1th frame image, each road crack mark corresponding to a road crack.
6. The road crack detection method according to claim 5, characterized in that: The determining of a first correlation between the first crack feature and the second crack feature, and the determining of a second correlation between the first parallel feature and the second parallel feature, comprises: Determining a first correlation between the first crack feature and the second crack feature according to a similarity between the first crack feature and the second crack feature; A second degree of association between the first parallel feature and the second parallel feature is determined according to the similarity between the first parallel feature and the second parallel feature.
7. The road crack detection method according to any one of claims 1 to 6, characterized in that: The determining the length detection result corresponding to the road crack based on the image frame sequence includes: Determining a corresponding road trajectory according to the image frame sequence; Determining a starting position of a road crack in a first frame of the image frame sequence, and determining an ending position of the road crack in a last frame of the image frame sequence; Projecting the starting position and the ending position onto the road trajectory to obtain a target road trajectory; The length of the target road trajectory is determined as the length of the road crack, and a detection result of the length of the road crack is obtained.
8. A road crack detection device, characterized in that: The road crack detection device comprises: An acquisition module, used for acquiring a sequence of images to be detected; a processing module, used for performing feature extraction processing on each frame of the image in the sequence of images to be detected, to obtain crack features of each frame of the image and parallel features associated with the crack features, wherein the parallel features are non-crack features, and are used to characterize a relatively stable relationship between an object and a crack, and the type of the parallel features is at least one of a road surface feature and a roadside feature; an association module, configured to associate adjacent frames in the image sequence to be detected based on the crack feature and the parallel feature, to obtain an image frame sequence corresponding to at least one road crack, wherein each road crack corresponds to one image frame sequence; The first determination module is used to determine a length detection result corresponding to the road crack based on the image frame sequence.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the road crack detection method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the road crack detection method according to any one of claims 1 to 7 are implemented.
