Vehicle appearance intelligent diagnosis method, device and computer readable storage medium
By generating QR code images and image processing technology, combined with convolution operations and pooling operations, it solves the problems of low accuracy and high cost caused by manual review in existing car appearance diagnosis, and achieves fast and accurate intelligent diagnosis.
Patent Information
- Application Number
- CN201910975680.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-12
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2039-10-12
AI Technical Summary
Existing vehicle appearance diagnosis mainly relies on manual review, resulting in low diagnostic accuracy, high cost and slow speed, and lacks a fast and accurate diagnostic method.
By generating QR code images, users can quickly upload car images, and use contrast enhancement, histogram equalization and multi-corner feature extraction methods to process car images, and combine convolution operations and pooling operations for intelligent diagnosis.
It achieves fast and accurate intelligent diagnosis of automobile appearance, improves diagnosis efficiency and accuracy, and reduces the cost of manual review.
Smart Images

Figure CN110837779B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for intelligent diagnosis of vehicle appearance and a computer-readable storage medium. Background Art
[0002] Automobile appearance diagnosis is currently applied in many fields, such as auto insurance claims, second-hand car resale, etc. At present, most automobile appearance diagnosis is issued by the ordering system, and then the car owner uploads the car photo. When the ordering system receives the car photo, the reviewer performs appearance inspection and manually issues the diagnosis conclusion. Since this manual review scheme affects the diagnostic accuracy of the automobile appearance and the manual review is costly and slow, a method for automobile appearance diagnosis with fast diagnosis and high diagnostic accuracy is urgently needed. Summary of the invention
[0003] The present invention provides a vehicle appearance intelligent diagnosis method, device and computer-readable storage medium, the main purpose of which is to perform vehicle appearance intelligent diagnosis on the appearance of the vehicle according to a car picture input by a user.
[0004] To achieve the above object, the present invention provides a vehicle appearance intelligent diagnosis method, comprising:
[0005] Receive a vehicle appearance diagnosis request from a user, generate a QR code image according to the vehicle appearance diagnosis request, and feed the QR code image back to the user;
[0006] Receiving a vehicle multi-angle picture set uploaded by a user according to the QR code picture, and processing the vehicle multi-angle picture set based on contrast enhancement and histogram equalization operations to obtain a standard vehicle picture set;
[0007] Extracting features of the standard vehicle image set according to a multi-corner feature extraction method to obtain a vehicle feature data set;
[0008] Based on convolution operation and pooling operation, feature diagnosis is performed on the vehicle feature data set and the diagnosis result is output.
[0009] Optionally, generating a QR code image according to the vehicle appearance intelligent diagnosis request includes:
[0010] Inputting the vehicle appearance intelligent diagnosis request into a pre-built QR code generation program;
[0011] Based on the vehicle appearance intelligent diagnosis request, the QR code generation program runs a QR code toolkit to generate a QR code width and height and QR code encoding content;
[0012] The two-dimensional code image is obtained according to the width and height of the two-dimensional code and the two-dimensional code encoding.
[0013] Optionally, the histogram equalization operation includes:
[0014] Pre-constructing a probability density function and a grayscale monotonically increasing function according to the vehicle multi-angle picture set;
[0015] Determine a discrete transformation function based on the grayscale monotonically increasing function and the probability density function;
[0016] The function value of the discrete transformation function is solved, and the grayscale value of the vehicle multi-angle picture set is replaced by the function value to obtain the standard vehicle picture set.
[0017] Optionally, extracting the features of the standard vehicle picture set according to a multi-corner feature extraction method to obtain a vehicle feature data set includes:
[0018] Presetting the target position coordinates of the standard vehicle picture set;
[0019] Obtaining a coordinate set of the standard vehicle picture set according to the target position coordinates;
[0020] The sum of square errors of the standard vehicle picture set is solved according to the coordinate set, multi-corner point features are obtained according to the sum of square errors, and the multi-corner point features are collected to obtain a vehicle feature data set.
[0021] Optionally, the method for calculating the sum of squared errors includes:
[0022]
[0023] Among them, E (x,y) is the error sum of squares, (x, y) is the coordinate of each pixel in the standard vehicle image set, ω x,y is the coordinate window value, is the pixel grayscale value of the target position coordinates, is the pixel grayscale value of each pixel based on the target position coordinates.
[0024] In addition, to achieve the above-mentioned purpose, the present invention further provides a vehicle appearance intelligent diagnosis device, the device comprising a memory and a processor, the memory storing a vehicle appearance intelligent diagnosis program that can be run on the processor, and the vehicle appearance intelligent diagnosis program when executed by the processor implements the following steps:
[0025] Receive a vehicle appearance diagnosis request from a user, generate a QR code image according to the vehicle appearance diagnosis request, and feed the QR code image back to the user;
[0026] Receiving a vehicle multi-angle picture set uploaded by a user according to the QR code picture, and processing the vehicle multi-angle picture set based on contrast enhancement and histogram equalization operations to obtain a standard vehicle picture set;
[0027] Extracting features of the standard vehicle image set according to a multi-corner feature extraction method to obtain a vehicle feature data set;
[0028] Based on convolution operation and pooling operation, feature diagnosis is performed on the vehicle feature data set and the diagnosis result is output.
[0029] Optionally, generating a QR code image according to the vehicle appearance intelligent diagnosis request includes:
[0030] Inputting the vehicle appearance intelligent diagnosis request into a pre-built QR code generation program;
[0031] Based on the vehicle appearance intelligent diagnosis request, the QR code generation program runs a QR code toolkit to generate a QR code width and height and QR code encoding content;
[0032] The two-dimensional code image is obtained according to the width and height of the two-dimensional code and the two-dimensional code encoding.
[0033] Optionally, the histogram equalization operation includes:
[0034] Pre-constructing a probability density function and a grayscale monotonically increasing function according to the vehicle multi-angle picture set;
[0035] Determine a discrete transformation function based on the grayscale monotonically increasing function and the probability density function;
[0036] The function value of the discrete transformation function is solved, and the grayscale value of the vehicle multi-angle picture set is replaced by the function value to obtain the standard vehicle picture set.
[0037] Optionally, extracting the features of the standard vehicle picture set according to a multi-corner feature extraction method to obtain a vehicle feature data set includes:
[0038] Presetting the target position coordinates of the standard vehicle picture set;
[0039] Obtaining a coordinate set of the standard vehicle picture set according to the target position coordinates;
[0040] The sum of square errors of the standard vehicle picture set is solved according to the coordinate set, multi-corner point features are obtained according to the sum of square errors, and the multi-corner point features are collected to obtain a vehicle feature data set.
[0041] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a vehicle appearance intelligent diagnosis program is stored. The vehicle appearance intelligent diagnosis program can be executed by one or more processors to implement the steps of the vehicle appearance intelligent diagnosis method as described above.
[0042] The present invention first allows users to quickly upload pictures by generating a QR code, speeding up the entire process of automobile appearance diagnosis, and processes automobile pictures based on contrast enhancement and histogram equalization operations to improve the later detection of automobile features, extracts automobile features in many aspects according to the multi-corner feature extraction method, and uses convolution operations and pooling operations to obtain the final automobile appearance diagnosis results. Therefore, the vehicle appearance intelligent diagnosis method, device and computer-readable storage medium proposed by the present invention can achieve the purpose of accurate and rapid vehicle appearance intelligent diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of a process flow of a vehicle appearance intelligent diagnosis method provided by an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of the internal structure of a vehicle appearance intelligent diagnosis device provided by an embodiment of the present invention;
[0045] Figure 3 A schematic diagram of a module of a vehicle appearance intelligent diagnosis program in a vehicle appearance intelligent diagnosis device provided in an embodiment of the present invention.
[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0048] The present invention provides a method for intelligent diagnosis of vehicle appearance. Figure 1 FIG. 1 is a flow chart of a method for intelligent diagnosis of vehicle appearance provided by an embodiment of the present invention. The method can be executed by a device, and the device can be implemented by software and / or hardware.
[0049] In this embodiment, the vehicle appearance intelligent diagnosis method includes:
[0050] S1. Receive a vehicle appearance diagnosis request from a user, generate a QR code image according to the vehicle appearance diagnosis request, and feed the QR code image back to the user.
[0051] Preferably, when a user wishes to use the present invention to evaluate a vehicle, such as when the user intends to purchase insurance for his or her vehicle, the insurance company wishes to obtain complete vehicle information, including all-round photos of the vehicle, and to perform intelligent diagnosis of the vehicle based on all-round photos and other information to determine the safety factor of the vehicle. At this time, the user needs to log in to the insurance company's vehicle insurance website to send a request for intelligent diagnosis of the vehicle's appearance. For example, when the user wants to sell his or her vehicle as a used car, he or she wants to register his or her vehicle in detail through a used car resale website platform. At this time, the user needs to log in to the used car resale website platform to send a request for intelligent diagnosis of the vehicle's appearance. Therefore, the above-mentioned logging in to the insurance company's vehicle insurance website to send a request for intelligent diagnosis of the vehicle's appearance and sending a request for intelligent diagnosis of the vehicle's appearance through a used car resale website platform can both be requests for intelligent diagnosis of the vehicle's appearance.
[0052] Furthermore, generating a QR code image according to the intelligent diagnosis request for the vehicle appearance includes: inputting the intelligent diagnosis request for the vehicle appearance into a pre-built QR code generation program, and based on the intelligent diagnosis request for the vehicle appearance, the QR code generation program automatically runs in a QR code toolkit to generate a QR code width and height, and a QR code encoding content, and obtaining the QR code image according to the QR code width and height, and the QR code encoding.
[0053] Preferably, the pre-built QR code generation program can be built using a JAVA program, and the QR code toolkit of the JAVA program is package com.payplatform.util. The QR code width and height and the QR code code are placed in a pre-built blank image to generate the QR code image.
[0054] Preferably, the present invention feeds back the QR code image to the user and prompts the user to scan the QR code image to upload the vehicle multi-angle data set. The QR code image is a quick channel to help the user quickly upload the vehicle multi-angle data set.
[0055] S2. Receive a vehicle multi-angle picture set uploaded by a user according to the QR code picture, and process the vehicle multi-angle picture set based on contrast enhancement and histogram equalization operations to obtain a standard vehicle picture set.
[0056] Preferably, the vehicle multi-angle data set requires that the vehicle pictures uploaded by the user must be complete and include pictures of multiple angles and multiple parts of the vehicle. The vehicle multi-angle data set includes, for example, full-body pictures taken at 45° angles at the front and rear of the vehicle, pictures of the left front headlight, right front headlight, left rear headlight, right rear headlight, license plate number, front and rear windshields, etc.
[0057] Contrast refers to the contrast between the maximum and minimum brightness in an image. Since low contrast makes image processing more difficult, the contrast enhancement process is required. Preferably, the contrast enhancement of the present invention can adopt a contrast stretching method to achieve the purpose of image contrast enhancement by increasing the grayscale dynamic range. Contrast stretching is also called grayscale stretching, and the contrast stretching is as follows:
[0058] D b =f(D a )=a*D a +b
[0059] Where a is the linear slope and b is the intercept on the Y axis. If a>1, the contrast of the image output at this time is enhanced compared with the contrast of the vehicle multi-angle picture set. If a<1, the contrast of the image output at this time is weakened compared with the contrast of the vehicle multi-angle picture set. Where D a Represents the grayscale value of the vehicle multi-angle image set, D b Represents the output image grayscale value.
[0060] Preferably, the histogram equalization operation of the present invention includes: pre-constructing a preset grayscale probability density function and a grayscale monotonically increasing function according to the vehicle multi-angle picture set, determining a discrete transformation function based on the grayscale monotonically increasing function and the probability density function, solving the function value of the discrete transformation function, and replacing the grayscale of the vehicle multi-angle picture set with the function value to obtain the standard vehicle picture set.
[0061] Furthermore, the grayscale monotonically increasing function is:
[0062]
[0063] Among them, T r is the grayscale monotonically increasing function, n is the grayscale interval of the vehicle multi-angle picture set, p r is the probability density function, r is the grayscale of the vehicle multi-angle picture set. The probability density function can adopt a Gaussian distribution function.
[0064] The probability density function may adopt a normal distribution function.
[0065] The discrete transformation function is:
[0066]
[0067] Among them, S k is the discrete transformation function, k is the grayscale division level, r krepresents the estimated grayscale number divided according to the grayscale division level. For example, the grayscale division level is divided into ten levels, distributed as [0,20], [20,40], ..., [230,255].
[0068] S3. Extracting corner point features of the standard vehicle image set according to a multi-corner point feature extraction method to obtain a vehicle feature data set.
[0069] Preferably, the method of extracting features of the standard vehicle picture set according to a multi-corner feature extraction method to obtain a vehicle feature data set includes: presetting target position coordinates of the standard vehicle picture set; obtaining a coordinate set of the standard vehicle picture set according to the target position coordinates; solving the sum of squared errors of the standard vehicle picture set according to the coordinate set, obtaining multi-corner features according to the sum of squared errors, and aggregating the multi-corner features to obtain a vehicle feature data set.
[0070] Furthermore, the target position coordinates of the preset standard vehicle picture set may be selected from the center of each vehicle picture in the standard vehicle picture set or the lower left corner of the picture, and are represented by (x0, y0).
[0071] The error sum of squares is:
[0072]
[0073] Among them, E (x,y) is the error sum of squares, (x, y) is the coordinate of each pixel in the standard vehicle image set, ω x,y is the coordinate window value, is the pixel grayscale value of the target position coordinates, is the pixel grayscale value of each pixel based on the target position coordinates.
[0074] Furthermore, the It can be transformed into:
[0075]
[0076] Among them, O(x 2 ) is the offset value of the multi-corner feature in the x-axis direction, O(y 2 ) is the offset value of the multi-corner feature in the y-axis direction.
[0077] S4. Perform feature diagnosis on the vehicle feature data set based on convolution operation and pooling operation and output the diagnosis result.
[0078] The convolution operation and pooling operation include pre-building a convolution template and determining a convolution step length, and calculating the convolution template and the vehicle feature data set according to the convolution step length to obtain a convolution matrix set after the convolution operation, thereby completing the convolution operation. The maximum value or average value of the matrix in the convolution matrix set is selected to replace the convolution matrix set, thereby completing the pooling operation and obtaining a diagnosis result.
[0079] Furthermore, the pre-built convolution template may be a standard 3*3 matrix, such as The calculation method of the matrix after the convolution operation is to use a convolution amplitude of 1 from left to right. For example, the feature matrix of the vehicle feature data set with a feature of 9*9 is: Then the pre-built convolution template First with The calculation method is: multiply the corresponding dimensions such as 1*0, 0*3, 1*1, and the final result is: By analogy, the pre-built convolution template According to the convolution amplitude of 1, continue to move one step to the right and the matrix is: the pre-built convolution template Perform the above operations to obtain the pre-built convolution template It can be seen that when the convolution operation is completed, a large number of small-dimensional matrices can be generated, as shown above and Therefore, the pooling operation is to reduce the dimensions of a large number of small-dimensional matrices produced by the convolution operation. Preferably, the maximization principle can be adopted, such as and The largest values 3 and 7 are used instead to complete the pooling operation.
[0080] Preferably, the above convolution operation and pooling operation are performed repeatedly, such as performing the convolution and pooling operation 16 times to obtain the final feature optimization set.
[0081] Preferably, an activation operation is used to perform probability diagnosis on the feature optimization set through a softmax function, and the diagnosis result with the highest probability is selected as the final diagnosis result and output. The softmax function is:
[0082]
[0083] Among them, p(car) represents the output probability that the vehicle is a car, k represents the data volume of the feature optimization set, e is an infinite non-repeating decimal, and j represents the number of selectable diagnosis results. For example, when the vehicle is resold as a used car, when car = 9.5% new, p(car = 9.5% new) is calculated to be 0.87, and when word = 7.5, p(word = 7.5) is calculated to be 0.24, so the vehicle represents a 9.5% new vehicle.
[0084] The invention also provides a vehicle appearance intelligent diagnosis device. Figure 2 , which is a schematic diagram of the internal structure of a vehicle appearance intelligent diagnosis device provided in one embodiment of the present invention.
[0085] In this embodiment, the vehicle appearance intelligent diagnosis device 1 can be a PC (Personal Computer), or a terminal device such as a smart phone, a tablet computer, a portable computer, or a server, etc. The vehicle appearance intelligent diagnosis device 1 at least includes a memory 11, a processor 12, a communication bus 13, and a network interface 14.
[0086] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the vehicle appearance intelligent diagnosis device 1, such as the hard disk of the vehicle appearance intelligent diagnosis device 1. In other embodiments, the memory 11 can also be an external storage device of the vehicle appearance intelligent diagnosis device 1, such as a plug-in hard disk equipped on the vehicle appearance intelligent diagnosis device 1, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 11 can also include both an internal storage unit and an external storage device of the vehicle appearance intelligent diagnosis device 1. The memory 11 can not only be used to store application software and various types of data installed in the vehicle appearance intelligent diagnosis device 1, such as the code of the vehicle appearance intelligent diagnosis program 01, but also can be used to temporarily store data that has been output or is to be output.
[0087] In some embodiments, the processor 12 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, which is used to run the program code or process data stored in the memory 11, such as executing the vehicle appearance intelligent diagnosis program 01.
[0088] The communication bus 13 is used to realize the connection and communication between these components.
[0089] The network interface 14 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the device 1 and other electronic devices.
[0090] Optionally, the device 1 may also include a user interface, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the vehicle appearance intelligent diagnosis device 1 and to display a visual user interface.
[0091] Figure 2 Only the vehicle appearance intelligent diagnosis device 1 having components 11-14 and the vehicle appearance intelligent diagnosis program 01 is shown. It can be understood by those skilled in the art that Figure 1 The structure shown does not constitute a limitation on the vehicle appearance intelligent diagnosis device 1, and may include fewer or more components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0092] exist Figure 2 In the embodiment of the device 1 shown, the memory 11 stores a vehicle appearance intelligent diagnosis program 01; when the processor 12 executes the vehicle appearance intelligent diagnosis program 01 stored in the memory 11, the following steps are implemented:
[0093] Step 1: Receive a vehicle appearance diagnosis request from a user, generate a QR code image according to the vehicle appearance diagnosis request, and feed the QR code image back to the user.
[0094] Preferably, when a user wishes to use the present invention to evaluate a vehicle, such as when the user intends to purchase insurance for his or her vehicle, the insurance company wishes to obtain complete vehicle information, including all-round photos of the vehicle, and to perform intelligent diagnosis of the vehicle based on all-round photos and other information to determine the safety factor of the vehicle. At this time, the user needs to log in to the insurance company's vehicle insurance website to send a request for intelligent diagnosis of the vehicle's appearance. For example, when the user wants to sell his or her vehicle as a used car, he or she wants to register his or her vehicle in detail through a used car resale website platform. At this time, the user needs to log in to the used car resale website platform to send a request for intelligent diagnosis of the vehicle's appearance. Therefore, the above-mentioned logging in to the insurance company's vehicle insurance website to send a request for intelligent diagnosis of the vehicle's appearance and sending a request for intelligent diagnosis of the vehicle's appearance through a used car resale website platform can both be requests for intelligent diagnosis of the vehicle's appearance.
[0095] Furthermore, generating a QR code image according to the intelligent diagnosis request for the vehicle appearance includes: inputting the intelligent diagnosis request for the vehicle appearance into a pre-built QR code generation program, and based on the intelligent diagnosis request for the vehicle appearance, the QR code generation program automatically runs in a QR code toolkit to generate a QR code width and height, and a QR code encoding content, and obtaining the QR code image according to the QR code width and height, and the QR code encoding.
[0096] Preferably, the pre-built QR code generation program can be built using a JAVA program, and the QR code toolkit of the JAVA program is package com.payplatform.util. The QR code width and height and the QR code code are placed in a pre-built blank image to generate the QR code image.
[0097] Preferably, the present invention feeds back the QR code image to the user and prompts the user to scan the QR code image to upload the vehicle multi-angle data set. The QR code image is a quick channel to help the user quickly upload the vehicle multi-angle data set.
[0098] Step 2: receiving a vehicle multi-angle picture set uploaded by a user according to the QR code picture, and processing the vehicle multi-angle picture set based on contrast enhancement and histogram equalization operations to obtain a standard vehicle picture set.
[0099] Preferably, the vehicle multi-angle data set requires that the vehicle pictures uploaded by the user must be complete and include pictures of multiple angles and multiple parts of the vehicle. The vehicle multi-angle data set includes, for example, full-body pictures taken at 45° angles at the front and rear of the vehicle, pictures of the left front headlight, right front headlight, left rear headlight, right rear headlight, license plate number, front and rear windshields, etc.
[0100] Contrast refers to the contrast between the maximum and minimum brightness in an image. Since low contrast makes image processing more difficult, the contrast enhancement process is required. Preferably, the contrast enhancement of the present invention can adopt a contrast stretching method to achieve the purpose of image contrast enhancement by increasing the grayscale dynamic range. Contrast stretching is also called grayscale stretching, and the contrast stretching is as follows:
[0101] D b =f(D a )=a*D a +b
[0102] Where a is the linear slope and b is the intercept on the Y axis. If a>1, the contrast of the image output at this time is enhanced compared with the contrast of the vehicle multi-angle picture set. If a<1, the contrast of the image output at this time is weakened compared with the contrast of the vehicle multi-angle picture set. Where D a Represents the grayscale value of the vehicle multi-angle image set, D b Represents the output image grayscale value.
[0103] Preferably, the histogram equalization operation of the present invention includes: pre-constructing a preset grayscale probability density function and a grayscale monotonically increasing function according to the vehicle multi-angle picture set, determining a discrete transformation function based on the grayscale monotonically increasing function and the probability density function, solving the function value of the discrete transformation function, and replacing the grayscale of the vehicle multi-angle picture set with the function value to obtain the standard vehicle picture set.
[0104] Furthermore, the grayscale monotonically increasing function is:
[0105]
[0106] Among them, T r is the grayscale monotonically increasing function, n is the grayscale interval of the vehicle multi-angle picture set, p r is the probability density function, r is the grayscale of the vehicle multi-angle picture set. The probability density function can adopt a Gaussian distribution function.
[0107] The probability density function may adopt a normal distribution function.
[0108] The discrete transformation function is:
[0109]
[0110] Among them, S k is the discrete transformation function, k is the grayscale division level, r krepresents the estimated grayscale number divided according to the grayscale division level. For example, the grayscale division level is divided into ten levels, distributed as [0,20], [20,40], ..., [230,255].
[0111] Step 3: Extract corner point features of the standard vehicle image set according to a multi-corner point feature extraction method to obtain a vehicle feature data set.
[0112] Preferably, the method of extracting features of the standard vehicle picture set according to a multi-corner feature extraction method to obtain a vehicle feature data set includes: presetting target position coordinates of the standard vehicle picture set; obtaining a coordinate set of the standard vehicle picture set according to the target position coordinates; solving the sum of squared errors of the standard vehicle picture set according to the coordinate set, obtaining multi-corner features according to the sum of squared errors, and aggregating the multi-corner features to obtain a vehicle feature data set.
[0113] Furthermore, the target position coordinates of the preset standard vehicle picture set may be selected from the center of each vehicle picture in the standard vehicle picture set or the lower left corner of the picture, and are represented by (x0, y0).
[0114] The error sum of squares is:
[0115]
[0116] Among them, E (x,y) is the error sum of squares, (x, y) is the coordinate of each pixel in the standard vehicle image set, ω x,y is the coordinate window value, is the pixel grayscale value of the target position coordinates, is the pixel grayscale value of each pixel based on the target position coordinates.
[0117] Furthermore, the It can be transformed into:
[0118]
[0119] Among them, O(x 2 ) is the offset value of the multi-corner feature in the x-axis direction, O(y 2 ) is the offset value of the multi-corner feature in the y-axis direction.
[0120] Step 4: Perform feature diagnosis on the vehicle feature data set based on convolution operation and pooling operation and output the diagnosis result.
[0121] The convolution operation and pooling operation include pre-building a convolution template and determining a convolution step length, and calculating the convolution template and the vehicle feature data set according to the convolution step length to obtain a convolution matrix set after the convolution operation, thereby completing the convolution operation. The maximum value or average value of the matrix in the convolution matrix set is selected to replace the convolution matrix set, thereby completing the pooling operation and obtaining a diagnosis result.
[0122] Furthermore, the pre-built convolution template may be a standard 3*3 matrix, such as The calculation method of the matrix after the convolution operation is to use a convolution amplitude of 1 from left to right. For example, the feature matrix of the vehicle feature data set with a feature of 9*9 is: Then the pre-built convolution template First with The calculation method is: multiply the corresponding dimensions such as 1*0, 0*3, 1*1, and the final result is: By analogy, the pre-built convolution template According to the convolution amplitude of 1, continue to move one step to the right and the matrix is: the pre-built convolution template Perform the above operations to obtain the pre-built convolution template It can be seen that when the convolution operation is completed, a large number of small-dimensional matrices can be generated, as shown above and Therefore, the pooling operation is to reduce the dimensions of a large number of small-dimensional matrices produced by the convolution operation. Preferably, the maximization principle can be adopted, such as and The largest values 3 and 7 are used instead to complete the pooling operation.
[0123] Preferably, the above convolution operation and pooling operation are performed repeatedly, such as performing the convolution and pooling operation 16 times to obtain the final feature optimization set.
[0124] Preferably, an activation operation is used to perform probability diagnosis on the feature optimization set through a softmax function, and the diagnosis result with the highest probability is selected as the final diagnosis result and output. The softmax function is:
[0125]
[0126] Among them, p(car) represents the output probability that the vehicle is a car, k represents the data volume of the feature optimization set, e is an infinite non-repeating decimal, and j represents the number of selectable diagnosis results. For example, when the vehicle is resold as a used car, when car = 9.5% new, p(car = 9.5% new) is calculated to be 0.87, and when word = 7.5, p(word = 7.5) is calculated to be 0.24, so the vehicle represents a 9.5% new vehicle.
[0127] Optionally, in other embodiments, the vehicle appearance intelligent diagnosis program can also be divided into one or more modules, one or more modules are stored in the memory 11, and are executed by one or more processors (processor 12 in this embodiment) to complete the present invention. The module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions, and is used to describe the execution process of the vehicle appearance intelligent diagnosis program in the vehicle appearance intelligent diagnosis device.
[0128] For example, refer to Figure 3 FIG. 1 is a schematic diagram of a program module of a vehicle appearance intelligent diagnosis program in an embodiment of a vehicle appearance intelligent diagnosis device of the present invention. In this embodiment, the vehicle appearance intelligent diagnosis program can be divided into a data receiving and two-dimensional code generating module 10, a data preprocessing module 20, a corner feature extraction module 30, and a vehicle appearance diagnosis output module 40. Exemplarily:
[0129] The data receiving and QR code generating module 10 is used to: receive a vehicle appearance diagnosis request from a user, generate a QR code image according to the vehicle appearance diagnosis request, and feed the QR code image back to the user;
[0130] The data preprocessing module 20 is used to receive a vehicle multi-angle picture set uploaded by a user according to the QR code picture, and process the vehicle multi-angle picture set based on contrast enhancement and histogram equalization operations to obtain a standard vehicle picture set.
[0131] The corner feature extraction module 30 is used to extract the features of the standard vehicle picture set according to a multi-corner feature extraction method to obtain a vehicle feature data set.
[0132] The automobile appearance diagnosis output 40 is used to perform feature diagnosis on the vehicle feature data set based on convolution operations and pooling operations and output the diagnosis result.
[0133] The functions or operation steps implemented when the above-mentioned data receiving and QR code generating module 10, data preprocessing module 20, corner feature extraction module 30, automobile appearance diagnosis output module 40 and other program modules are executed are substantially the same as those in the above-mentioned embodiments and will not be repeated here.
[0134] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a vehicle appearance intelligent diagnosis program is stored. The vehicle appearance intelligent diagnosis program can be executed by one or more processors to implement the following operations:
[0135] Receive a vehicle appearance diagnosis request from a user, generate a QR code image according to the vehicle appearance diagnosis request, and feed the QR code image back to the user;
[0136] Receiving a vehicle multi-angle picture set uploaded by a user according to the QR code picture, and processing the vehicle multi-angle picture set based on contrast enhancement and histogram equalization operations to obtain a standard vehicle picture set;
[0137] Extracting features of the standard vehicle image set according to a multi-corner feature extraction method to obtain a vehicle feature data set;
[0138] Based on convolution operation and pooling operation, feature diagnosis is performed on the vehicle feature data set and the diagnosis result is output.
[0139] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0141] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A vehicle appearance intelligent diagnosis method, characterized in that: The method comprises: Receive a vehicle appearance diagnosis request from a user, generate a QR code image according to the vehicle appearance diagnosis request, and feed the QR code image back to the user; Receiving a vehicle multi-angle picture set uploaded by a user according to the QR code picture, and processing the vehicle multi-angle picture set based on contrast enhancement and histogram equalization operations to obtain a standard vehicle picture set; Extracting features of the standard vehicle picture set according to a multi-corner feature extraction method to obtain a vehicle feature data set, including: presetting target position coordinates of the standard vehicle picture set, obtaining a coordinate set of the standard vehicle picture set according to the target position coordinates, solving the error sum of the standard vehicle picture set according to the coordinate set, obtaining multi-corner features according to the error sum of the squares, and collecting the multi-corner features to obtain the vehicle feature data set, wherein the target position coordinates are the coordinates of the center of each vehicle picture in the standard vehicle picture set or the coordinates of the lower left corner of the picture; Based on the convolution operation and the pooling operation, the vehicle feature data set is subjected to feature diagnosis and the diagnosis result is output, including: pre-building a convolution template and determining the convolution step length, calculating the convolution template and the vehicle feature data set according to the convolution step length to obtain a convolution matrix set after the convolution operation, selecting the maximum value or the average value of the matrix in the convolution matrix set to replace the convolution matrix set, and completing the pooling operation to obtain the diagnosis result.
2. The vehicle appearance intelligent diagnosis method according to claim 1, characterized in that: The generating a QR code image according to the vehicle appearance intelligent diagnosis request includes: Inputting the vehicle appearance intelligent diagnosis request into a pre-built QR code generation program; Based on the vehicle appearance intelligent diagnosis request, the QR code generation program runs a QR code toolkit to generate a QR code width and height and QR code encoding content; The two-dimensional code image is obtained according to the width and height of the two-dimensional code and the two-dimensional code encoding.
3. The vehicle appearance intelligent diagnosis method according to claim 1 or 2, characterized in that: The histogram equalization operation includes: Pre-constructing a probability density function and a grayscale monotonically increasing function according to the vehicle multi-angle picture set; Determine a discrete transformation function based on the grayscale monotonically increasing function and the probability density function; The function value of the discrete transformation function is solved, and the grayscale value of the vehicle multi-angle picture set is replaced by the function value to obtain the standard vehicle picture set.
4. The vehicle appearance intelligent diagnosis method according to claim 1, characterized in that: The calculation method of the error sum of squares includes: in, is the error sum of squares, is the coordinate of each pixel in the standard vehicle image set, is the coordinate window value, is the pixel grayscale value of the target position coordinates, is the pixel grayscale value of each pixel based on the target position coordinates.
5. A vehicle appearance intelligent diagnosis device, characterized in that: The device includes a memory and a processor, wherein the memory stores a vehicle appearance intelligent diagnosis program that can be run on the processor, and when the vehicle appearance intelligent diagnosis program is executed by the processor, the following steps are implemented: Receive a vehicle appearance diagnosis request from a user, generate a QR code image according to the vehicle appearance diagnosis request, and feed the QR code image back to the user; Receiving a vehicle multi-angle picture set uploaded by a user according to the QR code picture, and processing the vehicle multi-angle picture set based on contrast enhancement and histogram equalization operations to obtain a standard vehicle picture set; Extracting features of the standard vehicle picture set according to a multi-corner feature extraction method to obtain a vehicle feature data set, including: presetting target position coordinates of the standard vehicle picture set, obtaining a coordinate set of the standard vehicle picture set according to the target position coordinates, solving the error sum of the standard vehicle picture set according to the coordinate set, obtaining multi-corner features according to the error sum of the squares, and collecting the multi-corner features to obtain the vehicle feature data set, wherein the target position coordinates are the coordinates of the center of each vehicle picture in the standard vehicle picture set or the coordinates of the lower left corner of the picture; Based on the convolution operation and the pooling operation, the vehicle feature data set is subjected to feature diagnosis and the diagnosis result is output, including: pre-building a convolution template and determining the convolution step length, calculating the convolution template and the vehicle feature data set according to the convolution step length to obtain a convolution matrix set after the convolution operation, selecting the maximum value or the average value of the matrix in the convolution matrix set to replace the convolution matrix set, and completing the pooling operation to obtain the diagnosis result.
6. The vehicle appearance intelligent diagnosis device according to claim 5, characterized in that: The generating a QR code image according to the vehicle appearance intelligent diagnosis request includes: Inputting the vehicle appearance intelligent diagnosis request into a pre-built QR code generation program; Based on the vehicle appearance intelligent diagnosis request, the QR code generation program runs a QR code toolkit to generate a QR code width and height and QR code encoding content; The two-dimensional code image is obtained according to the width and height of the two-dimensional code and the two-dimensional code encoding.
7. The vehicle appearance intelligent diagnosis device according to claim 5 or 6, characterized in that: The histogram equalization operation includes: Pre-constructing a probability density function and a grayscale monotonically increasing function according to the vehicle multi-angle picture set; Determine a discrete transformation function based on the grayscale monotonically increasing function and the probability density function; The function value of the discrete transformation function is solved, and the grayscale value of the vehicle multi-angle picture set is replaced by the function value to obtain the standard vehicle picture set.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a vehicle appearance intelligent diagnosis program, which can be executed by one or more processors to implement the steps of the vehicle appearance intelligent diagnosis method as described in any one of claims 1 to 4.
