A tunnel image pile number recognition and disease positioning method and device, electronic equipment and readable storage medium
By combining deep learning models and sequence difference methods, the station numbers in tunnel images are automatically identified and redundant images are filtered out. This solves the problems of low efficiency and low accuracy in station number identification and defect location in tunnel inspection, and achieves efficient and accurate defect location.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YUNNAN YUNLU ENG INSPECTION CO LTD
- Filing Date
- 2026-06-22
- Publication Date
- 2026-07-31
AI Technical Summary
In tunnel inspection, existing technologies suffer from low efficiency and error-proneness in manual image interpretation of station numbers, while satellite positioning and encoders have large errors in the tunnel environment. There is a lack of effective station number identification and defect location methods.
A deep learning target detection model is used to identify station numbers. Combined with the image file name sequence number, a structured record is established. The sequence number difference is calculated and redundant images are removed by combining image similarity. The key image set is output for disease location.
It improves the accuracy and consistency of disease location, reduces manual workload, reduces redundant images, and enhances the integrity and traceability of detection results.
Smart Images

Figure CN122492684A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tunnel inspection image stationing identification technology, and in particular to a method, apparatus, electronic device and readable storage medium for tunnel image stationing identification and defect location. Background Technology
[0002] During long-term operation, highway tunnel linings develop defects such as cracks, water leakage, spalling, and chipping. Operating units typically use inspection vehicles to continuously collect images along the tunnel, and then back-office personnel confirm the location and extent of the defects based on the image content. Existing technologies employ two main approaches: one relies on manual interpretation of station markers or mileage markers in the images and manual recording of defect locations. This method suffers from high workload, low efficiency, and susceptibility to errors and omissions when dealing with large volumes of continuous images. Another approach relies on encoders, wheel speedometers, inertial navigation systems, or satellite positioning equipment for location correlation. However, satellite signals are prone to failure in tunnel environments, and encoders are susceptible to cumulative errors due to slippage, braking, acceleration, and vibration, leading to discrepancies between the image and the actual station markers. While related image recognition technologies can detect general traffic signs, a solution that integrates station marker identification with defect location is still lacking for scenarios involving low light, reflections, dirt, varying shooting angles, irregular station markers, and continuous, massive amounts of images within tunnels. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method, device, electronic device and readable storage medium for tunnel image stationing identification and defect location, so as to reduce the workload of manual interpretation, reduce the number of redundant images and improve the consistency and traceability of defect location results.
[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0005] In a first aspect, the present invention provides a method for tunnel image stationing identification and defect localization, comprising: acquiring continuous tunnel images collected by an inspection vehicle; sorting the continuous tunnel images according to the leading sequence number in the image file name; detecting stationing targets using a pre-trained deep learning target detection model; establishing structured records for the images of the detected stationing targets, as well as the first and last images; performing character recognition on the region corresponding to the bounding box of the stationing target to obtain the stationing value; calculating the sequence number difference between adjacent structured records; deleting redundant images based on the sequence number difference and combined with image similarity; outputting a key image set and a stationing association data table, and locating the defect images by stationing based on the stationing association data table.
[0006] Secondly, the present invention provides a tunnel image stationing identification and defect location device, comprising: an image acquisition and sorting module, a stationing detection module, a record construction module, a stationing value acquisition module, a difference calculation module, a redundancy screening module, and a defect location output module.
[0007] Thirdly, the present invention provides an electronic device including a processor and a memory, wherein the memory stores a program or instructions executable on the processor, the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0008] Fourthly, the present invention provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0009] Fifthly, the present invention provides a computer program product that, when executed by at least one processor, implements the steps of the method described in the first aspect.
[0010] The beneficial effects of this invention are:
[0011] This invention detects station targets and extracts station values from continuous tunnel images, reducing positioning errors caused by reliance on encoders, GPS, or manual interpretation, and improving the accuracy of defect location. Simultaneously, this invention integrates image sorting, station detection, character recognition, structured recording, difference analysis, redundancy filtering, and defect location processing, enabling automated processing of massive amounts of tunnel images, significantly reducing manual workload and improving processing efficiency. Furthermore, this invention filters redundant images by using the difference in adjacent record numbers combined with image similarity, effectively deleting duplicate images, reducing data redundancy, and improving subsequent analysis efficiency. Moreover, this invention retains the first and last images, completely preserving the boundary information of the detected section, enhancing the integrity and traceability of the detection results, and improving the consistency and engineering application value of defect location results. Attached Figure Description
[0012] Figure 1 This is a flowchart of a tunnel image stationing identification and defect location method according to an embodiment of this application;
[0013] Figure 2 This is a structural block diagram of a tunnel image stationing identification and defect location device according to an embodiment of this application;
[0014] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of this application;
[0015] Figure 4 This is an example diagram of the image station number recognition and disease location method of the present invention. Detailed Implementation
[0016] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. It should be noted that these descriptions are for the purpose of aiding understanding the present invention, but do not constitute a limitation thereof. Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0017] Reference Figure 1 As shown, a method for tunnel image stationing identification and defect location is provided, including the following steps:
[0018] S1. Image Acquisition and Sequence Number Extraction: Acquire continuous images of the tunnel inner wall collected by the inspection vehicle and extract the leading sequence number from each image filename. In step S1, the inspection vehicle travels along the tunnel axis and continuously acquires images of the lining using a camera. Image files can be saved in BMP, JPG, JPEG, or PNG format. To ensure the restoration of the original acquisition order later, the acquisition system assigns an incrementing sequence number to each image frame when saving the images and writes this incrementing sequence number into the leading part of the filename.
[0019] In a preferred embodiment, the image file name adopts the naming format of "serial number-timestamp.extension" or "serial number_timestamp.extension", for example, "1-0859286132.bmp". The sorting is based primarily on the serial number, while the timestamp is used for anomaly detection rather than as the primary sorting criterion.
[0020] S2. Image Sorting and Original Sequence Number Establishment: The consecutive images are sorted in ascending order according to the leading sequence number to obtain an ordered image sequence. The position number in the ordered image sequence is used as the original sequence number of each image. In step S2, a regular expression can be used to extract the numeric prefix before the delimiter in the filename and convert it into an integer for stable sorting. For abnormal files that do not conform to the naming rules, they can be marked as abnormal records and sorted after normal image files to avoid interfering with the normal sequence.
[0021] The reason for using the leading sequence number instead of the file modification time or only the timestamp is that the file modification time is easily affected by copying, moving, and backup, and the timestamp may also be duplicated due to multi-threaded disk writing. The leading sequence number is generated in real time by the acquisition link, which can more accurately reflect the original acquisition order.
[0022] S3. Station Number Target Detection: Input each image in the ordered image sequence into a pre-trained deep learning target detection model to obtain the bounding box, category label, and detection confidence of the station number target, and retain the detection results that are classified as station number and have a detection confidence greater than a preset detection threshold.
[0023] In step S3, the deep learning object detection model can be Faster R-CNN, YOLO, SSD, or a Transformer-based object detection model. Taking Faster R-CNN as an example, the model can use a ResNet50-FPN backbone network to output candidate boxes, classification results, and bounding box regression results.
[0024] In one training method, tunnel station image samples are first collected, and the station sign or station inkjet area is marked with a rectangular box and uniformly categorized as mileage. Then, the samples are divided into training, validation, and test sets, and training is performed using the following loss: ;in and These are the weighting coefficients. The total loss of the deep learning object detection model. The classification loss of the region candidate network, The bounding box regression loss is used for the region candidate network. The classification loss is used to detect branches in the region of interest. The bounding box regression loss is used to detect branches for regions of interest.
[0025] During inference deployment, tensor quantization and normalization preprocessing are performed on the input image. The preprocessed image is then input into the model for forward computation to obtain bounding boxes, class labels, and detection confidence scores. Only images with the class "mileage" and a detection confidence score greater than a detection threshold are retained. As a result, It can be set to 0.5, or adjusted based on the validation set results.
[0026] S4. Candidate Image Preservation and Structured Record Establishment: Images detecting station numbers are identified as candidate images for preservation, and the first and last images in the ordered image sequence are identified as boundary-preserved images. Structured records are established for the candidate images and the boundary-preserved images, including at least the image filename, original sequence number, and station number value fields. In step S4, the system can overlay bounding boxes, category labels, and detection scores onto the original images of images detecting station numbers to form labeled result images. Boundary-preserved records are established regardless of whether station numbers are detected in the first and last images to ensure the integrity of boundary evidence for the detection segment.
[0027] In a preferred embodiment, the structured record includes, in addition to the image file name, original serial number, and station number value fields, at least one of the following: station number bounding box coordinates, detection confidence, OCR confidence, image save path, record status field, and disease association field.
[0028] S5. Station Number Character Recognition and Result Write-back: Perform character recognition on the region corresponding to the bounding box of the station number target to obtain the station number value and write it into the structured record. In step S5, the system crops the corresponding region from the original image based on the station number target bounding box output in step S3 and inputs it into the OCR module for character recognition. The OCR module can use PaddleOCR, Tesseract, or other text recognition networks.
[0029] When the OCR recognition confidence level is higher than the preset character threshold When the OCR recognition confidence level is lower than the character threshold, the corresponding record is marked as pending verification and supplemented through a manual interface. After manual supplementation, the original OCR output result can still be retained for traceability.
[0030] S6. Calculation of the difference between adjacent record serial numbers: For adjacent structured records arranged according to their original serial numbers, calculate the difference between their adjacent original serial numbers to obtain the serial number difference. In step S6, let the first... The original sequence number of the image corresponding to each retained record is: The original sequence number of the image corresponding to the previous record is Then the difference between adjacent serial numbers It can be represented as: This difference reflects the number of original frames spanned between two adjacent retained records.
[0031] S7. Redundant Image Determination and Filtering: Redundant image filtering is performed based on the sequence number difference, including at least: when the sequence number difference between the image corresponding to the subsequent structured record and the image corresponding to the previous structured record is equal to 1, and the image corresponding to the subsequent structured record is not the first or last image, the image corresponding to the subsequent structured record is deleted as a redundant image. In step S7, when When this condition is met, it indicates that two records are adjacent in the original image sequence and both trigger the retention condition. This usually means that the camera took consecutive pictures of the same station area, and the latter record is likely a duplicate. Therefore, by default, the first frame can be retained, and the latter frame can be deleted.
[0032] In another implementation, for a series of consecutive satisfactions The record can retain only one representative image according to a preset retention strategy. The preset retention strategy can be to retain the first image that appears, the image with the highest detection confidence, or the image with the highest sharpness score.
[0033] To cover the case of discontinuous repetition, when Furthermore, the content similarity between the two images can be calculated. This content similarity can be obtained based on at least one of perceptual hashing, structural similarity (SSIM), SIFT feature point matching results, or ORB feature point matching results.
[0034] For example, when using perceptual hashing, the image can be scaled and grayscaled first, then a discrete cosine transform can be performed to extract low-frequency regions and construct a 64-bit hash value; when the Hamming distance between the hash values of two images is not greater than 5, they can be determined to be duplicates. As another example, when using structural similarity, when SSIM is greater than 0.95, it can be determined to be a duplicate.
[0035] When a duplicate is determined based on content similarity, the image corresponding to the subsequent structured record is deleted as a non-contiguous duplicate record. When deleting an image, it is preferable to simultaneously delete its corresponding labeled image and structured record, and recalculate the remaining records after deletion. To maintain consistency between the key image set and the data table.
[0036] S8. Key Image Output and Disease Location: Output the filtered key image set and station number association data table, and locate the disease images by station number based on the station number association data table.
[0037] In step S8, if the lesion image corresponds to a key image, the station number value of that key image is directly read as the lesion location result. If the lesion image is not a key image, but its original sequence number j is located in two adjacent key images with obtained station numbers... and Between these, nearest neighbor mapping or linear interpolation can be performed based on the original sequence number.
[0038] When using the nearest neighbor mapping method, calculate separately and The station value of the key image on the side with the smaller distance is selected as the result of lesion localization. When using linear interpolation, the station value of the lesion image... Calculate using the following formula: ;in, This refers to the original sequence number of the disease image. and These are the original sequence numbers of two adjacent key images. and These are the station numbers of the two adjacent key images, respectively.
[0039] When only one key image on either side of the defect image has a valid station value, single-sided nearest neighbor positioning can be used; when neither key image on either side has a valid station value, the defect image is output as pending manual verification.
[0040] Below is a set of specific application scenario examples. The inspection vehicle continuously acquires N images along one side of the tunnel lining. The system first sorts the images according to their filename prefix numbers, then inputs each image into the Faster R-CNN detection model and sets the detection threshold. The image of the detected target station, along with the first and last images, are written into a structured record table.
[0041] Next, the system crops the station number area based on the detection box and performs OCR recognition, setting a character threshold. For records with an OCR confidence level below 0.8, the system marks them as pending verification. After the station number value is written, the system calculates the values of adjacent records. For all Only the first frame is retained in adjacent record groups; for The adjacent records are deleted when SSIM is greater than 0.95.
[0042] Through the above steps, the system obtains a set of key images and a station number association data table. For the disease images output by the subsequent disease detection model, the system reads their original sequence number. If it is a key image, the station number value is read directly. If it is located between two key images, the disease location result is output according to nearest neighbor mapping or linear interpolation.
[0043] In this embodiment, continuous tunnel images are restored to their original acquisition order according to the file name prefix number. Structured records are established using detection results, first and last frame protection, and OCR station number extraction. Redundant images are then deleted using a combination rule of sequence number difference and image similarity, thereby forming a key image set and station number association data table that can be directly used for disease location.
[0044] The methods described in this application embodiment can be executed by an industrial computer, server, cloud analytics platform, or other electronic device with a processor and memory.
[0045] In some embodiments of this application, a tunnel image stationing identification and defect location device is provided. Figure 2 A block diagram of a device structure according to an embodiment of this application is shown, such as... Figure 2 As shown, the device includes at least: an image acquisition and sorting module, a station number detection module, a record construction module, a station number value acquisition module, a difference calculation module, a redundancy screening module, and a disease location output module.
[0046] The system includes the following modules: an image acquisition and sorting module for acquiring continuous tunnel images collected by the inspection vehicle, extracting the leading sequence number from the filename, and sorting the continuous tunnel images in ascending order based on the leading sequence number; a station number detection module for inputting the sorted images into a pre-trained deep learning target detection model to obtain the bounding box, category label, and detection confidence of the station number target; a record construction module for building a structured record from the images of the detected station number target, as well as the first and last images; a station number value acquisition module for performing character recognition on the region corresponding to the station number target bounding box to obtain the station number value; a difference calculation module for calculating the sequence number difference for adjacent structured records arranged according to the original sequence number; a redundancy filtering module for deleting redundant images based on the sequence number difference and image similarity; and a disease location output module for outputting a key image set and a station number association data table, and for locating the disease number in the disease images based on the station number association data table.
[0047] In some embodiments of this application, an electronic device is provided. Figure 3 A block diagram of an electronic device according to an embodiment of this application is shown. The electronic device includes a processor and a memory, wherein the memory stores programs or instructions that, when executed by the processor, implement the various steps of the above-described method embodiments.
[0048] This application also provides a readable storage medium and a computer program product, wherein the readable storage medium or computer program product stores a program or instructions, which, when executed by a processor, implement the various steps of the above method embodiments.
[0049] Figure 4 This is an example image demonstrating the use of tunnel image stationing identification and defect location methods for stationing identification and defect location. This application can adapt to various forms of stationing in tunnels, such as painted stationings, handwritten stationings, hand-marked stationings, and tilted / damaged / blurred stationings, significantly improving the robustness and coverage of stationing identification in complex scenarios and solving the identification failure problem caused by the diversity and irregularity of stationings.
[0050] This invention restores the original acquisition order of continuous tunnel images according to the file name prefix number, establishes a structured record using detection results, first and last frame protection, and OCR station number extraction, and then deletes redundant images by combining sequence number difference and image similarity rules, thereby obtaining a key image set and station number association data table suitable for subsequent disease location.
[0051] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.
Claims
1. A method for tunnel image stationing identification and defect location, characterized in that, Includes the following steps: S1. Image Acquisition and Sequence Number Extraction: Acquire continuous images of the tunnel inner wall collected by the inspection vehicle, and extract the leading sequence number from the file name of each image; S2. Image sorting and original sequence number establishment: Sort the consecutive images in ascending order according to the leading sequence number to obtain an ordered image sequence, and use the position number in the ordered image sequence as the original sequence number of each image; S3, Station Number Target Detection: Input each image in the ordered image sequence into a pre-trained deep learning target detection model to obtain the bounding box, category label and detection confidence of the station number target, and retain the detection results of the category being station number and the detection confidence being greater than the preset detection threshold; S4. Candidate Image Retention and Structured Record Establishment: Images of detected station targets are identified as candidate retention images, and the first and last images in the ordered image sequence are identified as boundary retention images; a structured record is established for the candidate retention images and the boundary retention images, the structured record including at least the image file name, original sequence number, and station value field; S5. Station number character recognition and result write-back: Perform character recognition on the region corresponding to the bounding box of the station number target to obtain the station number value and write it into the structured record; S6. Calculation of the difference between adjacent record serial numbers: For adjacent structured records arranged according to their original serial numbers, calculate the difference between their adjacent original serial numbers to obtain the serial number difference. S7. Redundant Image Determination and Filtering: Redundant image filtering is performed based on the sequence number difference, including at least: when the sequence number difference between the image corresponding to the next structured record and the image corresponding to the previous structured record is equal to 1, and the image corresponding to the next structured record is not the first image or the last image, the image corresponding to the next structured record is deleted as a redundant image. S8. Key Image Output and Disease Location: Output the filtered key image set and station number association data table, and locate the disease images by station number based on the station number association data table. The step of locating disease images based on the station number association data table includes: when a disease image corresponds to a key image, directly reading the station number value of the key image as the disease location result; when the original sequence number of the disease image is located between two key images with obtained station numbers, determining the disease location result using nearest neighbor mapping or linear interpolation based on the position of the original sequence number of the disease image between the original sequence numbers of the two key images; when determining the disease location result using linear interpolation, the station number value of the disease image... Calculate using the following formula: ; in, This refers to the original sequence number of the disease image. and These are the original sequence numbers of two adjacent key images. and These are the station numbers of the two adjacent key images, respectively.
2. The method for tunnel image stationing identification and defect location according to claim 1, characterized in that, Step S2 includes: using regular expressions to extract the numeric prefix before the delimiter in the filename, converting the extracted numeric prefix into integers and then performing stable sorting; for abnormal files that do not conform to the preset naming rules, sorting them after normal image files; in step S3, the deep learning object detection model is any one of Faster R-CNN, YOLO, SSD or Transformer-based object detection models.
3. The method for tunnel image stationing identification and defect location according to claim 1, characterized in that, The structured record established in step S4 further includes at least one of the following: station number boundary box coordinates, detection confidence, character recognition confidence, image save path, record status field, and disease association field.
4. The method for tunnel image stationing identification and defect location according to claim 1, characterized in that, In step S5, the character recognition uses an OCR module to identify the area corresponding to the station target boundary box. When the confidence level of the OCR recognition is lower than the preset character threshold, the corresponding structured record is marked as pending verification and manual supplementation is triggered.
5. The method for tunnel image stationing identification and defect location according to claim 1, characterized in that, In step S7, when the difference in the sequence number of the corresponding images of adjacent structured records is greater than 1, the content similarity between the two images is further calculated. When the content similarity meets the duplication determination threshold, the image corresponding to the subsequent structured record is deleted as a redundant image. The content similarity is obtained based on at least one of perceptual hashing, structural similarity SSIM, SIFT feature point matching results, or ORB feature point matching results. Among them, when using perceptual hashing, a Hamming distance of no more than 5 is determined to be a duplication, and when using structural similarity, a SSIM greater than 0.95 is determined to be a duplication. For multiple consecutive images that meet the redundancy determination conditions, only one representative image is retained according to a preset retention strategy. The preset retention strategy includes retaining the first image that appears, retaining the image with the highest detection confidence, or retaining the image with the highest sharpness score.
6. A tunnel image stationing identification and defect location device, characterized in that, include: The image acquisition and sorting module is used to acquire continuous tunnel images collected by the inspection vehicle, extract the leading sequence number from the image file name, and sort the continuous tunnel images in ascending order according to the leading sequence number. The station number detection module is used to input the sorted images into a pre-trained deep learning object detection model to obtain the bounding box, class label and detection confidence of the station number target; The record building module is used to create a structured record from the images of the detected station targets, as well as the first and last images; The station value acquisition module is used to perform character recognition on the area corresponding to the station target bounding box to obtain the station value; The difference calculation module is used to calculate the sequence number difference for adjacent structured records arranged according to their original sequence numbers. The redundancy filtering module is used to delete redundant images based on the difference in sequence number and in combination with image similarity. as well as The disease location output module is used to output a key image set and a station number association data table, and to locate the disease images by station number based on the station number association data table. The redundancy filtering module is also used to: when the difference in the sequence number of the corresponding images of adjacent structured records is greater than 1, determine whether the two images are duplicates based on the perceptual hash, structural similarity SSIM, SIFT feature point matching results or ORB feature point matching results, and delete the corresponding image of the latter structured record when the duplication determination threshold is met.
7. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a program or instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 5.
8. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 5.
9. A computer program product, characterized in that, The computer program product includes a program or instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 5.