Vehicle body damage detection method and device, electronic equipment and readable storage medium

CN115880563BActive Publication Date: 2026-07-14SHENHUA RAIL & FREIGHT WAGONS TRANSPORT

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENHUA RAIL & FREIGHT WAGONS TRANSPORT
Filing Date
2022-11-28
Publication Date
2026-07-14

Smart Images

  • Figure CN115880563B_ABST
    Figure CN115880563B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing, and provide a kind of vehicle body damage detection method, device, electronic equipment and readable storage medium, method includes: respectively obtaining the first image of target vehicle in the period of entering station and the second image in the period of leaving station;First image and second image are respectively input into target identification model, obtain first identification result and second identification result;Target identification model is used to identify suspected damage area in first image and second image respectively;First identification result is compared with second identification result, and the result based on comparison obtains the vehicle body damage detection result of target vehicle.Through the identification of suspected damage area to the first image of target vehicle in the period of entering station and the second image in the period of leaving station, and comparing first identification result with second identification result, determine the vehicle body damage detection result of target vehicle, the detection process can be automatically completed, compared with artificial detection mode, more efficient and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing, and particularly relates to a method, apparatus, electronic device, and readable storage medium for detecting vehicle body damage. Background Technology

[0002] During the daily loading and unloading operations of railway freight cars, equipment such as forklifts and excavators are needed to assist in completing the loading and unloading tasks. The use of these devices can easily damage the surface of the freight car body, thereby affecting the service life and safety of the freight car.

[0003] Existing methods for detecting damage to truck bodies generally rely on manual observation by relevant personnel. This manual inspection method is not only time-consuming and labor-intensive, but also prone to missed detections, resulting in low efficiency and inaccurate and unreliable inspection processes. Summary of the Invention

[0004] This invention provides a vehicle body damage detection method, device, electronic equipment, and readable storage medium to overcome the shortcomings of low efficiency, inaccuracy, and reliability of manual detection methods in the prior art, and to achieve accurate and efficient vehicle body damage detection.

[0005] In a first aspect, the present invention provides a method for detecting vehicle body damage, the method comprising:

[0006] The first image of the target vehicle during the entry period and the second image during the exit period are acquired respectively.

[0007] The first image and the second image are respectively input into the target recognition model to obtain a first recognition result and a second recognition result output by the target recognition model; wherein, the target recognition model is used to identify suspected damaged areas in the first image and the second image respectively;

[0008] The first identification result is compared with the second identification result, and the vehicle body damage detection result of the target vehicle is obtained based on the comparison result.

[0009] According to the vehicle body damage detection method provided by the present invention, the step of comparing the first identification result with the second identification result and obtaining the vehicle body damage detection result of the target vehicle based on the comparison result includes:

[0010] The suspected damaged area in the first identification result is compared with the suspected damaged area at the corresponding position in the second identification result. If the comparison result is that the suspected damaged area in the first identification result does not match the suspected damaged area at the corresponding position in the second identification result, then the suspected damaged area in the first identification result is taken as the first target area, and the suspected damaged area in the second identification result is taken as the second target area.

[0011] Based on the first target area and the second target area, a confidence prediction is performed, and the vehicle body damage detection result of the target vehicle is determined according to the result of the confidence prediction.

[0012] According to the vehicle body damage detection method provided by the present invention, the confidence prediction based on the first target region and the second target region includes:

[0013] Extract key segments from the first target region and the second target region respectively;

[0014] The key segments of the first target region and the key segments of the second target region are both input into the credibility prediction model to obtain the credibility value output by the credibility prediction model, and the credibility value is used as the result of the credibility prediction.

[0015] The credibility prediction model is used to extract features from key segments of the first target region and key segments of the second target region, respectively, and to fuse the extracted features to obtain the credibility value based on the fused result.

[0016] According to the vehicle body damage detection method provided by the present invention, determining the vehicle body damage detection result of the target vehicle based on the result of the confidence prediction includes:

[0017] If the confidence value is higher than the preset confidence threshold, then the vehicle damage detection result is determined to be that the target vehicle is damaged.

[0018] According to the vehicle body damage detection method provided by the present invention, after determining that the vehicle body damage detection result indicates that the target vehicle has damage, the method further includes:

[0019] Generate early warning information and send the early warning information to the associated terminal;

[0020] The warning information includes at least one of the following: the number of damaged areas, the image corresponding to the damaged area, and a confidence value.

[0021] According to the vehicle body damage detection method provided by the present invention, the step of acquiring a first image of the target vehicle during the entry period and a second image during the exit period includes:

[0022] Obtain the original images of the target vehicle during the entry and exit times;

[0023] The original image is preprocessed, and the timestamp information of the preprocessed original image is obtained; based on the timestamp information, the preprocessed original image is divided into the first image and the second image;

[0024] The preprocessing includes at least one of image enhancement, distortion correction, image alignment, and image segmentation.

[0025] According to the vehicle body damage detection method provided by the present invention, after acquiring the first image of the target vehicle during the entry period and the second image during the exit period, the method further includes:

[0026] The carriage numbers of each car body in the first image and the second image are identified respectively to obtain the carriage number identification results;

[0027] The carriage number identification result is associated with the corresponding first image or second image.

[0028] Secondly, the present invention also provides a vehicle body damage detection device, the device comprising:

[0029] The acquisition module is used to acquire the first image of the target vehicle during the entry period and the second image during the exit period, respectively.

[0030] The first processing module is used to input the first image and the second image into the target recognition model respectively, and obtain the first recognition result and the second recognition result output by the target recognition model; wherein, the target recognition model is used to identify suspected damaged areas in the first image and the second image respectively;

[0031] The second processing module is used to compare the first identification result with the second identification result, and determine the vehicle body damage detection result of the target vehicle based on the comparison result.

[0032] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the vehicle body damage detection methods described above.

[0033] Thirdly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the vehicle body damage detection methods described above.

[0034] The vehicle body damage detection method, device, electronic equipment, and readable storage medium provided by the present invention identify suspected damaged areas by analyzing a first image of a target vehicle during its entry into the station and a second image of it during its exit from the station, obtaining a first identification result and a second identification result. The first identification result is then compared with the second identification result to determine the vehicle body damage detection result of the target vehicle. This detection process can be completed automatically, which is more efficient and accurate than manual detection methods. Attached Figure Description

[0035] Figure 1 This is one of the flowcharts of the vehicle body damage detection method provided by the present invention;

[0036] Figure 2 This is the second flowchart of the vehicle body damage detection method provided by the present invention;

[0037] Figure 3 This is a schematic diagram of the vehicle body damage detection device provided by the present invention;

[0038] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0040] The following is in conjunction with the appendix Figures 1 to 4 The embodiments shown further illustrate the vehicle body damage detection method, apparatus, electronic equipment, and readable storage medium provided by the present invention.

[0041] Figure 1 This invention illustrates a vehicle body damage detection method provided by an embodiment of the present invention. The method includes:

[0042] Step 101: Acquire the first image of the target vehicle during the entry period and the second image during the exit period;

[0043] Step 102: Input the first image and the second image into the target recognition model respectively to obtain the first recognition result and the second recognition result output by the target recognition model; wherein, the target recognition model is used to identify the suspected damaged areas in the first image and the second image respectively;

[0044] Step 103: Compare the first identification result with the second identification result, and obtain the vehicle body damage detection result of the target vehicle based on the comparison result.

[0045] The method provided in this embodiment is mainly for railway freight cars, so the target vehicle can be understood as the railway freight car to be detected.

[0046] Since the target vehicle needs to enter the freight station first, load and unload goods in the freight station, and then drive out of the station when it is loading and unloading goods, images of the target vehicle during the entry and exit periods can be obtained separately. The first and second images can reflect the changes in the vehicle body before and after loading and unloading goods.

[0047] Then, the suspected damaged areas in the first image and the second image are identified respectively to obtain the first identification result and the second identification result. By comparing the first identification result of the first image with the second identification result of the second image, the vehicle body damage detection result of the target vehicle can be obtained.

[0048] Since the detection method provided in this embodiment can automatically detect vehicle body damage, the detection efficiency and accuracy can be effectively improved compared with manual detection methods.

[0049] In an exemplary embodiment, acquiring a first image of the target vehicle during the entry period and a second image during the exit period may specifically include:

[0050] Acquire raw images of the target vehicle during the entry and exit times of the station;

[0051] The original image is preprocessed, and the timestamp information of the preprocessed original image is obtained.

[0052] Based on timestamp information, the preprocessed original image is divided into a first image and a second image;

[0053] The preprocessing includes at least one of image enhancement, distortion correction, image alignment, and image segmentation.

[0054] In this embodiment, one or more sets of detection points can be set in advance within the entry and exit section of the target vehicle. Linear scanning equipment and vehicle detection equipment can be installed at the location of each set of detection points. The vehicle detection equipment is connected to the linear scanning equipment, and the linear scanning equipment is connected to the data processing center. The data processing center can be understood as the executing entity of the vehicle damage detection method provided in this embodiment.

[0055] When the vehicle detection equipment detects an approaching vehicle, it sends a power-on signal to the linear array scanning equipment to prepare for data acquisition. During the vehicle's passage, the linear array scanning equipment acquires images of the vehicle's exterior after it enters the loading and unloading area, i.e., the original images, to collect the vehicle's external contour information. All image data is transmitted through the RT terminals on each linear array scanner to the data processing center located at the loading and unloading point and equipped with AP signal receiving equipment.

[0056] After the vehicle has passed through the entire entrance section, the vehicle detection equipment determines that the vehicle has passed and sends a termination signal to the linear scan equipment, which then stops working.

[0057] After the loading and unloading operation is completed, when the vehicle exits from the inspection point, the vehicle detection equipment determines that a vehicle has passed and sends a power-on signal to the linear array scanning equipment to prepare for data collection.

[0058] As the vehicle passes by, the linear scanning device captures the vehicle's original image and transmits the data to the data processing center via the 5G network.

[0059] After the vehicle has completely exited the inspection point, the vehicle inspection equipment determines that the vehicle has passed and sends an end signal to the linear scan equipment, which then stops working.

[0060] After receiving the original images of vehicles entering and exiting the station, the data processing center stores and analyzes the original images. The timestamp information of the scanned image data can determine whether it is the original image of the direction of entry or exit.

[0061] The data processing center can also preprocess the original images, specifically performing at least one of the following processing operations: image enhancement, distortion correction, image alignment, and image segmentation.

[0062] For image enhancement, if multiple cameras (i.e., linear scanning devices) are used to capture the original images of the target vehicle, the target area is divided into partitions for imaging and stitched together into a single image. For example, the two files "Line Scan Upper 202205010001" and "Line Scan Lower 202205010001" are merged into one image with the merging rule being concentration and a dimension of 1. The vision system will extract and compare the data from each image to achieve the effect of image enhancement.

[0063] For distortion correction, when the original image of the target vehicle is distorted, the shapes of various observed parts in the original image will be deformed to varying degrees. The image distortion correction method of linear scan equipment refers to first using a deep learning-based target detection algorithm to locate the key parts of the vehicle, then calculating the graphic distortion rate based on the location bounding boxes of the detected key parts to determine the distortion rate value of each part of the original image, and finally correcting the key parts of the original image based on the distortion rate value to restore the distorted image.

[0064] For image alignment and segmentation, due to the imaging characteristics of linear scan equipment, after distortion correction, the original image is aligned and segmented according to the ratio of the height and width of the carriage. This ensures that each sub-image contains a carriage, thus providing reliable data for subsequent identification of carriage numbers and subsequent processing.

[0065] In an exemplary embodiment, after acquiring a first image of the target vehicle during the entry period and a second image during the exit period, the method further includes:

[0066] The carriage numbers of each car body in the first and second images are identified respectively to obtain the carriage number identification results;

[0067] The carriage number recognition result is associated with the corresponding first or second image.

[0068] In this embodiment, in order to ensure that the image data of the target vehicle can be classified and stored, and to facilitate the detection of different carriages of the same target vehicle, the carriage numbers on the vehicle body can be further identified after obtaining the first image and the second image.

[0069] In this embodiment, the identification of carriage numbers mainly adopts the OCR (Optical Character Recognition) algorithm, which includes steps such as image preprocessing, number region determination, character segmentation, and character recognition.

[0070] Image preprocessing aims to obtain better quality images and includes preprocessing operations such as image grayscale transformation, image denoising, and image enhancement.

[0071] The identification of the numbered area involves extracting the area containing the number from the entire image in the first or second image. This is very important in the process of recognizing the carriage number. The numbered area should contain complete carriage number character information and should not be affected by other non-character areas.

[0072] Character segmentation is based on image binarization techniques, which divide each character into segments to facilitate subsequent image recognition. Methods include color-based segmentation, feature-based segmentation, and template-based segmentation.

[0073] Character recognition refers to recognizing individual characters after they have been segmented, and then recombining them in their original order to form a complete truck vehicle number.

[0074] After the carriage number information is identified and extracted, the carriage number identification results can be labeled to the relevant image data (i.e., the first image or the second image) and saved to a database, such as a MySQL database, and an index can be created to facilitate efficient retrieval of data in subsequent detection processes.

[0075] In this embodiment, the identification of suspected damaged areas is mainly achieved through a target recognition model. This target detection model can identify suspected damaged areas in the input first or second image and output the coordinates of the suspected damaged areas and their corresponding probabilities. In this embodiment, the target recognition model is built based on an improved YOLOv5 target detection algorithm.

[0076] The YOLOv5 object detection algorithm is currently the state-of-the-art (SOTA) algorithm in the YOLO series. Similar to other object detection algorithms, the YOLOv5 algorithm mainly consists of an input network, a backbone network, a feature fusion network, and a prediction network. The detection objective is to identify defects on the surface of a vehicle. To meet the accuracy requirements in industry, it is necessary to achieve higher accuracy and faster detection speed while keeping the network structure as small as possible.

[0077] To improve the backbone network's feature extraction capability, this embodiment introduces a convolutional block attention module (CBAM) from the soft attention mechanism into the backbone network. This module can infer attention weights in both the spatial and channel dimensions, enabling the backbone network to focus on key information about the target in the image. The new backbone network introduces a CBAM (Convolutional Block Attention Module) after each Cross-Stage Partial (CSP) structure. The spatial attention module uses the output data from the channel attention module as its input feature map, thereby making fuller use of the semantic information of high-level features and the spatial information of low-level features in the network.

[0078] This embodiment also introduces Adaptive Spatial Feature Fusion (ASFF) into the feature fusion network, which performs weighted fusion on the three horizontal feature maps output by PANet respectively. By adding learnable parameters, the inconsistency of the gradient backpropagation process is suppressed, thereby making full use of features at different scales.

[0079] The training phase of the target recognition model is based on supervised learning, which requires prior image sample collection and annotation. The annotation process is mainly based on prior experience and can be carried out under the guidance of station staff. For example, image samples can be divided into single-layer and multi-layer annotations according to carriage numbers. After annotation, image enhancement methods such as grayscale transformation and Gaussian denoising are used to enhance the features of the image samples. Then, a deep learning network is used for feature extraction. Specifically, the deep learning network uses 64, 128, 256, 128, and 64 layers of convolutional networks for feature extraction, and ReLU activation function is used. The training stride is 0.001, and the model is optimized using the Adam optimization function. Finally, the target detection model is trained.

[0080] In an exemplary embodiment, the first identification result is compared with the second identification result, and the vehicle body damage detection result of the target vehicle is obtained based on the comparison result, which may specifically include:

[0081] The suspected damaged area in the first identification result is compared with the suspected damaged area at the corresponding position in the second identification result. If the comparison result is that the suspected damaged area in the first identification result does not match the suspected damaged area at the corresponding position in the second identification result, then the suspected damaged area in the first identification result is taken as the first target area, and the suspected damaged area in the second identification result is taken as the second target area.

[0082] Based on the first and second target regions, a confidence prediction is made, and the vehicle body damage detection result of the target vehicle is determined according to the confidence prediction result.

[0083] In this embodiment, the first recognition result and the second recognition result can be understood as images with suspected damaged areas marked on the basis of the first image and the second image. That is, the first recognition result is the image with suspected damaged areas marked on the first image, and the second recognition result is the image with suspected damaged areas marked on the second image. Therefore, the comparison between the first recognition result and the second recognition result can be understood as a feature matching process between images. This embodiment uses an image retrieval algorithm based on image feature input gradient regularization. This algorithm can also be applied to other types of loss functions besides cross-entropy loss.

[0084] The above comparison process can be achieved by calculating the matching degree of suspected damaged areas at similar locations. Specifically, key feature points can be extracted from suspected damaged areas at similar locations, and feature descriptors of key feature points can be constructed. Then, the distance between key feature points can be calculated using the feature descriptors of key feature points to determine the matching degree of suspected damaged areas at similar locations. If the matching degree is higher than the preset matching degree threshold, it can be understood that the two suspected damaged areas match, indicating that there is no significant change in the same area of ​​the vehicle body before and after entering the station. At this time, the vehicle body is likely to be undamaged in this area.

[0085] For suspected damaged areas with a matching degree less than the preset matching degree threshold, it can be understood that the two suspected damaged areas do not match, indicating that there are obvious differences in the same area of ​​the vehicle body when the target vehicle enters and exits the station. At this time, the probability of damage to the vehicle body is relatively high. First, the suspected damaged area is marked, and then the credibility of the suspected damaged area is further predicted. The final vehicle body damage detection result is obtained based on the credibility prediction result.

[0086] In an exemplary embodiment, confidence prediction based on a first target region and a second target region may specifically include:

[0087] Extract key segments from the first target region and the second target region respectively;

[0088] The key segments of the first target region and the key segments of the second target region are both input into the credibility prediction model to obtain the credibility value output by the credibility prediction model. The credibility value is used as the result of credibility prediction.

[0089] The credibility prediction model is used to extract features from key segments of the first target region and key segments of the second target region, respectively, and then fuse the extracted features to obtain a credibility value based on the fused result.

[0090] For suspected damaged areas with a matching degree less than the threshold, further reasoning can be performed using a credibility prediction model to derive a credibility value. In this embodiment, the input to the credibility prediction model is images captured from the first target region and the second target region, i.e., key segments. The key segments from the first target region and the second target region are subjected to feature extraction at magnifications of 64, 32, and 16 times, respectively. After fusing the extracted features, a classification network can predict the corresponding credibility value.

[0091] In an exemplary embodiment, the determination of the vehicle body damage detection result based on the confidence prediction result may specifically include:

[0092] If the confidence value is higher than the preset confidence threshold, the vehicle damage detection result is determined to be that the target vehicle is damaged.

[0093] In this embodiment, if the confidence value is high, such as higher than a certain preset confidence threshold, it indicates that the first target area and the second target area are indeed damaged areas, and the vehicle damage detection result is that the target vehicle is damaged; if the confidence value is low, such as lower than a certain preset confidence threshold, it indicates that the first target area and the second target area are not damaged areas, and the recognition result of the above target recognition model has a deviation.

[0094] In an exemplary embodiment, after determining that the vehicle body damage detection result indicates that the target vehicle is damaged, the process may further include:

[0095] Generate early warning information and send it to associated terminals;

[0096] The warning information includes at least one of the following: the number of damaged areas, the image corresponding to the damaged area, and the confidence value.

[0097] In this embodiment, after determining that the target vehicle is damaged, the detected damaged area, the corresponding image, and the confidence value can be sent to the associated terminal with which a communication relationship has been established in advance.

[0098] Of course, considering that this embodiment is aimed at railway freight cars, which have multiple carriages, the damage situation of each carriage of the entire freight train is statistically analyzed, and the damaged area, number and type of each carriage are associated with the first image, second image and carriage number of the vehicle to generate a damage detection report, which can then centrally report the alarm information of the entire freight train.

[0099] Figure 2 This embodiment exemplifies the overall implementation flow of the vehicle body damage detection method, which may specifically include:

[0100] Step 201: Obtain the original image of the target vehicle;

[0101] Step 202: Perform preprocessing on the original image, such as image enhancement, distortion correction, image alignment, and image segmentation.

[0102] Step 203: Distinguish between the direction of entry and the direction of exit based on the timestamp information, so that the original image can be divided into the first image of the entry period and the second image of the exit period;

[0103] Step 204: Recognize the carriage number in the first image and associate and store the different carriage numbers with their corresponding images;

[0104] Step 205: Recognize the carriage number in the second image and associate and store the different carriage numbers with their corresponding images;

[0105] Step 206: Perform target recognition on the first image, mainly identifying suspected damaged areas in the first image;

[0106] Step 207: Perform target recognition on the second image, mainly identifying suspected damaged areas in the second image;

[0107] Step 208: Target recognition result comparison, which mainly compares the suspected damaged area of ​​the first image with the suspected damaged area of ​​the second image at the corresponding position, so as to preliminarily determine the damage to the vehicle body;

[0108] Step 209: Damage Alarm. When damage to the target vehicle is detected, relevant information is reported to the associated terminal to realize damage alarm.

[0109] In summary, the vehicle damage detection method provided by this invention can accurately detect whether a target vehicle has vehicle damage by identifying suspected damaged areas in the image information of the target vehicle during the entry and exit period and comparing the suspected damaged areas at the corresponding locations. For vehicles with damage, the damage information can be reported in a timely manner, thereby greatly ensuring vehicle safety and improving the efficiency and accuracy of vehicle damage detection.

[0110] The vehicle body damage detection device provided by the present invention is described below. The vehicle body damage detection device described below can be referred to in correspondence with the vehicle body damage detection method described above.

[0111] Figure 3 This invention illustrates a vehicle body damage detection device provided in an embodiment of the invention. The device includes:

[0112] The acquisition module 301 is used to acquire a first image of the target vehicle during the entry period and a second image during the exit period, respectively.

[0113] The first processing module 302 is used to input the first image and the second image into the target recognition model respectively, and obtain the first recognition result and the second recognition result output by the target recognition model; wherein, the target recognition model is used to identify the suspected damaged areas in the first image and the second image respectively;

[0114] The second processing module 303 is used to compare the first identification result with the second identification result, and determine the vehicle body damage detection result of the target vehicle based on the comparison result.

[0115] In an exemplary embodiment, the second processing module 303 may specifically be used for:

[0116] The suspected damaged area in the first identification result is compared with the suspected damaged area at the corresponding position in the second identification result. If the comparison result is that the suspected damaged area in the first identification result does not match the suspected damaged area at the corresponding position in the second identification result, then the suspected damaged area in the first identification result is taken as the first target area, and the suspected damaged area in the second identification result is taken as the second target area.

[0117] Based on the first and second target regions, a confidence prediction is made, and the vehicle body damage detection result of the target vehicle is determined according to the confidence prediction result.

[0118] Furthermore, the second processing module 303 can specifically perform confidence prediction based on the first target region and the second target region through the following process:

[0119] Extract key segments from the first target region and the second target region respectively;

[0120] The key segments of the first target region and the key segments of the second target region are both input into the credibility prediction model to obtain the credibility value output by the credibility prediction model. The credibility value is used as the result of credibility prediction.

[0121] The credibility prediction model is used to extract features from key segments of the first target region and key segments of the second target region, respectively, and then fuse the extracted features to obtain a credibility value based on the fused result.

[0122] Furthermore, the second processing module 303 can specifically determine the vehicle body damage detection result of the target vehicle based on the confidence prediction result through the following process:

[0123] If the confidence value is higher than the preset confidence threshold, the vehicle damage detection result is determined to be that the target vehicle is damaged.

[0124] In an exemplary embodiment, the vehicle body damage detection device provided in this invention may further include:

[0125] The third processing module is used to generate early warning information and send it to associated terminals;

[0126] The warning information includes at least one of the following: the number of damaged areas, the image corresponding to the damaged area, and the confidence value.

[0127] In an exemplary embodiment, the acquisition module 301 can specifically be used for:

[0128] Acquire raw images of the target vehicle during the entry and exit times of the station;

[0129] The original image is preprocessed, and the timestamp information of the preprocessed original image is obtained.

[0130] Based on timestamp information, the preprocessed original image is divided into a first image and a second image;

[0131] The preprocessing includes at least one of image enhancement, distortion correction, image alignment, and image segmentation.

[0132] In an exemplary embodiment, the vehicle body damage detection device provided in this invention may further include:

[0133] The fourth processing module is used to identify the carriage numbers of each car body in the first image and the second image respectively, and obtain the carriage number identification results; and associate the carriage number identification results with the corresponding first image or second image.

[0134] In summary, the vehicle damage detection device provided in this embodiment of the invention identifies suspected damaged areas in a first image of the target vehicle during the entry period and a second image during the exit period through a first processing module, obtaining a first identification result and a second identification result. The first identification result and the second identification result are then compared through a second processing module to determine the vehicle damage detection result of the target vehicle. This detection process can be completed automatically, which is more efficient and accurate than manual detection methods.

[0135] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include a processor 401, a communication interface 402, a memory 403, and a communication bus 404. The processor 401, communication interface 402, and memory 403 communicate with each other via the communication bus 404. The processor 401 can call logical instructions in the memory 403 to execute a vehicle damage detection method. This method includes: acquiring a first image of the target vehicle during the entry period and a second image during the exit period; inputting the first and second images into a target recognition model to obtain a first recognition result and a second recognition result output by the target recognition model; wherein the target recognition model is used to identify suspected damaged areas in the first and second images respectively; comparing the first recognition result with the second recognition result, and obtaining the vehicle damage detection result based on the comparison result.

[0136] Furthermore, the logical instructions in the aforementioned memory 403 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the vehicle damage detection method provided in the above embodiments. The method includes: acquiring a first image of the target vehicle during the entry period and a second image during the exit period; inputting the first image and the second image into a target recognition model to obtain a first recognition result and a second recognition result output by the target recognition model; wherein the target recognition model is used to identify suspected damaged areas in the first image and the second image respectively; comparing the first recognition result with the second recognition result, and obtaining the vehicle damage detection result of the target vehicle based on the comparison result.

[0138] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which is executed by a processor to implement the vehicle body damage detection method provided in the above embodiments. The method includes: acquiring a first image of the target vehicle during the entry period and a second image during the exit period; inputting the first image and the second image into a target recognition model to obtain a first recognition result and a second recognition result output by the target recognition model; wherein the target recognition model is used to identify suspected damaged areas in the first image and the second image respectively; comparing the first recognition result with the second recognition result, and obtaining the vehicle body damage detection result of the target vehicle based on the comparison result.

[0139] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

[0142] The various embodiments in this disclosure are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0143] The scope of protection of this disclosure is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from its scope and spirit. If such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, then the intent of this disclosure also includes such modifications and variations.

Claims

1. A method for detecting vehicle body damage, characterized in that, include: The first image of the target vehicle during the entry period and the second image during the exit period are acquired respectively. The first image and the second image are respectively input into the target recognition model to obtain the first recognition result and the second recognition result output by the target recognition model; wherein, the target recognition model is used to identify suspected damaged areas in the first image and the second image respectively, the target recognition model is constructed based on the improved YOLOv5 target detection algorithm, the backbone network of the improved YOLOv5 target detection algorithm is connected to a convolutional block attention module after each cross-stage connection network, and the feature fusion network of the improved YOLOv5 target detection algorithm introduces adaptive spatial feature fusion; The first identification result is compared with the second identification result, and the vehicle body damage detection result of the target vehicle is obtained based on the comparison result; The step of comparing the first identification result with the second identification result and obtaining the vehicle body damage detection result of the target vehicle based on the comparison result includes: comparing the suspected damaged area in the first identification result with the suspected damaged area at the corresponding position in the second identification result; if the comparison result is that the suspected damaged area in the first identification result does not match the suspected damaged area at the corresponding position in the second identification result, then the suspected damaged area in the first identification result is taken as the first target area, and the suspected damaged area in the second identification result is taken as the second target area; performing a confidence prediction based on the first target area and the second target area, and determining the vehicle body damage detection result of the target vehicle based on the confidence prediction result; The credibility prediction based on the first target region and the second target region includes: extracting key segments from the first target region and the second target region respectively; inputting the key segments from the first target region and the second target region into a credibility prediction model to obtain a credibility value output by the credibility prediction model, and using the credibility value as the result of the credibility prediction; wherein, the credibility prediction model is used to extract features from the key segments from the first target region and the key segments from the second target region respectively, and fuse the extracted features to obtain the credibility value based on the fused result.

2. The vehicle body damage detection method according to claim 1, characterized in that, The step of determining the vehicle body damage detection result of the target vehicle based on the confidence level prediction result includes: If the confidence value is higher than the preset confidence threshold, then the vehicle damage detection result is determined to be that the target vehicle is damaged.

3. The vehicle body damage detection method according to claim 2, characterized in that, After determining that the vehicle body damage detection result indicates that the target vehicle is damaged, the process further includes: Generate early warning information and send the early warning information to the associated terminal; The warning information includes at least one of the following: the number of damaged areas, the image corresponding to the damaged area, and a confidence value.

4. The vehicle body damage detection method according to claim 1, characterized in that, The acquisition of the first image of the target vehicle during the entry period and the second image during the exit period includes: Obtain the original images of the target vehicle during the entry and exit times; The original image is preprocessed, and the timestamp information of the preprocessed original image is obtained; Based on the timestamp information, the preprocessed original image is divided into the first image and the second image; The preprocessing includes at least one of image enhancement, distortion correction, image alignment, and image segmentation.

5. The vehicle body damage detection method according to claim 1, characterized in that, After acquiring the first image of the target vehicle during the entry period and the second image during the exit period, the process further includes: The carriage numbers of each car body in the first image and the second image are identified respectively to obtain the carriage number identification results; The carriage number identification result is associated with the corresponding first image or second image.

6. A vehicle body damage detection device, characterized in that, include: The acquisition module is used to acquire the first image of the target vehicle during the entry period and the second image during the exit period, respectively. The first processing module is used to input the first image and the second image into the target recognition model respectively, and obtain the first recognition result and the second recognition result output by the target recognition model; wherein, the target recognition model is used to identify suspected damaged areas in the first image and the second image respectively, the target recognition model is constructed based on the improved YOLOv5 target detection algorithm, the backbone network of the improved YOLOv5 target detection algorithm is connected to a convolutional block attention module after each cross-stage connection network, and the feature fusion network of the improved YOLOv5 target detection algorithm introduces adaptive spatial feature fusion; The second processing module is used to compare the first identification result with the second identification result, and determine the vehicle body damage detection result of the target vehicle based on the comparison result; The second processing module is used to compare the suspected damaged area in the first identification result with the suspected damaged area at the corresponding position in the second identification result. If the comparison result is that the suspected damaged area in the first identification result does not match the suspected damaged area at the corresponding position in the second identification result, then the suspected damaged area in the first identification result is taken as the first target area, and the suspected damaged area in the second identification result is taken as the second target area. Based on the first target area and the second target area, a confidence prediction is performed, and based on the confidence prediction result, the vehicle body damage detection result of the target vehicle is determined. The second processing module is used to extract key segments from the first target region and the second target region respectively; input the key segments of the first target region and the key segments of the second target region into the credibility prediction model to obtain the credibility value output by the credibility prediction model, and use the credibility value as the result of the credibility prediction; wherein, the credibility prediction model is used to extract features from the key segments of the first target region and the key segments of the second target region respectively, and fuse the extracted features to obtain the credibility value based on the fused result.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the vehicle body damage detection method as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the vehicle body damage detection method as described in any one of claims 1 to 5.