Quality inspection scene recognition method, device, computer equipment and readable storage medium

By performing object detection model analysis on the quality inspection images, the probability of refueling and oil discharge scenarios is calculated, and the problem of time-consuming and labor-consuming manual review is solved, achieving efficient and accurate quality inspection scenario recognition.

CN112036312BActive Publication Date: 2025-01-10CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010899535.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-31
Publication Date
2025-01-10
Estimated Expiration
2040-08-31

AI Technical Summary

Technical Problem

In auto insurance quality inspection, manual review of quality inspection images is time-consuming and labor-intensive and has low efficiency.

Method used

By acquiring the quality inspection image and inputting it into the trained target detection model for analysis, the confidence of the targets related to the quality inspection scenario is obtained, the probability of the fueling scene and the oiling scene is calculated, and the quality inspection scene corresponding to the quality inspection image is determined. .

Benefits of technology

It significantly improves the efficiency and accuracy of quality inspection scenario recognition, and achieves convenient, efficient and fast quality inspection scenario recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112036312B_ABST
    Figure CN112036312B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of intelligent decision-making technology, and provides a quality inspection scene recognition method, device, computer equipment and readable storage medium, the method comprising: obtaining a quality inspection image, inputting the quality inspection image into a trained target detection model for analysis, and obtaining the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model; according to the confidence of the target related to the quality inspection scene, respectively determining the probability that the quality inspection image belongs to a refueling scene and the probability that it belongs to an oil discharge scene; according to the probability that the quality inspection image belongs to a refueling scene and the probability that it belongs to an oil discharge scene, determining the quality inspection scene corresponding to the quality inspection image. The present application can realize convenient, efficient, fast and accurate quality inspection scene recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent decision-making technology, and in particular to a quality inspection scene recognition method, device, computer equipment and readable storage medium. Background Art

[0002] At present, in the quality inspection of auto insurance, it is necessary to manually review the quality inspection images to determine the quality inspection scene corresponding to the quality inspection images, that is, to manually observe with the naked eye whether the vehicle in the quality inspection image is in the state of refueling or draining oil. However, the manual review method is time-consuming and labor-intensive, and has low efficiency. Summary of the invention

[0003] The main purpose of this application is to provide a quality inspection scene recognition method, device, computer equipment and computer-readable storage medium, aiming to solve the technical problems of traditional manual review of quality inspection images, which is time-consuming, labor-intensive and inefficient.

[0004] In a first aspect, the present application provides a quality inspection scene recognition method, the method comprising:

[0005] Acquire a quality inspection image, input the quality inspection image into a trained target detection model for analysis, and obtain the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model;

[0006] According to the confidence of the target related to the quality inspection scene, respectively determining the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil discharge scene;

[0007] The quality inspection scene corresponding to the quality inspection image is determined according to the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil draining scene.

[0008] In a second aspect, the present application further provides a quality inspection scene recognition device, the device comprising:

[0009] An analysis module is used to obtain a quality inspection image, input the quality inspection image into a trained target detection model for analysis, and obtain the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model;

[0010] A first determination module, configured to determine the probability that the quality inspection image belongs to a refueling scene and the probability that the quality inspection image belongs to a fueling scene according to the confidence of the target related to the quality inspection scene;

[0011] The second determination module is used to determine the quality inspection scene corresponding to the quality inspection image according to the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil discharge scene.

[0012] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the quality inspection scene recognition method as described above are implemented.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the quality inspection scene recognition method as described above is implemented.

[0014] The present application discloses a quality inspection scene recognition method, device, computer equipment and readable storage medium. First, a quality inspection image is acquired, and then the quality inspection image is input into a trained target detection model for analysis to obtain the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model; then, according to the confidence of the target related to the quality inspection scene, the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil discharge scene are determined respectively; then, according to the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil discharge scene, the quality inspection scene corresponding to the quality inspection image can be determined. Compared with the method of manually identifying quality inspection scenes with the naked eye, analyzing quality inspection images based on a trained detection model can not only significantly improve recognition efficiency, but also ensure recognition accuracy, thereby achieving convenient, efficient, fast and accurate quality inspection scene recognition.

[0015] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 A flowchart of a quality inspection scene recognition method provided in an embodiment of the present application;

[0018] Figure 2 This is an example diagram of scenarios that need to be distinguished during the quality inspection of automobile insurance involved in the embodiments of the present application;

[0019] Figure 3 This is a schematic diagram of the network structure of Darknet-53 involved in the embodiment of the present application;

[0020] Figure 4 The four-dimensional prediction frame value (t x, t y , t w , t h ) is decoded to obtain the center point coordinates of the prediction box (b x , b y ) and width and height (bw, bh);

[0021] Figure 5 A schematic block diagram of a quality inspection scene recognition device provided in an embodiment of the present application;

[0022] Figure 6 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application.

[0023] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0025] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0026] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0027] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0028] The embodiments of the present application provide a quality inspection scene recognition method, apparatus, device and computer-readable storage medium. The quality inspection scene recognition method is mainly applied to a quality inspection scene recognition device, which can be a personal computer (PC), server or other device with data processing function.

[0029] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0030] Please refer to Figure 1 , Figure 1 A flowchart of a quality inspection scene recognition method provided in an embodiment of the present application.

[0031] like Figure 1 As shown, the quality inspection scene recognition method includes steps S101 to S103.

[0032] Step S101, obtaining a quality inspection image, inputting the quality inspection image into a trained target detection model for analysis, and obtaining the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model;

[0033] The application scenario of the quality inspection scene recognition method is automobile insurance quality inspection. First, a quality inspection image is obtained, which is obtained by preprocessing the original quality inspection image.

[0034] In one embodiment, before step S101, the steps include: acquiring an original quality inspection image; and preprocessing the original quality inspection image to obtain a quality inspection image.

[0035] The original quality inspection image is taken on-site by the auto insurance quality inspector or by the automobile 4S shop and uploaded to the quality inspection scene recognition device. Considering that the original quality inspection image may be affected by the shooting tool itself and / or external environment interference, resulting in poor quality of the original quality inspection image, the quality inspection image needs to be pre-processed to obtain the quality inspection image, and then the quality inspection scene is recognized based on the quality inspection image to improve the recognition accuracy.

[0036] In one embodiment, the preprocessing of the original quality inspection image to obtain the quality inspection image is specifically: performing histogram equalization processing on the original quality inspection image; and performing logarithmic transformation processing on the original quality inspection image after the histogram equalization processing to obtain the quality inspection image.

[0037] That is, the original quality inspection image is processed with histogram equalization and logarithmic transformation in sequence to enhance the overall contrast of the original quality inspection image while enhancing the dark details of the original quality inspection image. The image obtained after the histogram equalization and logarithmic transformation is defined as the quality inspection image. The subsequent analysis of the quality inspection image can further improve the accuracy of target detection contained in the quality inspection image.

[0038] After the quality inspection scene recognition device obtains the quality inspection image, it inputs the quality inspection image into the trained target detection model for analysis to obtain the confidence of the target related to the motor vehicle insurance quality inspection scene in the quality inspection image output by the trained target detection model, where the confidence of the target refers to the probability of what kind of object the target belongs to.

[0039] It should be noted that if Figure 2 As shown in the figure, there are two types of scenes that need to be distinguished during the quality inspection of auto insurance: refueling scenes and oil discharge scenes. Among them, the quality inspection image belonging to the refueling scene includes three targets: vehicles, oil bottles, and people holding oil bottles to refuel, and the quality inspection image belonging to the oil discharge scene includes three targets: vehicles, oil barrels, and oil pipes. That is, the targets related to the quality inspection scene of auto insurance include five objects: vehicles, oil bottles, people refueling, oil barrels, and oil pipes. The trained target detection model can specifically be a trained convolutional neural network yolov3 model. The task of the trained yolov3 model is to identify targets related to the quality inspection scene of auto insurance in the quality inspection image, and to detect the probability of what kind of object the targets related to the quality inspection scene of auto insurance in the quality inspection image belong to.

[0040] It is understandable that if there is no oil bottle in the quality inspection image, after the quality inspection image is input into the trained object detection model for analysis, the trained object detection model outputs a result that the confidence of the oil bottle is 0.

[0041] Step S102, determining the probability that the quality inspection image belongs to a refueling scene and the probability that the quality inspection image belongs to a fueling scene according to the confidence of the target related to the quality inspection scene.

[0042] After obtaining the confidence of the target related to the auto insurance quality inspection scenario in the quality inspection image output by the target detection model, the probability of which quality inspection scenario the quality inspection image belongs to is determined according to the confidence of the target related to the auto insurance quality inspection scenario.

[0043] In one embodiment, the confidence of the target related to the quality inspection scene includes the confidence of the target related to the refueling scene and the confidence of the target related to the oil discharge scene. According to the confidence of the target related to the quality inspection scene, the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil discharge scene are determined respectively, specifically: obtaining a preset refueling scene probability calculation formula P1=λ1p1+λ2p2+λ3p3 and an oil discharge scene probability calculation formula P2=λ1p1+λ4p4+λ5p5; respectively substituting the confidence of the target related to the refueling scene into the refueling scene probability calculation formula to calculate the probability that the quality inspection image belongs to the refueling scene Probability, the confidence of the target related to the oil release scene is substituted into the oil release scene probability calculation formula to calculate the probability that the quality inspection image belongs to the oil release scene, wherein P1 represents the probability that the quality inspection image belongs to the refueling scene, P2 represents the probability that the quality inspection image belongs to the oil release scene, p1, p2 and p3 represent the confidence of the target related to the refueling scene, p1, p4 and p5 represent the confidence of the target related to the oil release scene, λ1, λ2 and λ3 represent the weights corresponding to the confidence of the target related to the refueling scene, λ1, λ4 and λ5 represent the weights corresponding to the confidence of the target related to the oil release scene, and λ1+λ2+λ3+λ4+λ5=1.

[0044] That is, the quality inspection scene recognition device pre-stores a formula for calculating the probability that the quality inspection image belongs to a certain quality inspection scene, as follows:

[0045] Refueling scenario probability calculation formula P1 = λ1p1 + λ2p2 + λ3p3

[0046] Oil release scenario probability calculation formula P2 = λ1p1 + λ4p4 + λ5p5

[0047] Among them, p1 represents the confidence of the vehicle in the quality inspection image, p2 represents the confidence of the oil bottle in the quality inspection image, p3 represents the confidence of the person refueling in the quality inspection image, p4 represents the confidence of the oil drum in the quality inspection image, and p5 represents the confidence of the oil pipe in the quality inspection image; λ1 represents the weight corresponding to the confidence of the vehicle in the quality inspection image, λ2 represents the weight corresponding to the confidence of the oil bottle in the quality inspection image, λ3 represents the weight corresponding to the confidence of the person refueling in the quality inspection image, λ4 represents the weight corresponding to the confidence of the oil drum in the quality inspection image, and λ5 represents the weight corresponding to the confidence of the oil pipe in the quality inspection image, and λ1, λ2, λ3, λ4 and λ5 satisfy λ1+λ2+λ3+λ4+λ5=1.

[0048] Obtain the above formula, substitute the confidence of the targets related to the refueling scene (vehicles, oil bottles and people holding oil bottles to refuel) into the refueling scene probability calculation formula to calculate the probability that the quality inspection image belongs to the refueling scene, and substitute the confidence of the targets related to the oil discharge scene (vehicles, oil barrels and oil pipes) into the oil discharge scene probability calculation formula to calculate the probability that the quality inspection image belongs to the oil discharge scene.

[0049] Step S103: determining the quality inspection scene corresponding to the quality inspection image according to the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil draining scene.

[0050] After calculating the probabilities that the quality inspection image belongs to the refueling scene and the probabilities that the quality inspection image belongs to the oil draining scene, it can be determined which quality inspection scene the quality inspection image belongs to based on the probabilities that the quality inspection image belongs to the refueling scene and the probabilities that the quality inspection image belongs to the oil draining scene.

[0051] In one embodiment, the quality inspection scene corresponding to the quality inspection image is determined according to the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil draining scene, specifically: the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil draining scene are compared; if the probability that the quality inspection image belongs to the refueling scene is greater than the probability that it belongs to the oil draining scene, then the quality inspection scene corresponding to the quality inspection image is determined to be the refueling scene; if the probability that the quality inspection image belongs to the oil draining scene is greater than the probability that it belongs to the refueling scene, then the quality inspection scene corresponding to the quality inspection image is determined to be the oil draining scene.

[0052] That is, the probability that the quality inspection image belongs to the refueling scene is compared with the probability that the quality inspection image belongs to the oil draining scene. If the probability that the quality inspection image belongs to the refueling scene is greater than the probability that the quality inspection image belongs to the oil draining scene, it can be determined that the quality inspection image belongs to the refueling scene. If the probability that the quality inspection image belongs to the oil draining scene is greater than the probability that the quality inspection image belongs to the refueling scene, it can be determined that the quality inspection image belongs to the oil draining scene.

[0053] In one embodiment, before step S101, it includes: obtaining a sample set for training a target detection model, and creating a convolutional neural network yolov3 model;

[0054] The yolov3 model created by training the sample set is used to obtain a trained yolov3 model as a trained target detection model.

[0055] That is, before step S101, it is necessary to pre-train an object detection model for detecting the confidence of objects related to the vehicle insurance quality inspection scenario in the quality inspection image.

[0056] First, a large number of sample quality inspection images containing targets related to the auto insurance quality inspection scene (vehicles, oil bottles, people refueling, oil barrels and oil pipes) are collected to build a sample set, and then the Yolov3 model is created. The Yolov3 model is a convolutional neural network model. Yolov3 uses Darknet-53 as the classification backbone of the entire network. The Darknet-53 network structure is as follows Figure 3 As shown. Then, the yolov3 model created by training the sample set is obtained to obtain the trained yolov3 model as the trained target detection model.

[0057] In one embodiment, the yolov3 model created according to the sample set training is used to obtain a trained yolov3 model, specifically: initializing the parameters of the created yolov3 model; loading the sample set into the created yolov3 model for training, calculating the loss function to update the parameters, until the loss function converges, and obtaining the trained yolov3 model.

[0058] When training the yolov3 model, first initialize the model parameters, including weight values ​​and bias values, and then input the sample quality inspection images in the sample set into the yolov3 model. The input sample quality inspection images pass through Darknet-53 and then through Yoloblock to output three feature maps of different scales. The dimension of each feature map is N*N*[3*(4+1+5)], where N*N is the number of grids in the feature map, 3 means that the feature map has 3 anchor boxes, and each anchor box includes a 4-dimensional prediction box value (t x , t y , t w , t h ), 1D prediction box confidence, 5 types of object categories (vehicles, oil bottles, refueling people, oil barrels and oil pipes), the size of the tensor can be changed by changing the convolution kernel step size in the forward propagation; decode the feature map, and the 4D prediction box value (t x , t y , t w , t h ) After decoding as follows, the center point coordinates of the predicted box are obtained (b x , b y ) and width and height (bw, bh), such as Figure 4 As shown:

[0059] b x =σ(t x )+c x

[0060] b y =σ(t y )+cy

[0061] b w =P w e tw b x =σ(t x )+c x

[0062] b h =P h e th

[0063] Among them, σ(t x ),σ(t y ) is the offset of the coordinates of the upper left corner of the rectangular box center, σ is the activation function, P w , P h is the width and height of the prior box.

[0064] After that, each category is independently classified into two categories through logistic regression, and the loss is calculated using cross entropy. Let the loss function be:

[0065]

[0066] in, It means that for the j-th prediction box at the i-th grid point (each ground truth corresponds to only one prediction box), if there is a corresponding ground truth assigned, it returns 1, otherwise it returns 0; conversely, for the j-th prediction box at the i-th grid point, if there is a corresponding ground truth assigned, it returns 0, otherwise it returns 1.

[0067] According to the loss function, the stochastic gradient descent method is used to update the parameters. When the value of the loss function is less than the preset threshold, the loss function converges, indicating that the target parameters of the yolov3 model are obtained, the yolov3 model training is completed, and the trained yolov3 model is obtained as the trained target detection model. Analyzing the quality inspection images based on the trained detection model is not only fast, convenient and efficient, but also can significantly improve the recognition accuracy of the quality inspection scene.

[0068] The quality inspection scene recognition method provided in the above embodiment first obtains a quality inspection image, then inputs the quality inspection image into a trained target detection model for analysis, and obtains the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model; then, based on the confidence of the target related to the quality inspection scene, the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil discharge scene are determined respectively; then, based on the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil discharge scene, the quality inspection scene corresponding to the quality inspection image can be determined. Compared with the method of manually identifying quality inspection scenes with the naked eye, analyzing quality inspection images based on a trained detection model can not only significantly improve recognition efficiency, but also ensure recognition accuracy, thereby achieving convenient, efficient, fast, and accurate quality inspection scene recognition.

[0069] Please refer to Figure 5 , Figure 5 A schematic block diagram of a quality inspection scene recognition device provided in an embodiment of the present application.

[0070] like Figure 5 As shown, the quality inspection scene recognition device 400 includes: an analysis module 401 , a first determination module 402 and a second determination module 403 .

[0071] The analysis module 401 is used to obtain a quality inspection image, input the quality inspection image into a trained target detection model for analysis, and obtain the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model;

[0072] A first determination module 402, configured to determine the probability that the quality inspection image belongs to a refueling scene and the probability that the quality inspection image belongs to a fueling scene according to the confidence of the target related to the quality inspection scene;

[0073] The second determination module 403 is used to determine the quality inspection scene corresponding to the quality inspection image according to the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil discharge scene.

[0074] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described device and each module and unit can refer to the corresponding process in the aforementioned quality inspection scene recognition method embodiment, and will not be repeated here.

[0075] The apparatus provided in the above embodiment may be implemented in the form of a computer program. The computer program may be Figure 6 Runs on the computer device shown.

[0076] See also Figure 6 , Figure 6A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a device with data processing function such as a personal computer (PC) or a server.

[0077] like Figure 6 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0078] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any quality inspection scene recognition method.

[0079] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0080] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any quality inspection scene recognition method.

[0081] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0082] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0083] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0084] Acquire a quality inspection image, input the quality inspection image into a trained target detection model for analysis, and obtain the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model; determine the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil draining scene according to the confidence of the target related to the quality inspection scene; determine the quality inspection scene corresponding to the quality inspection image according to the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil draining scene.

[0085] In some embodiments, the confidence of the target related to the quality inspection scene includes the confidence of the target related to the refueling scene and the confidence of the target related to the oil discharge scene, and the processor implements the determination of the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil discharge scene according to the confidence of the target related to the quality inspection scene, including:

[0086] Obtain the preset refueling scenario probability calculation formula P1=λ1p1+λ2p2+λ3p3 and the oil discharge scenario probability calculation formula P2=λ1p1+λ4p4+λ5p5;

[0087] Substitute the confidence of the target related to the refueling scene into the refueling scene probability calculation formula to calculate the probability that the quality inspection image belongs to the refueling scene, and substitute the confidence of the target related to the oil discharge scene into the oil discharge scene probability calculation formula to calculate the probability that the quality inspection image belongs to the oil discharge scene, wherein,

[0088] P1 represents the probability that the quality inspection image belongs to the refueling scene, P2 represents the probability that the quality inspection image belongs to the oil releasing scene, p1, p2 and p3 represent the confidence of the targets related to the refueling scene, p1, p4 and p5 represent the confidence of the targets related to the oil releasing scene, λ1, λ2 and λ3 represent the weights corresponding to the confidence of the targets related to the refueling scene, λ1, λ4 and λ5 represent the weights corresponding to the confidence of the targets related to the oil releasing scene, and λ1+λ2+λ3+λ4+λ5=1.

[0089] In some embodiments, the processor implements determining the quality inspection scene corresponding to the quality inspection image according to the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil discharge scene, including:

[0090] Comparing the probability that the quality inspection image belongs to a refueling scene and the probability that the quality inspection image belongs to a fueling scene;

[0091] If the probability that the quality inspection image belongs to the refueling scene is greater than the probability that it belongs to the oil draining scene, determining that the quality inspection scene corresponding to the quality inspection image is the refueling scene;

[0092] If the probability that the quality inspection image belongs to the oil discharge scene is greater than the probability that the quality inspection image belongs to the refueling scene, it is determined that the quality inspection scene corresponding to the quality inspection image is the oil discharge scene.

[0093] In some embodiments, the processor implements the acquisition of the quality inspection image, inputs the quality inspection image into a trained target detection model for analysis, and obtains the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model, and implements the following steps before:

[0094] Get the sample set for training the target detection model and create a convolutional neural network yolov3 model;

[0095] The yolov3 model created by training the sample set is used to obtain a trained yolov3 model as a trained target detection model.

[0096] In some embodiments, the processor implements the YOLOv3 model created by training the sample set to obtain a trained YOLOv3 model as a trained target detection model, including:

[0097] Initialize the parameters of the created yolov3 model;

[0098] The sample set is loaded into the created yolov3 model for training, and the loss function is calculated to update the parameters until the loss function converges to obtain a trained yolov3 model.

[0099] In some embodiments, the processor implements the acquisition of the quality inspection image, inputs the quality inspection image into a trained target detection model for analysis, and obtains the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model, and implements the following steps before:

[0100] Get the original quality inspection image;

[0101] The original quality inspection image is preprocessed to obtain a quality inspection image.

[0102] In some embodiments, the processor implements the preprocessing of the original quality inspection image to obtain the quality inspection image, including:

[0103] Performing histogram equalization processing on the original quality inspection image;

[0104] The original quality inspection image after histogram equalization processing is logarithmically transformed to obtain a quality inspection image.

[0105] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the quality inspection scene recognition method of the present application.

[0106] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0107] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0108] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0109] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0110] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A quality inspection scene recognition method, characterized in that: The quality inspection scene recognition method comprises the following steps: Acquire a quality inspection image, input the quality inspection image into a trained target detection model for analysis, and obtain the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model; According to the confidence of the target related to the quality inspection scene, the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil discharge scene are determined respectively; wherein the confidence of the target related to the quality inspection scene includes the confidence of the target related to the refueling scene and the confidence of the target related to the oil discharge scene; the method comprises: obtaining a preset refueling scene probability calculation formula P1=λ1p1+λ2p 2+ λ3p3 and oil release scenario probability calculation formula P2=λ1p1+λ4p 4+ λ5p5; respectively substitute the confidence of the target related to the refueling scene into the refueling scene probability calculation formula to calculate the probability that the quality inspection image belongs to the refueling scene, and substitute the confidence of the target related to the oil discharge scene into the oil discharge scene probability calculation formula to calculate the probability that the quality inspection image belongs to the oil discharge scene, wherein P1 represents the probability that the quality inspection image belongs to the refueling scene, P2 represents the probability that the quality inspection image belongs to the oil discharge scene, p1, p2 and p3 represent the confidence of the target related to the refueling scene, p1, p4 and p5 represents the confidence of the target related to the oil discharge scene, λ1, λ2 and λ3 represent the weights corresponding to the confidence of the target related to the refueling scene, λ1, λ4 and λ5 represent the weights corresponding to the confidence of the target related to the oil discharge scene, and λ1+λ2+λ3+λ4+λ5=1; wherein p1 represents the confidence of the vehicle in the quality inspection image, p2 represents the confidence of the oil bottle in the quality inspection image, p3 represents the confidence of the person refueling in the quality inspection image, p4 represents the confidence of the oil barrel in the quality inspection image, and p5 represents the confidence of the oil pipe in the quality inspection image; The quality inspection scene corresponding to the quality inspection image is determined according to the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil draining scene.

2. The quality inspection scene recognition method according to claim 1, characterized in that: The determining, according to the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil discharge scene, the quality inspection scene corresponding to the quality inspection image includes: Comparing the probability that the quality inspection image belongs to a refueling scene and the probability that the quality inspection image belongs to a fueling scene; If the probability that the quality inspection image belongs to the refueling scene is greater than the probability that it belongs to the oil draining scene, determining that the quality inspection scene corresponding to the quality inspection image is the refueling scene; If the probability that the quality inspection image belongs to the oil discharge scene is greater than the probability that the quality inspection image belongs to the refueling scene, it is determined that the quality inspection scene corresponding to the quality inspection image is the oil discharge scene.

3. The quality inspection scene recognition method according to claim 1, characterized in that: The step of acquiring the quality inspection image, inputting the quality inspection image into a trained target detection model for analysis, and obtaining the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model includes: Get the sample set for training the target detection model and create a convolutional neural network yolov3 model; The yolov3 model created by training the sample set is used to obtain a trained yolov3 model as a trained target detection model.

4. The quality inspection scene recognition method according to claim 3, characterized in that: The yolov3 model created by training the sample set, obtaining a trained yolov3 model, comprises: Initialize the parameters of the created yolov3 model; The sample set is loaded into the created yolov3 model for training, and the loss function is calculated to update the parameters until the loss function converges to obtain a trained yolov3 model.

5. The quality inspection scene recognition method according to claim 1, characterized in that: The step of acquiring the quality inspection image, inputting the quality inspection image into a trained target detection model for analysis, and obtaining the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model includes: Obtain original quality inspection images; The original quality inspection image is preprocessed to obtain a quality inspection image.

6. The quality inspection scene recognition method according to claim 5, characterized in that: The preprocessing of the original quality inspection image to obtain the quality inspection image includes: Performing histogram equalization processing on the original quality inspection image; The original quality inspection image after histogram equalization processing is logarithmically transformed to obtain a quality inspection image.

7. A quality inspection scene recognition device, characterized in that: The quality inspection scene recognition device comprises: An analysis module is used to obtain a quality inspection image, input the quality inspection image into a trained target detection model for analysis, and obtain the confidence of the target related to the quality inspection scene in the quality inspection image output by the target detection model; The first determination module is used to determine the probability that the quality inspection image belongs to the refueling scene and the probability that it belongs to the oil discharge scene according to the confidence of the target related to the quality inspection scene; wherein the confidence of the target related to the quality inspection scene includes the confidence of the target related to the refueling scene and the confidence of the target related to the oil discharge scene; the method includes: obtaining a preset refueling scene probability calculation formula P1=λ1p1+λ2p 2+ λ3p3 and oil release scenario probability calculation formula P2=λ1p1+λ4p 4+ λ5p5; respectively substitute the confidence of the target related to the refueling scene into the refueling scene probability calculation formula to calculate the probability that the quality inspection image belongs to the refueling scene, and substitute the confidence of the target related to the oil discharge scene into the oil discharge scene probability calculation formula to calculate the probability that the quality inspection image belongs to the oil discharge scene, wherein P1 represents the probability that the quality inspection image belongs to the refueling scene, P2 represents the probability that the quality inspection image belongs to the oil discharge scene, p1, p2 and p3 represent the confidence of the target related to the refueling scene, p1, p4 and p5 represents the confidence of the target related to the oil discharge scene, λ1, λ2 and λ3 represent the weights corresponding to the confidence of the target related to the refueling scene, λ1, λ4 and λ5 represent the weights corresponding to the confidence of the target related to the oil discharge scene, and λ1+λ2+λ3+λ4+λ5=1; wherein p1 represents the confidence of the vehicle in the quality inspection image, p2 represents the confidence of the oil bottle in the quality inspection image, p3 represents the confidence of the person refueling in the quality inspection image, p4 represents the confidence of the oil barrel in the quality inspection image, and p5 represents the confidence of the oil pipe in the quality inspection image; The second determination module is used to determine the quality inspection scene corresponding to the quality inspection image according to the probability that the quality inspection image belongs to the refueling scene and the probability that the quality inspection image belongs to the oil discharge scene.

8. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the quality inspection scene recognition method as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the quality inspection scene recognition method according to any one of claims 1 to 6 are implemented.