Training method and device of fuel dispenser obstacle detection model, equipment and medium
Patent Information
- Application Number
- CN202211410695.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2042-11-11
AI Technical Summary
[0004]目前,一般通过雷达对悬挂式加油机前的障碍物进行检测,但是雷达装置的成本较高
Smart Images

Figure CN115909178B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of obstacle detection, and more specifically, to a training method, apparatus, equipment, and medium for an obstacle detection model for a refueling machine. Background Technology
[0002] With the development of the Internet of Things and the transformation of new retail consumption patterns, more and more gas stations are becoming rest stops for people and vehicles, and the ratio of fuel sales to non-fuel sales at gas stations is changing, with non-fuel sales increasing and people spending more time at gas stations. Therefore, building small, suspended fuel dispensers in urban centers is becoming an increasingly common trend.
[0003] Suspended fuel dispensers are traditional fuel dispensers divided into several functional modules, with the dispensing device suspended from the gas station canopy to achieve safe dispensing operations and improve the efficiency and effectiveness of gas stations. While suspended fuel dispensers solve many problems, they also pose some risks during use. For example, moving vehicles and pedestrians may collide with the moving fuel nozzle. Collisions can result in significant property damage and even threaten human life. Therefore, it is necessary to inspect for obstacles in front of suspended fuel dispensers.
[0004] Currently, radar is generally used to detect obstacles in front of suspended refueling aircraft, but radar devices are expensive. With the development of technology, there is a growing desire to use trained models to determine whether obstacles exist in front of suspended refueling aircraft, but there are currently no training methods for such models. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a training method, apparatus, equipment and medium for a fuel dispenser obstacle detection model, which can train the fuel dispenser obstacle detection model.
[0006] In a first aspect, embodiments of this application provide a training method for a fuel dispenser obstacle detection model, the training method comprising:
[0007] Acquire sample images within a preset range in front of the refueling pump and corresponding obstacle presence markers; the obstacle presence markers are used to indicate whether there are obstacles in the sample images.
[0008] The sample images are input into a fuel dispenser obstacle detection model with Leaky ReLU activation function and GoogLeNet network structure to obtain the existence results of obstacles in the sample images and the probability of their existence.
[0009] The accuracy of the obstacle detection model for refueling machines is determined based on the probability of existence and the obstacle presence markers.
[0010] Determine if the accuracy rate is less than the preset value;
[0011] If the accuracy is less than the preset value, the obstacle detection model for the fuel dispenser will be updated based on the obstacle presence markers and obstacle presence results in the sample images. Then, the process will jump to inputting the sample images and obstacle presence markers into the fuel dispenser obstacle detection model with the activation function Leaky ReLU and the network structure GoogLeNet, and continue execution.
[0012] In one possible implementation, the method further includes:
[0013] The presence and absence of obstacles in the sample image are both determined by the first number of obstacles that do not exist.
[0014] The presence of obstacles in the sample image is determined by both the obstacle marker and the presence result, which are the second quantity of obstacles present.
[0015] A third quantity is determined by identifying the presence of obstacles in a sample image as the presence of obstacles and the absence of obstacles as the result of the presence of obstacles;
[0016] The accuracy of the obstacle detection model for the refueling machine is determined based on the first, second, and third quantities.
[0017] In one possible implementation, the accuracy of the refueling machine obstacle detection model is determined based on a first quantity, a second quantity, and a third quantity, including:
[0018] Calculate the sum of the first quantity and the second quantity to obtain the first sum value;
[0019] Calculate the sum of the first quantity, the second quantity, and the third quantity to obtain the second sum value;
[0020] The ratio of the first sum to the second sum is determined as the accuracy of the fuel dispenser obstacle detection model.
[0021] In one possible implementation, the expression for the activation function Leaky ReLU includes:
[0022]
[0023] Where Leaky ReLU(x) is the feature matrix of the sample image after enhancing nonlinear expression, x is the feature matrix of the sample image, and γ is a preset constant.
[0024] In one possible implementation, the training method for the refueling machine obstacle detection model further includes:
[0025] Acquire images of obstacles within a preset range in front of the refueling pump;
[0026] The obstacle detection image is input into the obstacle detection model of the refueling machine to obtain the existence result of the obstacle in the obstacle detection image.
[0027] In one possible implementation, the accuracy of the fuel dispenser obstacle detection model is determined based on the probability of existence and obstacle presence indicators, including:
[0028] The accuracy of the obstacle detection model for fuel dispensers is determined using the following formula;
[0029]
[0030] Where L is the accuracy of the obstacle detection model for the refueling machine, N is the number of sample images, i is an integer from 1 to N, and y i p is an obstacle presence marker for the i-th sample image. i It is the difference between the value 1 and the probability of the existence of the i-th sample image.
[0031] Secondly, embodiments of this application also provide a training device for a fuel dispenser obstacle detection model, the training device comprising:
[0032] The acquisition module is used to acquire sample images within a preset range in front of the fuel dispenser and obstacle presence markers corresponding to the sample images; the obstacle presence markers are used to indicate whether there are obstacles in the sample images.
[0033] The input module is used to input the sample image into a fuel dispenser obstacle detection model with Leaky ReLU activation function and GoogLeNet network structure to obtain the existence result of obstacles in the sample image and the probability of the existence of obstacles.
[0034] The determination module is used to determine the accuracy of the fuel dispenser obstacle detection model based on the existence probability and the obstacle existence identifier;
[0035] The judgment module is used to determine whether the accuracy is less than a preset value; if the accuracy is less than the preset value, the fuel dispenser obstacle detection model is updated according to the obstacle presence markers and obstacle presence results of the sample images, and the process jumps to the fuel dispenser obstacle detection model that inputs the sample images and obstacle presence markers into the activation function Leaky ReLU and adopts the GoogLeNet network structure, and continues to execute.
[0036] In one possible implementation, the device further includes:
[0037] The determination module is also used to determine the first number of obstacles in the sample image where both the obstacle presence marker and the presence result are the absence of obstacles.
[0038] The determination module is also used to determine the obstacle presence markers in the sample image, and the presence result is a second number of obstacles.
[0039] The determination module is also used to determine a third quantity of obstacles in the sample image, which are marked as having obstacles and have results indicating that obstacles do not exist.
[0040] The determination module is also used to determine the accuracy of the obstacle detection model for the refueling machine based on the first quantity, the second quantity, and the third quantity.
[0041] In one possible implementation, a determining module is specifically used to calculate the sum of a first quantity and a second quantity to obtain a first sum value; calculate the sum of the first quantity, the second quantity, and a third quantity to obtain a second sum value; and determine the ratio of the first sum value to the second sum value as the accuracy of the fuel dispenser obstacle detection model.
[0042] In one possible implementation, the acquisition module is further configured to acquire obstacle detection images within a preset range in front of the refueling pump;
[0043] The input module is also used to input the obstacle detection image into the fuel dispenser obstacle detection model to obtain the existence result of the obstacle in the obstacle detection image.
[0044] In one possible implementation, the determining module is specifically used to determine the accuracy of the fuel dispenser obstacle detection model using the following formula; Where L is the accuracy of the obstacle detection model for the refueling machine, N is the number of sample images, i is an integer from 1 to N, and y i p is an obstacle presence marker for the i-th sample image. i It is the difference between the value 1 and the probability of the existence of the i-th sample image.
[0045] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the training method for the obstacle detection model of the refueling machine as described in any of the first aspects.
[0046] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the training method for the obstacle detection model of the refueling machine as described in any of the first aspects.
[0047] This application provides a training method, apparatus, device, and medium for a fuel dispenser obstacle detection model. The training method includes: acquiring sample images within a preset range in front of the fuel dispenser and obstacle presence markers corresponding to the sample images; the obstacle presence markers are used to indicate whether obstacles exist in the sample images; inputting the sample images into a fuel dispenser obstacle detection model with a Leaky ReLU activation function and a GoogLeNet network structure to obtain the obstacle presence result and the obstacle presence probability of the sample images; determining the accuracy of the fuel dispenser obstacle detection model based on the presence probability and the obstacle presence markers; determining whether the accuracy is less than a preset value; if the accuracy is less than the preset value, updating the fuel dispenser obstacle detection model based on the obstacle presence markers and obstacle presence results of the sample images, and jumping to inputting the sample images and obstacle presence markers into the fuel dispenser obstacle detection model with a Leaky ReLU activation function and a GoogLeNet network structure, and continuing execution. This application obtains the existence results and probability of obstacles in the sample images by inputting sample images into the obstacle detection model of the fuel dispenser. Then, based on the existence probability and obstacle presence markers, the accuracy of the obstacle detection model of the fuel dispenser is determined. Finally, the obstacle detection model of the fuel dispenser is updated by judging the magnitude of the accuracy compared with the preset value. Attached Figure Description
[0048] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 A flowchart illustrating a training method for a refueling machine obstacle detection model provided in an embodiment of this application is shown;
[0050] Figure 2 A flowchart illustrating another training method for a refueling machine obstacle detection model provided in an embodiment of this application is shown;
[0051] Figure 3 A flowchart illustrating another training method for a refueling machine obstacle detection model provided in an embodiment of this application is shown;
[0052] Figure 4 A flowchart illustrating another training method for a refueling machine obstacle detection model provided in an embodiment of this application is shown;
[0053] Figure 5This illustration shows a schematic diagram of the structure of a training device for an obstacle detection model of a refueling machine provided in an embodiment of this application;
[0054] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0056] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0057] To enable those skilled in the art to utilize the content of this application, and in conjunction with the specific application scenario of "obstacle detection," the following implementation methods are provided. For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is primarily described in the context of "obstacle detection," it should be understood that this is merely an exemplary embodiment.
[0058] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0059] The following is a detailed description of a training method for a fuel dispenser obstacle detection model provided in an embodiment of this application.
[0060] Reference Figure 1The diagram shown is a flowchart illustrating a training method for a refueling machine obstacle detection model provided in this application embodiment. The exemplary steps of this application embodiment are described below:
[0061] S101. Obtain sample images within a preset range in front of the refueling pump and the corresponding obstacle presence markers.
[0062] In this embodiment, a camera installed above the fuel dispenser captures images of a scene within a preset range in front of the dispenser, obtaining multiple sample images. Each sample image is labeled with an obstacle presence indicator, which is either a value of 1 or 0. When the obstacle presence indicator is a value of 1, it means that there is no obstacle in the sample image, i.e., in front of the fuel dispenser. When the obstacle presence indicator is a value of 0, it means that there is an obstacle in the sample image, i.e., in front of the fuel dispenser.
[0063] Among them, the obstacle presence marker is used to identify whether there are obstacles in the sample image;
[0064] S102. Input the sample image into the fuel dispenser obstacle detection model with Leaky ReLU activation function and GoogLeNet network structure to obtain the existence result of obstacles in the sample image and the probability of their existence.
[0065] In this embodiment, the obstacle detection model for the refueling machine adopts the GoogLeNet network structure. However, this application replaces the ReLU activation function in the GoogLeNet network structure with Leaky ReLU. The ReLU activation function will cause the model to be unable to continue updating due to the large update gradient. The Leaky ReLU activation function provides a very small slope when the input value is negative, thus solving the problem of the ReLU activation function.
[0066] The following expression is the expression for the activation function Leaky ReLU.
[0067]
[0068] Where Leaky ReLU(x) is the feature matrix of the sample image after enhancing nonlinear expression, x is the feature matrix of the sample image, and γ is a preset constant.
[0069] S103. Determine the accuracy of the obstacle detection model for the refueling machine based on the probability of existence and the obstacle presence markers.
[0070] In this embodiment, the accuracy of the fuel dispenser obstacle detection model, determined based on the existence probability and obstacle presence markers, is essentially the similarity between the obstacle presence result calculated by the model in the sample image and the obstacle presence markers in the sample image. This similarity is used as the accuracy of the fuel dispenser obstacle detection model; that is, the higher the similarity, the higher the model's accuracy. This method of determining accuracy is the first method.
[0071] The accuracy of the obstacle detection model for fuel dispensers is determined using the following formula;
[0072]
[0073] Where L is the accuracy of the obstacle detection model for the refueling machine, N is the number of sample images, i is an integer from 1 to N, and y i p is an obstacle presence marker for the i-th sample image. i It is the difference between the value 1 and the probability of the existence of the i-th sample image.
[0074] S104. Determine whether the accuracy rate is less than the preset value.
[0075] S105. If the accuracy is less than the preset value, the obstacle detection model for the fuel dispenser is updated based on the obstacle presence markers and obstacle presence results in the sample images. Then, the process jumps to inputting the sample images and obstacle presence markers into the fuel dispenser obstacle detection model with the activation function Leaky ReLU and the GoogLeNet network structure, and continues execution.
[0076] In this embodiment, if the accuracy is less than a preset value, it indicates that the current obstacle detection model for the refueling machine does not meet the requirements, and therefore, further training of the model is necessary. This application updates the obstacle detection model for the refueling machine by using obstacle presence markers in sample images, obstacle presence results, and backpropagation with the Adam optimizer.
[0077] Furthermore, if the accuracy rate is greater than or equal to the preset value, the current fuel dispenser obstacle detection model will be used as the final fuel dispenser obstacle detection model.
[0078] This application provides a training method for a fuel dispenser obstacle detection model. The training method includes: acquiring sample images within a preset range in front of the fuel dispenser and corresponding obstacle presence markers; the obstacle presence markers are used to indicate whether an obstacle exists in the sample images; inputting the sample images into a fuel dispenser obstacle detection model with a Leaky ReLU activation function and a GoogLeNet network structure to obtain the obstacle presence result and probability of the obstacle in the sample images; determining the accuracy of the fuel dispenser obstacle detection model based on the probability of the obstacle and the obstacle presence markers; determining whether the accuracy is less than a preset value; if the accuracy is less than the preset value, updating the fuel dispenser obstacle detection model based on the obstacle presence markers and the obstacle presence result of the sample images, and then jumping to inputting the sample images and obstacle presence markers into the fuel dispenser obstacle detection model with a Leaky ReLU activation function and a GoogLeNet network structure, and continuing execution. This application obtains the existence results and probability of obstacles in the sample images by inputting sample images into the obstacle detection model of the fuel dispenser. Then, based on the existence probability and obstacle presence markers, the accuracy of the obstacle detection model of the fuel dispenser is determined. Finally, the obstacle detection model of the fuel dispenser is updated by judging the magnitude of the accuracy compared with the preset value.
[0079] like Figure 2 The diagram shown illustrates a training method for another obstacle detection model for refueling machines provided in this application embodiment. This method represents a second method for determining accuracy. The exemplary steps of this application embodiment are described below:
[0080] S201. Determine the presence of obstacles in the sample image. Both the presence and absence results are the first number of obstacles that do not exist.
[0081] In this embodiment, a value of 1 for the obstacle presence marker indicates that the sample image does not contain obstacles, while a value of 0 indicates that the sample image contains obstacles. Similarly, a value of 1 for the presence result indicates that the sample image does not contain obstacles, and a value of 0 for the presence result indicates that the sample image contains obstacles. Therefore, the number of sample images where both the obstacle presence marker value and the presence result value are 1 is taken as the first quantity.
[0082] S202. Determine the obstacle presence markers and presence results of the sample image. Both are the second quantity of obstacles present.
[0083] In this embodiment of the application, the number of sample images in which both the value of the obstacle presence marker and the value of the presence result are 0 is used as the second quantity.
[0084] S203. Determine the third quantity of obstacles in the sample image: those marked as having obstacles and those marked as not having obstacles.
[0085] In this application embodiment, the number of sample images with an obstacle presence marker value of 1 and a presence result value of 0 is used as the third quantity.
[0086] S204. Determine the accuracy of the obstacle detection model for the refueling machine based on the first quantity, the second quantity, and the third quantity.
[0087] Specifically, the sum of the first quantity and the second quantity is calculated to obtain the first sum value; the sum of the first quantity, the second quantity, and the third quantity is calculated to obtain the second sum value; the ratio of the first sum value to the second sum value is determined as the accuracy of the fuel dispenser obstacle detection model.
[0088] The accuracy calculation method can also be expressed using the following formula.
[0089] Accuracy = (First quantity + Second quantity) / (First quantity + Second quantity + Third quantity).
[0090] This application provides another method for training a fuel dispenser obstacle detection model. The method includes: determining a first number of sample images where both obstacle presence markers and presence results indicate the absence of obstacles; determining a second number of sample images where both obstacle presence markers and presence results indicate the presence of obstacles; determining a third number of sample images where both obstacle presence markers and presence results indicate the presence of obstacles; and determining the accuracy of the fuel dispenser obstacle detection model based on the first, second, and third numbers. This method can accurately determine the accuracy of the fuel dispenser obstacle detection model.
[0091] like Figure 3 The diagram shown is a flowchart illustrating another method for training a refueling machine obstacle detection model according to an embodiment of this application. The exemplary steps of this embodiment are described below:
[0092] S301. Obtain obstacle detection images within a preset range in front of the refueling pump.
[0093] S302. Input the obstacle detection image into the fuel dispenser obstacle detection model to obtain the obstacle presence result of the obstacle detection image.
[0094] In this embodiment of the application, by inputting the obstacle detection image into the obstacle detection model of the refueling machine, the existence result of the obstacle in the obstacle detection image can be accurately obtained.
[0095] like Figure 4The diagram shown illustrates a training method for another obstacle detection model for refueling machines provided in this application embodiment. This method represents a third method for determining accuracy. Steps S401 to S404 are as follows: Figure 2 Steps S201 to S204 in the present application are described below. The exemplary steps of the embodiments of this application are described below:
[0096] S401. Determine the number of obstacles present in the sample image. Both the presence and absence results are the first number of obstacles that do not exist.
[0097] S402. Determine the obstacle presence markers and presence results of the sample image. Both are the second quantity of obstacles present.
[0098] S403. Determine the third quantity of obstacles in the sample image: those marked as having obstacles and those marked as not having obstacles.
[0099] S404. Determine the first accuracy rate of the fuel dispenser obstacle detection model based on the first quantity, the second quantity, and the third quantity; determine the second accuracy rate of the fuel dispenser obstacle detection model based on the existence probability and the obstacle existence indicator.
[0100] S405. The first accuracy rate and the second accuracy rate are weighted and averaged to obtain the final accuracy rate of the refueling machine obstacle detection model.
[0101] Reference Figure 5 As shown, this application provides a training device for an obstacle detection model of a refueling machine. The training device for the obstacle detection model of the refueling machine includes:
[0102] The acquisition module 501 is used to acquire sample images within a preset range in front of the fuel dispenser and obstacle presence markers corresponding to the sample images; the obstacle presence markers are used to indicate whether there are obstacles in the sample images.
[0103] The input module 502 is used to input the sample image into a fuel dispenser obstacle detection model with Leaky ReLU activation function and GoogLeNet network structure to obtain the existence result of the obstacle in the sample image and the probability of the obstacle's existence.
[0104] The determination module 503 is used to determine the accuracy of the fuel dispenser obstacle detection model based on the existence probability and the obstacle existence identifier;
[0105] The judgment module 504 is used to determine whether the accuracy rate is less than a preset value; if the accuracy rate is less than the preset value, the fuel dispenser obstacle detection model is updated according to the obstacle presence markers and obstacle presence results of the sample images, and the process jumps to the fuel dispenser obstacle detection model that inputs the sample images and obstacle presence markers into the activation function LeakyReLU and adopts the GoogLeNet network structure, and continues to execute.
[0106] In one possible implementation, the device further includes:
[0107] The determination module 503 is also used to determine the first number of obstacles in the sample image where both the obstacle presence marker and the presence result are non-obstacles.
[0108] The determination module 503 is also used to determine the second number of obstacles present in the sample image, where both the obstacle presence marker and the presence result are present.
[0109] The determination module 503 is also used to determine a third quantity of obstacles in the sample image, which are identified as having obstacles and have results indicating that obstacles do not exist.
[0110] The determination module 503 is also used to determine the accuracy of the obstacle detection model of the refueling machine based on the first quantity, the second quantity, and the third quantity.
[0111] In one possible implementation, the determining module 503 is specifically used to calculate the sum of the first quantity and the second quantity to obtain a first sum value; calculate the sum of the first quantity, the second quantity, and the third quantity to obtain a second sum value; and determine the ratio of the first sum value to the second sum value as the accuracy of the fuel dispenser obstacle detection model.
[0112] In one possible implementation, the acquisition module 501 is further configured to acquire obstacle detection images within a preset range in front of the refueling pump;
[0113] The input module 502 is also used to input the obstacle detection image into the fuel dispenser obstacle detection model to obtain the existence result of the obstacle in the obstacle detection image.
[0114] In one possible implementation, the determining module 503 is specifically used to determine the accuracy of the fuel dispenser obstacle detection model using the following formula; Where L is the accuracy of the obstacle detection model for the refueling machine, N is the number of sample images, i is an integer from 1 to N, and y i p is an obstacle presence marker for the i-th sample image. i It is the difference between the value 1 and the probability of the existence of the i-th sample image.
[0115] This application provides a training device for a fuel dispenser obstacle detection model. The training device includes: an acquisition module 501, used to acquire sample images within a preset range in front of the fuel dispenser and obstacle presence markers corresponding to the sample images; the obstacle presence markers are used to indicate whether an obstacle exists in the sample images; an input module 502, used to input the sample images into a fuel dispenser obstacle detection model with a Leaky ReLU activation function and a GoogLeNet network structure to obtain the obstacle presence result and the obstacle presence probability of the sample images; a determination module 503, used to determine the accuracy of the fuel dispenser obstacle detection model based on the presence probability and the obstacle presence markers; and a judgment module 504, used to determine whether the accuracy is less than a preset value; if the accuracy is less than the preset value, the fuel dispenser obstacle detection model is updated based on the obstacle presence markers and obstacle presence result of the sample images, and the process jumps to inputting the sample images and obstacle presence markers into the fuel dispenser obstacle detection model with a Leaky ReLU activation function and a GoogLeNet network structure, and continues execution. This application obtains the existence results and probability of obstacles in the sample images by inputting sample images into the obstacle detection model of the fuel dispenser. Then, based on the existence probability and obstacle presence markers, the accuracy of the obstacle detection model of the fuel dispenser is determined. Finally, the obstacle detection model of the fuel dispenser is updated by judging the magnitude of the accuracy compared with the preset value.
[0116] like Figure 6 As shown in the embodiment of this application, an electronic device 600 includes a processor 601, a memory 602, and a bus. The memory 602 stores machine-readable instructions that can be executed by the processor 601. When the electronic device is running, the processor 601 and the memory 602 communicate through the bus. The processor 601 executes the machine-readable instructions to perform the steps of the training method for the obstacle detection model of the refueling machine described above.
[0117] Specifically, the memory 602 and processor 601 mentioned above can be general-purpose memory and processor, without any specific limitations. When the processor 601 runs the computer program stored in the memory 602, it can execute the training method of the above-mentioned refueling machine obstacle detection model.
[0118] Corresponding to the above-described training method for the obstacle detection model of the refueling machine, this application embodiment also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the above-described training method for the obstacle detection model of the refueling machine.
[0119] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0120] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0121] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0122] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the information processing methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0123] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A training method for a refueling machine obstacle detection model, characterized in that, The training method for the obstacle detection model of the refueling machine includes: Acquire sample images within a preset range in front of the fuel dispenser and corresponding obstacle presence markers for the sample images; the obstacle presence markers are used to indicate whether there are obstacles in the sample images; when the obstacle presence marker is value 1, it indicates that there are no obstacles in front of the fuel dispenser; when the obstacle presence marker is value 0, it indicates that there are obstacles in front of the fuel dispenser. The sample image is input into a fuel dispenser obstacle detection model with Leaky ReLU activation function and GoogLeNet network structure to obtain the existence result of obstacles in the sample image and the probability of their existence. The process involves determining a first number of obstacle presence indicators and presence results in the sample image where both are "obstacles not present"; a second number of obstacle presence indicators and presence results in the sample image where both are "obstacles present"; and a third number of obstacle presence indicators and presence results in the sample image where both are "obstacles present" and "obstacles not present". Based on the first, second, and third numbers, a first accuracy rate of the fuel dispenser obstacle detection model is determined. Based on the presence probability and the obstacle presence indicators, a second accuracy rate of the fuel dispenser obstacle detection model is determined. The first and second accuracy rates are then weighted and averaged to obtain the final accuracy rate of the fuel dispenser obstacle detection model. The second accuracy rate essentially represents the similarity between the obstacle presence results obtained by the model in the sample image and the obstacle presence indicators in the sample image; the higher the similarity, the higher the model's accuracy rate. Determine whether the accuracy of the obstacle detection model for the fuel dispenser is less than a preset value; If the accuracy of the fuel dispenser obstacle detection model is less than the preset value, the fuel dispenser obstacle detection model is updated based on the obstacle presence markers and obstacle presence results of the sample images, and the process jumps to the fuel dispenser obstacle detection model that inputs the sample images and obstacle presence markers into the activation function Leaky ReLU and adopts the GoogLeNet network structure, and continues execution.
2. The training method for the obstacle detection model of the refueling machine according to claim 1, characterized in that, Determining the first accuracy of the fuel dispenser obstacle detection model based on the first quantity, the second quantity, and the third quantity includes: Calculate the sum of the first quantity and the second quantity to obtain the first sum value; Calculate the sum of the first quantity, the second quantity, and the third quantity to obtain a second sum value; The ratio of the first sum to the second sum is determined as the first accuracy of the fuel dispenser obstacle detection model.
3. The training method for the obstacle detection model of the refueling machine according to claim 1, characterized in that, The expression for the Leaky ReLU activation function includes: ; Where Leaky ReLU(x) is the feature matrix of the sample image after enhancing nonlinear expressive power, and x is the feature matrix of the sample image. This is a preset constant.
4. The training method for the obstacle detection model of the refueling machine according to any one of claims 1 to 3, characterized in that, The training method for the refueling machine obstacle detection model also includes: Acquire images of obstacles within a preset range in front of the refueling pump; The obstacle detection image is input into the fuel dispenser obstacle detection model to obtain the existence result of the obstacle in the obstacle detection image.
5. The training method for the obstacle detection model of the refueling machine according to claim 1, characterized in that, Determining the accuracy of the fuel dispenser obstacle detection model based on the existence probability and the obstacle presence identifier includes: The accuracy of the obstacle detection model for the fuel dispenser is determined by the following formula; ; Where L is the accuracy of the obstacle detection model for the refueling machine, N is the number of sample images, i is an integer from 1 to N, and y i p is an obstacle presence marker for the i-th sample image. i It is the difference between the value 1 and the probability of the existence of the i-th sample image.
6. A training device for an obstacle detection model of a refueling machine, characterized in that, The training method for the obstacle detection model of the refueling machine includes: The acquisition module is used to acquire sample images within a preset range in front of the fuel dispenser and obstacle presence indicators corresponding to the sample images; the obstacle presence indicators are used to indicate whether there are obstacles in the sample images; when the obstacle presence indicator is a value of 1, it means that there are no obstacles in front of the fuel dispenser; when the obstacle presence indicator is a value of 0, it means that there are obstacles in front of the fuel dispenser. The input module is used to input the sample image into a fuel dispenser obstacle detection model with Leaky ReLU activation function and GoogLeNet network structure to obtain the existence result of obstacles in the sample image and the probability of the existence of obstacles. The determination module is used to determine a first number of obstacle presence indicators and presence results in the sample image where both are "obstacles not present"; a second number of obstacle presence indicators and presence results in the sample image where both are "obstacles present"; and a third number of obstacle presence indicators and presence results in the sample image where both are "obstacles present"; a first accuracy rate of the fuel dispenser obstacle detection model is determined based on the first, second, and third numbers; a second accuracy rate of the fuel dispenser obstacle detection model is determined based on the presence probability and the obstacle presence indicators; and a weighted average of the first and second accuracy rates is taken to obtain the final accuracy rate of the fuel dispenser obstacle detection model. The second accuracy rate is essentially the similarity between the obstacle presence results obtained by the model in the sample image and the obstacle presence indicators in the sample image; the higher the similarity, the higher the model's accuracy rate. The judgment module is used to determine whether the accuracy of the fuel dispenser obstacle detection model is less than a preset value. If the accuracy of the fuel dispenser obstacle detection model is less than the preset value, the fuel dispenser obstacle detection model is updated according to the obstacle presence markers and obstacle presence results of the sample images, and the process jumps to the fuel dispenser obstacle detection model that inputs the sample images and obstacle presence markers into the activation function Leaky ReLU and adopts the GoogLeNet network structure, and continues execution.
7. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the training method for the obstacle detection model of the refueling machine as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the training method for the obstacle detection model of the refueling machine as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Obstacle detection method and device, electronic equipment and storage medium
CN113591569A