Vehicle new and old degree identification method and device, equipment and storage medium

By preprocessing vehicle pictures and combining edge detection and object detection models to judge the new and old degree of vehicle, the problem of lack of picture recognition and neural network technology in the prior art is solved, and a more accurate and efficient evaluation of the new and old degree of vehicle is achieved.

CN119810494APending Publication Date: 2025-04-11CAR CREDIT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411656685.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

There is a lack of a method for judging the old and new vehicle based on picture recognition and neural network technology in the prior art, and the detection frame obtained by the existing object detection model often exceeds the edge of the item to be identified, resulting in high calculation consumption but limited impact on the new and old vehicle evaluation results.

Method used

By pre-processing the data of the vehicle pictures to be identified, vehicle boundary detection and wear area detection are combined with edge detection method and target detection model (such as YOLOv5), matching the detection frame with vehicle boundary, retaining the detection frame of the intersection area, updating the vehicle boundary, and calculating the pixel point ratio and wear degree of the wear area, and weighted summing to judge the new and old degree of the vehicle.

Benefits of technology

A more accurate judgment on the old and new levels of the vehicle is achieved, avoiding the problem of the detection box exceeding the boundary, reducing calculation consumption, and improving the identification accuracy of wear areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810494A_ABST
    Figure CN119810494A_ABST
Patent Text Reader

Abstract

The invention provides a method, device and equipment for identifying the new and old degree of a vehicle and a storage medium, and the method comprises the steps: carrying out the data preprocessing, and obtaining a preprocessed picture; detecting a vehicle boundary of the preprocessed picture to obtain a first picture; inputting the preprocessed picture into a target detection model to obtain a second picture comprising a detection frame; the corresponding position of each detection frame in the second picture in the first picture is matched, the detection frames intersecting with the area in the vehicle boundary of the first picture are reserved, the vehicle boundary in the first picture is updated, and the area formed by the updated vehicle boundary serves as an overall area; taking the sum of the reserved detection frames as a wear area, calculating the pixel point proportion of the wear area in the whole area to obtain a wear proportion, and inputting the reserved detection frames into a classification model for judging the wear degree to obtain the wear degree; and performing weighted summation based on the wear ratio and the wear degree to obtain old and new scores, and matching the old and new scores with a threshold level rule to obtain a judgment result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to a method, device, equipment and storage medium for identifying the age of a vehicle. Background Art

[0002] Vehicle condition identification refers to the use of technical means to identify scratches or wear and tear, and is widely used in used car transactions, insurance assessments, vehicle leasing and other fields.

[0003] In the related technology, manual visual inspection of components is often used to judge, for example, the condition of components such as the vehicle body, tires or lamps, and obvious damage can be found. However, the above technical means are highly subjective. For inspectors of different levels, there may be large errors in the judgment process, and it is easy to only focus on the most obvious worn parts and ignore the wear and tear of other small parts. In addition, there is almost no solution based on image recognition technology, and then use deep learning networks to analyze vehicle photos to automatically identify scratched and worn parts. The detection frame obtained by the existing target detection model often exceeds the edge of the object to be identified. Generally, cropping, adjusting the border or segmentation technology is used to obtain more accurate wear and tear. This method brings a lot of additional computing consumption, but can only have a small impact on the results of the vehicle's new and old evaluation.

[0004] Based on the above analysis of the development status of this technical field, the existing technology lacks a solution for judging the age of a vehicle based on image recognition and neural network technology, and for expanding the edge of the object graphic according to the edge of the detection frame. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device, equipment and storage medium for identifying the age of a vehicle, aiming to solve the above-mentioned problems in the prior art.

[0006] According to a first aspect of an embodiment of the present invention, a method for identifying the age of a vehicle is provided, comprising:

[0007] Perform data preprocessing on the vehicle image to be identified to obtain a preprocessed image;

[0008] Detect the vehicle boundary of the preprocessed image by edge detection method to obtain a first image; input the preprocessed image into the target detection model for identifying wear and tear to obtain a second image including a detection frame;

[0009] Match each detection frame in the second image to the corresponding position in the first image, retain the detection frames that intersect with the area within the vehicle boundary of the first image, update the vehicle boundary in the first image, and use the area formed by the updated vehicle boundary as the overall area;

[0010] The sum of the retained detection frames is taken as the wear area, the ratio of pixels in the wear area to the whole area is calculated to obtain the wear ratio, and the retained detection frames are input into the classification model for judging the wear degree to obtain the wear degree;

[0011] A weighted sum is taken based on the wear ratio and the wear degree to obtain a newness score, which is then matched with the threshold level rule to obtain a result on the newness of the vehicle.

[0012] According to a second aspect of an embodiment of the present invention, there is provided a device for identifying the age of a vehicle, comprising:

[0013] A preprocessing module, used for performing data preprocessing on the vehicle image to be identified to obtain a preprocessed image;

[0014] A parallel processing module is used to detect the vehicle boundary of the pre-processed image by edge detection method to obtain a first image; the pre-processed image is input into the target detection model for identifying wear to obtain a second image including a detection frame;

[0015] An updating module is used to match the corresponding position of each detection frame in the second image in the first image, retain the detection frames that intersect with the area within the vehicle boundary of the first image, update the vehicle boundary in the first image, and use the area formed by the updated vehicle boundary as the overall area;

[0016] The wear assessment module is used to take the sum of the retained detection frames as the wear area, calculate the ratio of pixels in the wear area to the overall area, obtain the wear ratio, and input the retained detection frames into a classification model for judging the wear degree to obtain the wear degree;

[0017] The result summary module is used to perform weighted summation based on the wear ratio and the wear degree to obtain a new and old score, and match the new and old score with the threshold level rule to obtain a judgment result on the new and old degree of the vehicle.

[0018] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the method for identifying the newness of a vehicle as provided in the first aspect of the present disclosure are implemented.

[0019] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a program for implementing information transmission is stored. When the program is executed by a processor, the steps of the method for identifying the newness of a vehicle provided in the first aspect of the present disclosure are implemented.

[0020] The technical solution provided by the embodiment of the present invention includes the following beneficial effects: based on the pre-processed image, the vehicle boundary detection task and the target detection task are performed separately to avoid mutual interference caused by sequential processing; the detection frame that intersects with the vehicle boundary is retained, even if a part of the detection frame exceeds the vehicle boundary range, and the vehicle boundary is expanded and updated at the same time, and the final retained detection frame is used as the wear area to avoid missing edge wear. At the same time, the detection frames are all regular shapes to facilitate the calculation of the wear ratio; the wear ratio and wear degree are integrated for weighted summation to obtain a more accurate new and old score result.

[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate one or more embodiments of this specification 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 recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0023] Figure 1 is a flow chart of a method for identifying the newness or oldness of a vehicle according to an embodiment of the present invention;

[0024] Figure 2 is a schematic diagram of a first picture and a second picture according to an embodiment of the present invention;

[0025] Figure 3 is a schematic diagram of a mask update process according to an embodiment of the present invention;

[0026] Figure 4 is a schematic diagram of the identification framework process of an embodiment of the present invention;

[0027] Figure 5 is a schematic diagram of a device for identifying the newness or oldness of a vehicle according to an embodiment of the present invention;

[0028] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0030] Method Embodiment

[0031] According to an embodiment of the present invention, a method for identifying the age of a vehicle is provided. Figure 1 Flow chart of the method for identifying the newness and oldness of a vehicle according to an embodiment of the present invention. Figure 1 As shown, the method for identifying the age of a vehicle according to an embodiment of the present invention specifically includes:

[0032] In step S110, data preprocessing is performed on the vehicle image to be identified to obtain a preprocessed image, which specifically includes:

[0033] Perform Gaussian filtering on the vehicle image. Gaussian filtering can reduce high-frequency noise and obtain a smooth image.

[0034] The smooth image is contrast enhanced. Contrast enhancement can make scratches and wear more prominent and obvious, and a preprocessed image is obtained. Contrast enhancement is an important preprocessing process for vehicle age recognition.

[0035] In step S120, the vehicle boundary of the pre-processed image is detected by edge detection method to obtain a first image; the pre-processed image is input into the target detection model for identifying wear to obtain a second image including a detection frame, which specifically includes:

[0036] The edge detection method refers to the process of detecting the boundary of an object by computer vision technology. If the edge detection is not performed, it is subsequently impossible to determine whether the worn area is on the vehicle body itself. In the embodiment of the present invention, the edge detection method includes but is not limited to: gradient algorithm, canny edge detection method, etc. It should be noted that the first image is not an irregular image with only the boundary of the vehicle, but the boundary of the vehicle is drawn on the basis of the pre-processed image;

[0037] Input the preprocessed image into the pre-trained YOLOv5 model and output the second image;

[0038] The YOLO model usually outputs the detected objects in the form of detection boxes. YOLOv5 is an efficient real-time target detection model. When it identifies wear, it will surround the wear with a rectangle and specify the coordinates of the upper left and lower right corners of the location, which can represent the area of ​​the wear. The second picture currently includes multiple output detection boxes.

[0039] In an embodiment of the present invention, YOLOv5 is pre-trained based on a large amount of training set data images, and the training set includes annotated photos of various common car models on the market. If the vehicle is brand new, the photo is annotated as brand new, and if the vehicle is not brand new, the worn area is annotated. Therefore, the trained target detection model can automatically identify the wear on the vehicle to be identified, and will not identify the concave shape on the vehicle itself as wear. The use of a machine learning model can realize automatic identification of worn areas without manually comparing the vehicle to be identified with a brand-new vehicle.

[0040] Figure 2 is a schematic diagram of a first picture and a second picture according to an embodiment of the present invention, such as Figure 2 As shown, the process of generating the first image and the second image based on the preprocessed image is demonstrated, wherein the second image identifies three detection frames, namely a, b, and c.

[0041] In the embodiment of the present invention, both edge detection and target detection are based on preprocessed images. If target detection is performed on the basis of edge detection, the edge line will interfere with target detection, and vice versa, so the two tasks are independent of each other. In addition, although the YOLO model can handle target detection of irregular images, it needs to process them into regular graphics for detection. Therefore, the YOLO of the present invention directly processes the preprocessed images for better performance without extracting the vehicle area for identification.

[0042] In step S130, each detection frame in the second image is matched to the corresponding position in the first image, the detection frames that intersect with the area within the vehicle boundary of the first image are retained, the vehicle boundary in the first image is updated, and the area formed by the updated vehicle boundary is used as the overall area, specifically including:

[0043] In the first picture, pixel mask 1 is used to represent the area inside the vehicle boundary, and pixel mask 0 is used to represent the background. In the second picture, pixel mask 2 is used to represent the area inside the detection box, and pixel mask 0 is used to represent the background.

[0044] The pixel mask is used to mark a specific area in the image. Usually, pixel mask 0 is used to represent the background, and pixel mask 1 is used to represent the foreground. However, the pixel mask is not limited to 0 and 1. The embodiment of the present invention relates to the corresponding comparison of two images. If the pixel mask in the detection frame is set to 1, it will be confused with 1 in the vehicle area when compared with the first image. Therefore, the pixel mask in the detection frame is set to 2;

[0045] Use the pixel mask method to locate the corresponding position of the detection frame in the first image and make a judgment:

[0046] If the pixel masks in the corresponding position area are all 1, the detection box is regarded as the internal wear area, proving that the detection box is inside the vehicle area;

[0047] If there are 1 and 0 in the pixel mask of the corresponding position area, the detection frame is regarded as the edge wear area, which proves that part of the detection frame is inside the vehicle area and part is beyond the boundary, that is, the wear area is at the edge;

[0048] Otherwise, that is, the pixel masks in the corresponding area are all 0, the detection frame is discarded, and the content in these detection frames is interference from the background;

[0049] Keep all the detection frames corresponding to the inner wear area and the edge wear area. Figure 2 In the second picture shown, the retained detection frames are b and c, b is the internal wear area, c is the edge wear area, and area a belongs to background interference and should be removed.

[0050] In the edge wear area, the pixel mask value of 0 is updated to 1 in the corresponding position area of ​​the first image. That is, the part of the edge wear area beyond the vehicle boundary is added to the vehicle area, thereby updating and expanding the vehicle boundary. This method does not require further time-consuming model clipping, and effectively retains the wear of the edge part, solves the problem of the detection box exceeding the vehicle boundary, and strikes a balance between calculation accuracy and calculation consumption;

[0051] Figure 3 is a schematic diagram of a mask update process according to an embodiment of the present invention. Figure 3 As shown, the changes in the corresponding area of ​​the edge wear area c in the first image are shown. The mask update on the first image expands the internal area of ​​the vehicle. The area with a pixel mask of 1 after the update constitutes a new boundary, that is, the overall area.

[0052] Since the purpose of the embodiment of the present invention is to calculate the wear ratio, it is only necessary to calculate the numerical information in the two updated pictures respectively, and therefore there is no need to merge the two updated pictures.

[0053] In step S140, the sum of the retained detection frames is taken as the wear area, the ratio of the pixels in the wear area to the whole area is calculated, and the wear ratio is obtained. The retained detection frames are input into the classification model for judging the wear degree to obtain the wear degree, which specifically includes:

[0054] Since the retained detection frames are all regular rectangles, it is faster and more convenient to calculate the pixel area of ​​the wear area than the technical means of segmenting the detection frame. Traditional segmentation detection will result in the detection frame not being a regular shape;

[0055] In the embodiment of the present invention, the retained inspection frames are enlarged and processed, and are sequentially input into the pre-trained support vector machine. The individual processing can focus more on these local features, and the wear score corresponding to each inspection frame is obtained. The average of the wear score is calculated as the wear degree. The support vector machine can handle classification problems and is most commonly used for binary classification problems. The label classification score of 10 is defined as slight wear and the score of 20 is severe wear. If the inspection frame b is slightly worn, 10 is output. If the inspection frame c is severely worn, the wear degree is represented as 15.

[0056] In step S150, a weighted sum is performed based on the wear ratio and the wear degree to obtain a newness score, and the newness score is matched with the threshold level rule to obtain a judgment result of the newness of the vehicle, which specifically includes:

[0057] Use formula 1 to calculate the new and old scores:

[0058] S = α × R + β × D Formula 1;

[0059] Among them, S represents the new and old scores, α and β represent weighting coefficients, R represents the conversion value of the wear ratio, and D represents the degree of wear; the weighting coefficient is used to adjust the importance of different features or variables, which can be determined through field experience. The degree of wear is a percentage calculated by an area ratio, and the degree of wear is a score between 0-100. Therefore, the degree of wear needs to be converted into the same dimensional interval. In the embodiment of the present invention, R is the degree of wear multiplied by 100.

[0060] As a vehicle ages, different degrees of aging will occur inside and outside the vehicle. As the vehicle body is exposed to the sun, rain, strong ultraviolet rays and other natural environments for a long time, and is susceptible to physical damage such as stone splashing and accidental collisions, it is more prone to wear and tear than the interior of the vehicle. In the same period of use, the aging phenomenon inside the vehicle is mostly related to frequent use and friction by people, which is wear and tear caused by normal use. Therefore, different threshold level rules are set for the interior and exterior of the vehicle, and the threshold for the exterior of the vehicle is higher at the same level.

[0061] In the embodiment of the present invention, only two types of images are divided into the images of the interior and the exterior. If the vehicle images to be identified include both the interior and the exterior, one of the two types is selected according to the proportion.

[0062] If the vehicle to be identified is an exterior picture, the threshold level rules corresponding to the exterior of the vehicle are matched; if the vehicle to be identified is an interior picture, the threshold level rules corresponding to the interior of the vehicle are matched. The judgment results include: new, nearly new, good, average, and poor.

[0063] Preferably, the method further comprises:

[0064] In step S160, an image annotation tool is used to annotate the judgment result in the initial vehicle image for visual display, and data related to the vehicle's age and user or market is collected. The data source may include brand, model, production year, mileage, maintenance record, user purchase history, preferences, budget, market price of similar vehicles, supply and demand conditions, etc. Suggestions are automatically generated and visualized through a pre-trained machine learning model.

[0065] The above technical solutions of the embodiments of the present invention are illustrated with reference to the following drawings.

[0066] Figure 4 is a schematic diagram of the recognition framework process of an embodiment of the present invention, such as Figure 4 As shown in the figure, the complete architecture of vehicle age recognition is demonstrated, which is mainly divided into image preprocessing, wear ratio judgment and wear degree judgment. In the process of wear ratio judgment, the retained detection frame is used as the input of the classification model for wear degree judgment. The overall idea is to first identify the worn areas and then judge the severity of wear in these areas. The recognition result of the vehicle age is a combination of wear ratio and wear degree.

[0067] In summary, in response to the existing problems, the method for identifying the newness and oldness of a vehicle invented in this invention is divided into a wear ratio judgment task and a wear degree judgment task; first, the wear ratio judgment task is performed, and vehicle boundary detection and target detection are performed based on the preprocessed image respectively to avoid mutual interference caused by sequential processing. The target detection task is implemented using the YOLOv5 model, which achieves a good balance between solution speed and accuracy; it is necessary to retain the detection frame that intersects with the vehicle boundary, and a multi-value mask is used to facilitate accurate matching of the first image and the second image. Even if a part of the detection frame exceeds the vehicle boundary range, it is retained. At the same time, the vehicle boundary is expanded and updated, and the final retained detection frame is used as the wear area to avoid missing edge wear. At the same time, the detection frames are all regular shapes to facilitate the calculation of the wear ratio; for the wear degree judgment task, each retained detection frame is used as a complete image for degree recognition to avoid failure to recognize local wear parts; the integrated wear ratio and wear degree are weighted summed to obtain a more accurate new and old score result. In the process of level threshold rule matching, two different threshold standards for inside and outside the vehicle are distinguished to consider that the outside of the vehicle is more likely to show obvious signs of wear and improve the accuracy of the recognition result.

[0068] Device Embodiment

[0069] According to an embodiment of the present invention, a device for identifying the newness or oldness of a vehicle is provided. Figure 5 Schematic diagram of a vehicle age recognition device according to an embodiment of the present invention. Figure 5 As shown, the device for identifying the newness and oldness of a vehicle according to an embodiment of the present invention specifically includes:

[0070] The preprocessing module 50 is used to perform data preprocessing on the vehicle image to be identified to obtain a preprocessed image, and is specifically used for:

[0071] Perform Gaussian filtering on the vehicle image to obtain a smooth image;

[0072] The contrast of the smoothed image is enhanced to obtain a preprocessed image.

[0073] The parallel processing module 52 is used to detect the vehicle boundary of the pre-processed image by edge detection method to obtain a first image; input the pre-processed image into the target detection model for identifying wear to obtain a second image including a detection frame, specifically for:

[0074] The preprocessed image is fed into the pre-trained YOLOv5 model and the second image is output.

[0075] The updating module 54 is used to match the corresponding position of each detection frame in the second image in the first image, retain the detection frame that intersects with the area within the vehicle boundary of the first image, update the vehicle boundary in the first image, and use the area formed by the updated vehicle boundary as the overall area, specifically for:

[0076] In the first picture, pixel mask 1 is used to represent the area inside the vehicle boundary, and pixel mask 0 is used to represent the background. In the second picture, pixel mask 2 is used to represent the area inside the detection box, and pixel mask 0 is used to represent the background. The corresponding position of the detection box in the first picture is located by the pixel mask method, and the judgment is made:

[0077] If the pixel masks in the corresponding position area are all 1, the detection frame is regarded as the internal wear area. If the pixel masks in the corresponding position area have both 1 and 0, the detection frame is regarded as the edge wear area. Otherwise, the detection frame is discarded.

[0078] All detection frames corresponding to the inner wear area and the edge wear area are retained.

[0079] In the edge wear area, in the corresponding position area of ​​the first image, the value of the pixel mask of 0 is updated to 1.

[0080] The wear assessment module 56 is used to take the sum of the retained detection frames as the wear area, calculate the ratio of pixels in the wear area to the overall area, obtain the wear ratio, input the retained detection frames into a classification model for judging the wear degree, and obtain the wear degree, which is specifically used for:

[0081] The retained inspection frames are input into the pre-trained support vector machine in turn to obtain the wear score corresponding to each inspection frame, and the average of the wear scores is calculated as the wear degree.

[0082] The result summary module 58 is used to perform weighted summation based on the wear ratio and the wear degree to obtain a newness score, match the newness score with the threshold level rule, and obtain a result of judging the newness of the vehicle, specifically for:

[0083] Use formula 1 to calculate the new and old scores:

[0084] S = α × R + β × D Formula 1;

[0085] Among them, S represents the new and old score, α and β represent weighting coefficients, R represents the conversion value of the wear ratio, and D represents the degree of wear;

[0086] If the vehicle to be identified is an exterior image, the threshold level rule corresponding to the exterior of the vehicle is matched; if the vehicle to be identified is an interior image, the threshold level rule corresponding to the interior of the vehicle is matched.

[0087] Preferably, the device further comprises:

[0088] The visualization module 510 uses an image annotation tool to annotate the judgment results in the initial vehicle image for visual display, and collects data related to the vehicle's age and user or market. The data source may include brand, model, production year, mileage, maintenance record, user purchase history, preferences, budget, market price of similar vehicles, supply and demand conditions, etc. It automatically generates suggestions and visualizes them through a pre-trained machine learning model.

[0089] In summary, in view of the existing problems, the identification device for the newness and oldness of a vehicle invented in this invention is divided into a wear ratio judgment task and a wear degree judgment task; first, the wear ratio judgment task is performed, and vehicle boundary detection and target detection are performed based on the preprocessed image respectively to avoid mutual interference caused by sequential processing. The target detection task is implemented using the YOLOv5 model, and a good balance is achieved between the solution speed and accuracy; it is necessary to retain the detection frame that intersects with the vehicle boundary, and a multi-value mask is used to facilitate the accurate matching of the first image and the second image. Even if a part of the detection frame exceeds the vehicle boundary range, it is retained. At the same time, the vehicle boundary is expanded and updated, and the final retained detection frame is used as the wear area to avoid missing edge wear. At the same time, the detection frames are all regular shapes to facilitate the calculation of the wear ratio; for the wear degree judgment task, each retained detection frame is used as a complete image for degree recognition to avoid failure to recognize local wear parts; the integrated wear ratio and wear degree are weighted summed to obtain a more accurate new and old score result. In the process of level threshold rule matching, two different threshold standards for inside and outside the vehicle are distinguished to consider that the outside of the vehicle is more likely to show obvious signs of wear and improve the accuracy of the recognition result.

[0090] Electronic device embodiment

[0091] Figure 6 6 is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device 600 may include at least one processor 610 and a memory 620. The processor 610 may execute instructions stored in the memory 620. The processor 610 is connected to the memory 620 through a data bus. In addition to the memory 620, the processor 610 may also be connected to an input device 630, an output device 640, and a communication device 650 through a data bus.

[0092] The processor 610 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0093] The memory 620 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0094] In the disclosed embodiment, executable instructions are stored in the memory 620, and the processor 610 can read the executable instructions from the memory 620 and execute the instructions to implement all or part of the steps of the vehicle condition identification method of any of the above exemplary embodiments.

[0095] Computer Readable Storage Medium Embodiments

[0096] In addition to the above-mentioned methods and devices, an exemplary embodiment of the present disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product, wherein the computer product includes computer program instructions that can be executed by a processor to implement all or part of the steps described in any of the vehicle condition identification methods in the above-mentioned exemplary embodiments.

[0097] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as "C" language or similar programming languages ​​and scripting languages ​​(e.g., Python). The program code may be executed entirely on the user computing device, partially on the user computing device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0098] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of readable storage media include: a static random access memory (SRAM) with one or more wires electrically connected, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk, or any suitable combination of the above.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying the age of a vehicle, characterized in that: include: Perform data preprocessing on the vehicle image to be identified to obtain a preprocessed image; Detecting the vehicle boundary of the preprocessed image by an edge detection method to obtain a first image; Inputting the preprocessed image into a target detection model for identifying wear and tear to obtain a second image including a detection frame; Matching each detection frame in the second image with the corresponding position in the first image, retaining the detection frames that intersect with the area within the vehicle boundary of the first image, updating the vehicle boundary in the first image, and taking the area formed by the updated vehicle boundary as the overall area; The sum of the retained detection frames is taken as the wear area, the ratio of the pixels of the wear area to the overall area is calculated to obtain the wear ratio, and the retained detection frames are input into a classification model for judging the wear degree to obtain the wear degree; A weighted sum is performed based on the wear ratio and the wear degree to obtain a newness score, and the newness score is matched with a threshold level rule to obtain a judgment result of the newness of the vehicle.

2. The method according to claim 1, characterized in that The data preprocessing of the vehicle image to be identified to obtain the preprocessed image specifically includes: Performing Gaussian filtering on the vehicle image to obtain a smooth image; The smoothed image is subjected to contrast enhancement to obtain a preprocessed image.

3. The method according to claim 1, characterized in that The step of inputting the preprocessed image into a target detection model for identifying wear and tear to obtain a second image including a detection frame specifically includes: inputting the preprocessed image into a pre-trained YOLOv5 model to output a second image.

4. The method according to claim 1, characterized in that: The matching of each detection frame in the second image to the corresponding position in the first image and retaining the detection frame that intersects with the area within the boundary of the vehicle in the first image specifically includes: In the first picture, pixel mask 1 is used to represent the area inside the vehicle boundary, and pixel mask 0 is used to represent the background. In the second picture, pixel mask 2 is used to represent the area inside the detection frame, and pixel mask 0 is used to represent the background. The corresponding position of the detection frame in the first picture is located by the pixel mask method, and a judgment is made: If the pixel masks in the corresponding position area are all 1, the detection frame is regarded as the internal wear area. If the pixel masks in the corresponding position area have both 1 and 0, the detection frame is regarded as the edge wear area. Otherwise, the detection frame is discarded. All detection frames corresponding to the inner wear area and the edge wear area are retained.

5. The method according to claim 4, characterized in that The updating of the vehicle boundary in the first picture specifically includes: updating the pixel mask value of 0 to 1 in the corresponding position area of ​​the first picture in the edge wear area.

6. The method according to claim 1, characterized in that The inputting of the retained detection frame into the classification model for judging the degree of wear to obtain the degree of wear specifically includes: The retained inspection frames are input into the pre-trained support vector machine in sequence to obtain the wear score corresponding to each inspection frame, and the average value of the wear score is calculated as the wear degree.

7. The method according to claim 1, characterized in that The weighted summation based on the wear ratio and the wear degree is performed to obtain a newness score, and the newness score is matched with a threshold level rule to obtain a result of judging the newness of the vehicle, which specifically includes: Use formula 1 to calculate the new and old scores: S = α × R + β × D Formula 1; Among them, S represents the new and old score, α and β represent weighting coefficients, R represents the conversion value of the wear ratio, and D represents the degree of wear; If the vehicle to be identified is an exterior image, the threshold level rule corresponding to the exterior of the vehicle is matched; if the vehicle to be identified is an interior image, the threshold level rule corresponding to the interior of the vehicle is matched.

8. A device for identifying the age of a vehicle, characterized in that: include: A preprocessing module, used for performing data preprocessing on the vehicle image to be identified to obtain a preprocessed image; A parallel processing module, used for detecting the vehicle boundary of the pre-processed image by an edge detection method to obtain a first image; Inputting the preprocessed image into a target detection model for identifying wear and tear to obtain a second image including a detection frame; An updating module, configured to match the corresponding position of each detection frame in the second image with the corresponding position in the first image, retain the detection frames that intersect with the area within the vehicle boundary of the first image, update the vehicle boundary in the first image, and use the area formed by the updated vehicle boundary as the overall area; A wear assessment module is used to take the sum of the retained detection frames as the wear area, calculate the ratio of the pixels of the wear area to the overall area, obtain the wear ratio, input the retained detection frames into a classification model for judging the wear degree, and obtain the wear degree; The result summary module is used to perform weighted summation based on the wear ratio and the wear degree to obtain a newness score, match the newness score with a threshold level rule, and obtain a judgment result of the newness of the vehicle.

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 when the computer program is executed by the processor, the steps of the method for identifying the newness or oldness of a vehicle as claimed in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an implementation program for information transmission, and when the program is executed by a processor, the steps of the method for identifying the newness or oldness of a vehicle as described in any one of claims 1 to 7 are implemented.