Image prediction method and device based on artificial intelligence, computer equipment and medium
By using an artificial intelligence-based image prediction method in vehicle maintenance solution detection and using a target image detection model processed by continuous label mapping, the problem of insufficient accuracy of the general object detection framework in such applications is solved, and higher prediction accuracy and data accuracy are achieved.
Patent Information
- Application Number
- CN202411598508.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-25
AI Technical Summary
The existing general target detection framework is less accurate in the prediction results due to neglecting the maintenance level in vehicle maintenance program inspection.
An image prediction method based on artificial intelligence is proposed. By receiving the maintenance plan image input by the user, pre-processing, and calling the target image detection model that has been processed through continuous label mapping processing to predict, judge the confidence of the prediction result, and perform category encoding conversion to generate the target maintenance plan category.
The prediction accuracy of vehicle maintenance solution inspection and the data accuracy of target maintenance solution categories are improved, effectively solving the problem of insufficient accuracy of the general target detection framework in such applications.
Smart Images

Figure CN119693678A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence development technology and financial technology, and in particular to an image prediction method, device, computer equipment and storage medium based on artificial intelligence. Background Art
[0002] In the current vehicle self-service damage assessment business scenario, the detection of vehicle repair solutions usually uses a general target detection framework, such as YOLOv7 and other advanced image recognition technologies. This type of technical framework has demonstrated strong application capabilities in multiple fields due to its high efficiency and accuracy.
[0003] However, in the specific application scenario of vehicle repair plan detection, directly using such general object detection frameworks faces some inherent limitations and challenges. When dealing with the task of vehicle repair plan detection, specific general object detection frameworks usually treat each category in the repair plan as an equal relationship. This treatment is based on an implicit assumption that the importance and repair level of all repair plan categories are equal. However, in actual situations, there are often significant differences in the complexity and repair level of vehicle repair plans. For example, there are essential differences in the difficulty, cost, and time required for repairing minor scratches and repairing serious body structures.
[0004] Since the general object detection framework ignores the key information of the maintenance level implied by the maintenance plan itself, the model's performance in terms of accuracy is limited. As a result, in practical applications, when using the general object detection framework for vehicle maintenance plan detection, the prediction results often have low accuracy. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose an image prediction method, device, computer equipment and storage medium based on artificial intelligence to solve the technical problem of low accuracy of prediction results in vehicle maintenance plan detection using a general target detection framework.
[0006] In order to solve the above technical problems, the embodiment of the present application provides an image prediction method based on artificial intelligence, which adopts the following technical solutions:
[0007] receiving a maintenance plan image to be processed input by a user;
[0008] Preprocessing the maintenance solution image to obtain a corresponding target maintenance solution image;
[0009] Calling a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of a preset target detection model;
[0010] Performing prediction processing on the target maintenance solution image based on the target image detection model to obtain a prediction result of the regression head;
[0011] Determining whether the confidence of the prediction result is greater than a preset confidence threshold;
[0012] If yes, convert the prediction result into a category code to obtain a corresponding target integer category code;
[0013] A corresponding target maintenance solution category is generated based on the target integer category code, and the target maintenance solution category is returned to the user.
[0014] Furthermore, before the step of calling the pre-trained target image detection model, the method further includes:
[0015] An image dataset including maintenance solutions for different vehicle components is collected from a plurality of preset data sources;
[0016] Annotating the image data set based on a preset image annotation tool to obtain a corresponding annotated image data set; wherein the label content of the annotated image data set includes the category of the maintenance solution;
[0017] According to the maintenance degree information of the maintenance plan, the categories of the maintenance plan are sorted to obtain corresponding category sorting results;
[0018] Encoding the category of the maintenance plan based on a preset coding strategy and the category sorting result to obtain corresponding coding category information;
[0019] Calling a preset initial maintenance solution classification model, and extracting features of image regions in the annotated image data set whose label content is a designated maintenance solution for the same component based on the maintenance solution classification model to obtain corresponding image features;
[0020] Perform cluster analysis on image features based on a preset target clustering algorithm to obtain corresponding distance data;
[0021] The distance data is mapped into a corresponding continuous value based on the original label of the designated maintenance solution, and label replacement processing is performed on the designated maintenance solution based on the continuous value until the continuous label mapping processing for all the annotated image data sets is completed to obtain the image sample data.
[0022] Furthermore, before the step of calling the pre-trained target image detection model, the method further includes:
[0023] Calling the target detection model;
[0024] Using a preset regression head to replace the classification head in the target detection model to obtain a corresponding first detection model;
[0025] Replacing the classification loss in the first detection model with a preset regression loss to obtain a corresponding second detection model;
[0026] The designated detection model is generated based on the second detection model.
[0027] Furthermore, the step of replacing the classification head in the target detection model with the preset regression head to obtain the corresponding first detection model specifically includes:
[0028] Obtaining a classification head in the target detection model, and calling the regression head;
[0029] Replacing the classification head in the target detection model with the regression head to obtain a corresponding first model;
[0030] Based on a preset function adding strategy, adding a target mapping function after the output of the regression head in the first model to obtain a corresponding second model;
[0031] Adding a preset linear layer to the second model to obtain a corresponding third model;
[0032] The third model is used as the first detection model.
[0033] Furthermore, before the step of calling the pre-trained target image detection model, the method further includes:
[0034] Acquire the pre-constructed image sample data;
[0035] Dividing the image sample data into a training set and a test set based on a preset division ratio;
[0036] Calling the specified detection model and obtaining a preset training strategy;
[0037] Based on the training strategy, the designated detection model is trained using the training set to obtain a corresponding first designated model;
[0038] Evaluate the first specified model based on the test set to obtain a corresponding model evaluation result;
[0039] Adjusting the first model based on the model evaluation result until a second designated model that meets preset performance requirements is obtained;
[0040] The second specified model is used as the target image detection model.
[0041] Furthermore, after the step of using the second designated model as the target image detection model, the method further includes:
[0042] Get the preset model deployment format;
[0043] Performing model export processing on the target image detection model based on the model deployment format to obtain a processed target image detection model;
[0044] The processed target image detection model is integrated and stored.
[0045] Furthermore, the step of preprocessing the maintenance solution image to obtain a corresponding target maintenance solution image specifically includes:
[0046] Resizing the maintenance solution image to obtain a corresponding first image;
[0047] Normalizing the first image to obtain a corresponding second image;
[0048] The target maintenance scenario image is generated based on the second image.
[0049] In order to solve the above technical problems, the embodiment of the present application further provides an image prediction device based on artificial intelligence, which adopts the following technical solution:
[0050] A receiving module, used for receiving a maintenance plan image to be processed input by a user;
[0051] A preprocessing module, used for preprocessing the maintenance solution image to obtain a corresponding target maintenance solution image;
[0052] A first calling module is used to call a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of a preset target detection model;
[0053] A prediction module, used for performing prediction processing on the target maintenance solution image based on the target image detection model to obtain a prediction result of a regression head;
[0054] A judgment module, used to judge whether the confidence of the prediction result is greater than a preset confidence threshold;
[0055] A conversion module, for, if yes, performing category code conversion on the prediction result to obtain a corresponding target integer category code;
[0056] The first generating module is used to generate a corresponding target maintenance solution category based on the target integer category code, and return the target maintenance solution category to the user.
[0057] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0058] receiving a maintenance plan image to be processed input by a user;
[0059] Preprocessing the maintenance solution image to obtain a corresponding target maintenance solution image;
[0060] Calling a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of a preset target detection model;
[0061] Performing prediction processing on the target maintenance solution image based on the target image detection model to obtain a prediction result of the regression head;
[0062] Determining whether the confidence of the prediction result is greater than a preset confidence threshold;
[0063] If yes, convert the prediction result into a category code to obtain a corresponding target integer category code;
[0064] A corresponding target maintenance solution category is generated based on the target integer category code, and the target maintenance solution category is returned to the user.
[0065] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0066] receiving a maintenance plan image to be processed input by a user;
[0067] Preprocessing the maintenance solution image to obtain a corresponding target maintenance solution image;
[0068] Calling a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of a preset target detection model;
[0069] Performing prediction processing on the target maintenance solution image based on the target image detection model to obtain a prediction result of the regression head;
[0070] Determining whether the confidence of the prediction result is greater than a preset confidence threshold;
[0071] If yes, convert the prediction result into a category code to obtain a corresponding target integer category code;
[0072] A corresponding target maintenance solution category is generated based on the target integer category code, and the target maintenance solution category is returned to the user.
[0073] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0074] The present application first receives a maintenance plan image to be processed input by a user; then pre-processes the maintenance plan image to obtain a corresponding target maintenance plan image; then calls a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and the loss function of a preset target detection model; subsequently, the target maintenance plan image is predicted based on the target image detection model to obtain a prediction result of the regression head; further determines whether the confidence of the prediction result is greater than a preset confidence threshold; if so, performs category coding conversion on the prediction result to obtain a corresponding target integer category code; finally, generates a corresponding target maintenance plan category based on the target integer category code, and returns the target maintenance plan category to the user. The present application obtains a target maintenance solution image by preprocessing a maintenance solution image to be processed input by a user, and then performs prediction processing on the target maintenance solution image based on a target image detection model obtained by training an optimized designated detection model using image sample data processed by continuous label mapping to obtain a prediction result of a regression head, and when it is detected that the confidence of the prediction result is greater than a preset confidence threshold, a target integer category code is obtained by converting the prediction result into a category code, and subsequently, based on the target integer category code, the corresponding target maintenance solution category can be quickly and accurately generated, thereby effectively improving the prediction accuracy of the maintenance solution and improving the data accuracy of the obtained target maintenance solution category. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. 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.
[0076] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0077] Figure 2 A flowchart of an embodiment of an artificial intelligence-based image prediction method according to the present application;
[0078] Figure 3 is a structural schematic diagram of an embodiment of an image prediction device based on artificial intelligence according to the present application;
[0079] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0080] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0081] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0082] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0083] like Figure 1As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0084] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0085] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0086] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0087] It should be noted that the artificial intelligence-based image prediction method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based image prediction device is generally arranged in the server / terminal device.
[0088] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0089] Continue to refer Figure 2, showing a flow chart of an embodiment of an artificial intelligence-based image prediction method according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The artificial intelligence-based image prediction method provided in the embodiment of the present application can be applied to any scenario that requires image detection, and the artificial intelligence-based image prediction method can be applied to products in these scenarios, for example, image prediction of maintenance plan images in the financial insurance field. The artificial intelligence-based image prediction method comprises the following steps:
[0090] Step S201, receiving a maintenance plan image to be processed input by a user.
[0091] In this embodiment, the electronic device (eg, Figure 1 The server / terminal device shown in the figure) can obtain the maintenance plan image through a wired connection or a wireless connection. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future. The executor of the present application may be an image processing system, or simply referred to as a system. In the self-service damage assessment business scenario of vehicles in the financial field, the above-mentioned maintenance plan image is the maintenance plan image data that needs to be inspected and processed for the vehicle maintenance plan input by the user through the front-end interface of the system.
[0092] Step S202: pre-process the maintenance solution image to obtain a corresponding target maintenance solution image.
[0093] In this embodiment, the above-mentioned preprocessing of the maintenance plan image to obtain the specific implementation process of the corresponding target maintenance plan image will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.
[0094] Step S203, calling a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of a preset target detection model.
[0095] In this embodiment, the target image detection model is obtained by training the optimized designated detection model using the image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of the preset target detection model. The construction process of the image sample data, the designated detection model and the target image detection model will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here.
[0096] Step S204: performing prediction processing on the target maintenance solution image based on the target image detection model to obtain a prediction result of the regression head.
[0097] In this embodiment, the preprocessed target maintenance plan image is input into the target detection model and forward propagation calculation is performed to obtain the prediction result of the regression head.
[0098] Step S205, determining whether the confidence of the prediction result is greater than a preset confidence threshold.
[0099] In this embodiment, it can be determined whether the above prediction result is a category that needs to be detected based on the confidence of the grid target. A confidence threshold (such as 0.5) can be set according to actual business needs. Only when the confidence of the prediction result is higher than the confidence threshold, it is considered that there is a target in the grid unit.
[0100] Step S206: If yes, perform category coding conversion on the prediction result to obtain the corresponding target integer category coding.
[0101] In this embodiment, when it is detected that the confidence of the prediction result is greater than the above confidence threshold, the prediction result of the regression head is rounded to convert it into an integer category code, thereby obtaining the above target integer category code. Since the regression head predicts a continuous real number with a decimal part, the rounding operation is performed to obtain an integer, that is, an integer category code, which is the prediction category output by the model.
[0102] Step S207: generating a corresponding target maintenance solution category based on the target integer category code, and returning the target maintenance solution category to the user.
[0103] In this embodiment, the target maintenance solution category (such as painting, minor repair, medium repair, major repair, replacement) corresponding to the target integer category code can be found according to the mapping relationship between the obtained integer category code and the maintenance solution category. Subsequently, the determined target maintenance solution category and the corresponding bounding box coordinates are output as the final result and returned to the user.
[0104] The present application obtains a target maintenance solution image by preprocessing a maintenance solution image to be processed input by a user, and then performs prediction processing on the target maintenance solution image based on a target image detection model obtained by training an optimized designated detection model using image sample data processed by continuous label mapping to obtain a prediction result of a regression head, and when it is detected that the confidence of the prediction result is greater than a preset confidence threshold, a target integer category code is obtained by converting the prediction result into a category code, and subsequently, based on the target integer category code, the corresponding target maintenance solution category can be quickly and accurately generated, thereby effectively improving the prediction accuracy of the maintenance solution and improving the data accuracy of the obtained target maintenance solution category.
[0105] In some optional implementations, before step S203, the electronic device may further perform the following steps:
[0106] An image dataset containing maintenance solutions for different vehicle parts is collected from a plurality of preset data sources.
[0107] In this embodiment, the above data sources may include vehicle repair shops, insurance companies, online platforms, etc.
[0108] The image dataset is annotated based on a preset image annotation tool to obtain a corresponding annotated image dataset, wherein the label content of the annotated image dataset includes the category of the maintenance solution.
[0109] In this embodiment, the image dataset can be annotated by using an image annotation tool with an image annotation function, and the annotation content includes the category of the repair solution (such as painting, minor repair, medium repair, major repair, replacement) and the corresponding vehicle parts (such as front bumper, door, window, etc.). The annotation results are saved in a common format, thereby obtaining the annotated image dataset.
[0110] According to the maintenance degree information of the maintenance plan, the categories of the maintenance plan are sorted to obtain corresponding category sorting results.
[0111] In this embodiment, the maintenance degree information of the maintenance plan can be obtained, and the categories of the maintenance plan can be sorted from light to heavy according to the obtained maintenance degree information of the maintenance plan. For example: painting < minor repair < medium repair < major repair < replacement.
[0112] The category of the maintenance plan is encoded based on a preset encoding strategy and the category sorting result to obtain corresponding encoding category information.
[0113] In this embodiment, the coding strategy includes: coding the category of each maintenance solution and ensuring that the coding is unique and continuously increasing. For example, painting is coded as 0, minor repair is coded as 1, medium repair is coded as 2, major repair is coded as 3, and replacement is coded as 4.
[0114] A preset initial maintenance solution classification model is called, and based on the maintenance solution classification model, feature extraction is performed on image regions in the annotated image data set whose label content is a designated maintenance solution for the same component to obtain corresponding image features.
[0115] In this embodiment, an existing vehicle component maintenance solution classification model (i.e., the initial maintenance solution classification model) can be selected as a feature extractor. The initial maintenance solution classification model is a pre-trained model that has been trained on a similar vehicle maintenance image dataset and can extract effective features.
[0116] Among them, the maintenance solution image regions with the same component label content in the annotated image data set are cropped. Then, the above-mentioned initial maintenance solution classification model is used to extract features from these cropped image regions to obtain corresponding image features. The extracted image features can be the output of the last layer or the last few layers of the convolutional neural network (CNN).
[0117] Based on the preset target clustering algorithm, the image features are clustered and analyzed to obtain the corresponding distance data.
[0118] In this embodiment, the above-mentioned target clustering algorithm can specifically adopt the k-means clustering algorithm. The value of k in the k-means clustering algorithm can be determined according to the number of maintenance scheme categories, but different k values can also be tried to find the best clustering result. The above-mentioned process of clustering analysis of image features based on the preset target clustering algorithm includes: clustering the image features of different maintenance schemes for the same component according to the maintenance scheme category of the original label. And it is necessary to perform k-means clustering once for each category of each component. Among them, in the clustering process, the number of clusters (k value) and the method of selecting the initial cluster center can be pre-specified according to actual needs. Then for each feature point, calculate its distance data to the cluster center to which it belongs.
[0119] The distance data is mapped into a corresponding continuous value based on the original label of the designated maintenance solution, and label replacement processing is performed on the designated maintenance solution based on the continuous value until the continuous label mapping processing for all the annotated image data sets is completed to obtain the image sample data.
[0120] In this embodiment, the distance data are mapped to continuous values according to the original labels of the specified maintenance solutions. Specifically, this can be achieved by normalizing or standardizing the distances to ensure that the distances between different clustering results are comparable. The continuous values obtained after mapping can represent the severity of the maintenance solution or some measure related to the maintenance degree.
[0121] Specifically, an existing vehicle component maintenance solution classification model is used as a feature extractor to extract corresponding features from image regions labeled as maintenance solutions for the same component; different maintenance solution features for the same component are clustered according to the original label maintenance solution category (such as k-means, etc.) to obtain different class centers, and then the distance from each feature to the class center is calculated, and according to the original label of the maintenance solution (such as painting, minor repair, medium repair, major repair and replacement are 0, 1, 2, 3, 4 respectively), it is mapped to a continuous value. The mapped continuous value is used as a new label. Label mapping methods include: L = L (origin) + sigmoid (origin), origin is the original model, that is, the existing vehicle component maintenance solution classification model.
[0122] In addition, the continuous value obtained by subsequent mapping is used as a new label to fine-tune the specified detection model obtained by replacing the classification head of the existing vehicle component maintenance plan classification model with the regression head, so as to train the final target image detection model.
[0123] The present application collects image datasets containing maintenance solutions for different vehicle parts from a plurality of preset data sources; then annotates the image dataset based on a preset image annotation tool to obtain a corresponding annotated image dataset; then sorts the categories of the maintenance solutions according to the maintenance degree information of the maintenance solutions to obtain a corresponding category sorting result; subsequently encodes the categories of the maintenance solutions based on a preset encoding strategy and the category sorting result to obtain corresponding encoding category information; further calls a preset initial maintenance solution classification model, and extracts features of image regions of the annotated image dataset whose label content is a designated maintenance solution of the same component based on the maintenance solution classification model to obtain corresponding image features; and clusters the image features based on a preset target clustering algorithm to obtain corresponding distance data; finally, maps the distance data to a corresponding continuous value based on the original label of the designated maintenance solution, and performs label replacement processing on the designated maintenance solution based on the continuous value until the continuous label mapping processing for all the annotated image datasets is completed, thereby realizing fast and accurate construction of the required image sample data, and improving the construction intelligence and construction accuracy of the image sample data. By effectively utilizing the depth or severity information implicit in the target detection category, the forced classification is changed to a continuous method through clustering, which helps to reduce the learning difficulty of the target detection model.
[0124] In some optional implementations of this embodiment, before step S203, the electronic device may further perform the following steps:
[0125] The target detection model is called.
[0126] In this embodiment, the above-mentioned target detection model can specifically adopt the YOLOv7 model. The model code and weights can be obtained from the official repository or pre-trained model of YOLOv7 to obtain the corresponding target detection model.
[0127] The classification head in the target detection model is replaced by a preset regression head to obtain a corresponding first detection model.
[0128] In this embodiment, the above-mentioned specific implementation process of using the preset regression head to replace the classification head in the target detection model to obtain the corresponding first detection model will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated here.
[0129] The classification loss in the first detection model is replaced by a preset regression loss to obtain a corresponding second detection model.
[0130] In this embodiment, the corresponding second detection model can be obtained by retaining the grid target loss Lobj and the regression box loss Lbox in the first detection model, and replacing the original classification loss Lcls of the first detection model with the regression loss Lreg obtained based on the regression calculation. Among them, the final Loss calculation formula is: Loss = αLobj + βLbox + γ*Lreg, where α, β, γ are hyperparameters used to adjust the balance between the terms in the loss function. Lreg calculates the difference between the regression head prediction and the expert annotation result. For example, loss functions such as mean square error MSE and absolute error L1 can be used.
[0131] The designated detection model is generated based on the second detection model.
[0132] In this embodiment, the generated specified detection model replaces the classification head with a regression head and uses regression to predict the target category, which can better meet the needs of users, reduce the problem of excessive differences between categories affecting the effect caused by the original classification method of the target detection model, and improve the accuracy of the specified detection model in scenarios where there are deep or hierarchical relationships between categories. At the same time, the real-time detection characteristics of the target detection model are retained.
[0133] The present application obtains a first detection model by replacing the classification head in the called target detection model with a preset regression head, and then replaces the classification loss in the first detection model with the preset regression loss, so that a specified detection model with the function of a regression-based target detection model can be quickly and accurately constructed, thereby improving the construction intelligence of the specified detection model and improving the detection effect of the specified detection model.
[0134] In some optional implementations, replacing the classification head in the target detection model with the preset regression head to obtain the corresponding first detection model includes the following steps:
[0135] Obtain the classification head in the object detection model, and call the regression head.
[0136] In this embodiment, the classification head part in the target detection model is found out according to the rule content of the preset rule. Wherein, the preset rule includes: the classification head part is the last convolutional layer or fully connected layer in the target detection model, which is used to output the category probability of the target in each grid unit.
[0137] The classification head in the target detection model is replaced with the regression head to obtain a corresponding first model.
[0138] In this embodiment, the classification head in the classification head target detection model can be replaced by the regression head by searching, wherein the regression head has the number of output channels corresponding to the number of categories n of the maintenance solutions (n=5 in this embodiment).
[0139] Based on a preset function adding strategy, a target mapping function is added after the output of the regression head in the first model to obtain a corresponding second model.
[0140] In this embodiment, the strategy content of the above function adding strategy includes: adding a sigmoid function, that is, the above target mapping function, after the output of the regression head to map the output result range to between 0 and 1.
[0141] A preset linear layer is added to the second model to obtain a corresponding third model.
[0142] In this embodiment, the above-mentioned linear layer is a trainable linear layer, and can realize the transformation: Y = sigmoid (x) * n * a + b. Among them, the input of the regression head of the model is recorded as x, the output result range is mapped to 0 to 1 through the sigmoid function, and then multiplied by the number of categories n (5 in this case), and then adjusted by two hyperparameters a and b. The output of the regression head is recorded as Y. In general, the default value of a is 1 and the default value of b is 0. In addition, the role of the linear layer includes: multiplying the output of the sigmoid function by the number of categories n (i.e. 5), and performing a linear transformation through hyperparameters a and b to adjust the output range.
[0143] The third model is used as the first detection model.
[0144] The present application obtains a first model by replacing the classification head in the acquired target detection model with a regression head, and then, based on the use of a preset function adding strategy, adds a target mapping function after the output of the regression head in the first model to obtain a second model, and then adds a preset linear layer to the second model, thereby achieving fast and accurate replacement of the classification head in the target detection model, which is beneficial to improving the image detection accuracy of the generated first detection model.
[0145] In some optional implementations, before step S203, the electronic device may further perform the following steps:
[0146] The pre-constructed image sample data is obtained.
[0147] In this embodiment, the process of constructing the above-mentioned image sample data can refer to the aforementioned description process, and will not be elaborated herein.
[0148] The image sample data is divided into a training set and a test set based on a preset division ratio.
[0149] In this embodiment, there is no specific limitation on the numerical value selection of the above-mentioned preset division ratio, for example, 7:3 can be used.
[0150] The specified detection model is called and a preset training strategy is obtained.
[0151] In this embodiment, the strategy content of the above training strategy includes: setting the training parameters of the model, including learning rate, batch size, number of training rounds, etc. The training parameters are adjusted according to the size of the training set and the complexity of the model. Then the model is trained using the training set. During the training process, the model will learn how to extract features from the input image and predict the maintenance plan category based on these features.
[0152] Based on the training strategy, the designated detection model is trained using the training set to obtain a corresponding first designated model.
[0153] In this embodiment, the designated detection model may be trained using a training set according to the policy content of the above-mentioned training policy to obtain a trained first designated model.
[0154] The first specified model is evaluated based on the test set to obtain a corresponding model evaluation result.
[0155] In this embodiment, the performance indicators such as accuracy and recall rate of the generated first specified model can be evaluated by using a test set and used as the above-mentioned model evaluation result.
[0156] The first model is adjusted based on the model evaluation result until a second designated model that meets preset performance requirements is obtained.
[0157] In this embodiment, the model architecture, loss function, hyperparameters, etc. of the first specified model can be adjusted according to the evaluation results to improve the model performance. The above model training and model evaluation steps are repeated until the model performance reaches a satisfactory level, thereby obtaining a second specified model that meets the performance requirements.
[0158] The second specified model is used as the target image detection model.
[0159] The present application obtains the pre-constructed image sample data; and divides the image sample data into a training set and a test set based on a preset division ratio; then calls the specified detection model and obtains a preset training strategy; then, based on the training strategy, uses the training set to train the specified detection model to obtain a corresponding first specified model; subsequently, the first specified model is evaluated based on the test set to obtain a corresponding model evaluation result; the first model is further adjusted based on the model evaluation result until a second specified model that meets the preset performance requirements is obtained; and finally, the second specified model is used as the target image detection model. The present application divides the image sample data into a training set and a test set based on a preset division ratio, and then, based on the use of the training set and the test set, respectively trains and evaluates the specified detection model to finally obtain a target image detection model that meets the preset performance requirements, thereby improving the construction efficiency of the target image detection model and improving the model effect of the target image detection model.
[0160] In some optional implementations of this embodiment, step S203 includes the following steps:
[0161] Get the preset model deployment format.
[0162] In this embodiment, there is no specific limitation on the selection of the above-mentioned model deployment format, which can be set according to the actual model deployment requirements, for example, it can include deployable formats such as .pth, .h5, etc.
[0163] The target image detection model is subjected to model export processing based on the model deployment format to obtain a processed target image detection model.
[0164] In this embodiment, the target image detection model is exported into a format corresponding to the model deployment format, thereby obtaining a processed target image detection model.
[0165] The processed target image detection model is integrated and stored.
[0166] In this embodiment, the processed target image detection model can be stored by using a preset storage method. The above storage method is not specifically limited, for example, local database storage, blockchain storage, cloud server storage, etc. can be used. In addition, the processed target image detection model can be integrated into actual application scenarios, such as image processing software, mobile applications, etc., so as to complete the integration of the processed target image detection model.
[0167] After completing the construction of the target image detection model, this application will also intelligently export the target image detection model based on the acquired model deployment format to obtain the processed target image detection model, and then store the processed target image detection model to ensure the security of the generated processed target image detection model. In addition, the processed target image detection model will also be integrated so that the processed target image detection model can be successfully applied in actual application scenarios.
[0168] In some optional implementations of this embodiment, step S202 includes the following steps:
[0169] The maintenance solution image is resized to obtain a corresponding first image.
[0170] In this embodiment, the corresponding first image can be obtained by obtaining the image size used by the target image detection model during training and performing a matching resizing process on the maintenance solution image according to the image size.
[0171] The first image is normalized to obtain a corresponding second image.
[0172] In this embodiment, the first image may be normalized by using a tool with a normalization function to obtain a corresponding second image.
[0173] The target maintenance scenario image is generated based on the second image.
[0174] In this embodiment, the generated second image can be used as the target maintenance solution image.
[0175] The present application achieves intelligent and accurate preprocessing of the maintenance plan image by resizing and normalizing the maintenance plan image, thereby effectively ensuring that the generated target maintenance plan image is consistent with the image format used in training the target image detection model, thereby improving the data accuracy of the generated target maintenance plan image.
[0176] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.
[0177] In addition, the non-Company software tools or components that appear in the embodiments of the present application are merely examples and do not represent actual use.
[0178] In addition, based on the existing target detection framework YOLOv7, this application maps the original classification discrete labels to continuous labels, replaces classification with regression to predict categories, rewrites the target loss calculation and post-processing process, etc., to realize the function of the regression-based target detection model. By innovatively utilizing the depth or severity information implicit in the target detection category, the forced classification is changed to a continuous method through clustering, which reduces the difficulty of model learning. By replacing the classification head with a regression head and using regression to predict the target category, it can better meet the needs of users, reduce the problem of excessive differences between categories affecting the effect caused by the original classification method, and improve the accuracy of the model in scenarios where there is a deep or hierarchical relationship between categories. At the same time, the real-time detection characteristics of YOLOv7 are retained.
[0179] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0180] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target maintenance solution categories, the above-mentioned target maintenance solution categories can also be stored in a node of a blockchain.
[0181] The blockchain referred to in this application is a new application model 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.
[0182] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0183] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0184] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0185] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0186] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of an image prediction device based on artificial intelligence. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0187] like Figure 3 As shown, the artificial intelligence-based image prediction device 300 described in this embodiment includes: a receiving module 301, a preprocessing module 302, a first calling module 303, a prediction module 304, a judgment module 305, a conversion module 306 and a first generation module 307. Among them:
[0188] The receiving module 301 is used to receive the maintenance plan image to be processed input by the user;
[0189] A preprocessing module 302 is used to preprocess the maintenance solution image to obtain a corresponding target maintenance solution image;
[0190] The first calling module 303 is used to call a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of a preset target detection model;
[0191] A prediction module 304 is used to perform prediction processing on the target maintenance solution image based on the target image detection model to obtain a prediction result of a regression head;
[0192] The judgment module 305 is used to judge whether the confidence of the prediction result is greater than a preset confidence threshold;
[0193] A conversion module 306 is used to perform category code conversion on the prediction result to obtain a corresponding target integer category code;
[0194] The first generating module 307 is configured to generate a corresponding target maintenance solution category based on the target integer category code, and return the target maintenance solution category to the user.
[0195] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based image prediction method in the aforementioned implementation mode, and are not described in detail here.
[0196] In some optional implementations of this embodiment, the image prediction device based on artificial intelligence further includes:
[0197] A first acquisition module is used to collect image data sets containing maintenance solutions for different vehicle components from a plurality of preset data sources;
[0198] A labeling module, used to label the image data set based on a preset image labeling tool to obtain a corresponding labeled image data set; wherein the label content of the labeled image data set includes the category of the maintenance plan;
[0199] A sorting module, used to sort the categories of the maintenance schemes according to the maintenance degree information of the maintenance schemes, and obtain corresponding category sorting results;
[0200] A coding module, used to encode the category of the maintenance plan based on a preset coding strategy and the category sorting result to obtain corresponding coding category information;
[0201] an extraction module, used to call a preset initial maintenance solution classification model, and perform feature extraction on an image region in the annotated image data set whose label content is a designated maintenance solution for the same component based on the maintenance solution classification model to obtain corresponding image features;
[0202] An analysis module, used to perform cluster analysis on image features based on a preset target clustering algorithm to obtain corresponding distance data;
[0203] The first processing module is used to map the distance data into a corresponding continuous value based on the original label of the designated maintenance plan, and perform label replacement processing on the designated maintenance plan based on the continuous value until the continuous label mapping processing for all the annotated image data sets is completed to obtain the image sample data.
[0204] In some optional implementations of this embodiment, the image prediction device based on artificial intelligence further includes:
[0205] A second calling module, used to call the target detection model;
[0206] A first replacement module, used to replace the classification head in the target detection model with a preset regression head to obtain a corresponding first detection model;
[0207] A second replacement module, used to replace the classification loss in the first detection model with a preset regression loss to obtain a corresponding second detection model;
[0208] The second generating module is used to generate the specified detection model based on the second detection model.
[0209] In some optional implementations of this embodiment, the first replacement module includes:
[0210] An acquisition submodule, used to acquire the classification head in the target detection model and call the regression head;
[0211] A replacement submodule, used to replace the classification head in the target detection model with the regression head to obtain a corresponding first model;
[0212] A first adding submodule, configured to add a target mapping function after the output of the regression head in the first model based on a preset function adding strategy to obtain a corresponding second model;
[0213] A second adding submodule, used for adding a preset linear layer to the second model to obtain a corresponding third model;
[0214] A determination submodule is used to use the third model as the first detection model.
[0215] In some optional implementations of this embodiment, the image prediction device based on artificial intelligence further includes:
[0216] A second acquisition module, used to acquire the pre-constructed image sample data;
[0217] A division module, used for dividing the image sample data into a training set and a test set based on a preset division ratio;
[0218] A third acquisition module is used to call the specified detection model and obtain a preset training strategy;
[0219] A training module, configured to train the designated detection model using the training set based on the training strategy to obtain a corresponding first designated model;
[0220] An evaluation module, used to evaluate the first specified model based on the test set to obtain a corresponding model evaluation result;
[0221] An adjustment module, used for adjusting the first model based on the model evaluation result until a second designated model that meets the preset performance requirements is obtained;
[0222] A determination module is used to use the second specified model as the target image detection model.
[0223] In some optional implementations of this embodiment, the image prediction device based on artificial intelligence further includes:
[0224] The fourth acquisition module is used to obtain a preset model deployment format;
[0225] An export module, used to perform model export processing on the target image detection model based on the model deployment format to obtain a processed target image detection model;
[0226] The processing module is used to integrate and store the processed target image detection model.
[0227] In some optional implementations of this embodiment, the preprocessing module 302 includes:
[0228] A first processing submodule, configured to resize the maintenance solution image to obtain a corresponding first image;
[0229] A second processing submodule, used for performing normalization processing on the first image to obtain a corresponding second image;
[0230] A generating submodule is used to generate the target maintenance solution image based on the second image.
[0231] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0232] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0233] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0234] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of an image prediction method based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0235] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the artificial intelligence-based image prediction method.
[0236] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0237] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned artificial intelligence-based image prediction method.
[0238] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0239] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. An image prediction method based on artificial intelligence, characterized in that: The steps include: receiving a maintenance plan image to be processed input by a user; Preprocessing the maintenance solution image to obtain a corresponding target maintenance solution image; Calling a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of a preset target detection model; Performing prediction processing on the target maintenance solution image based on the target image detection model to obtain a prediction result of the regression head; Determining whether the confidence of the prediction result is greater than a preset confidence threshold; If yes, convert the prediction result into a category code to obtain a corresponding target integer category code; A corresponding target maintenance solution category is generated based on the target integer category code, and the target maintenance solution category is returned to the user.
2. The image prediction method based on artificial intelligence according to claim 1, characterized in that: Before the step of calling the pre-trained target image detection model, the method further includes: An image dataset including maintenance solutions for different vehicle components is collected from a plurality of preset data sources; Annotating the image data set based on a preset image annotation tool to obtain a corresponding annotated image data set; wherein the label content of the annotated image data set includes the category of the maintenance solution; According to the maintenance degree information of the maintenance plan, the categories of the maintenance plan are sorted to obtain corresponding category sorting results; Encoding the category of the maintenance plan based on a preset coding strategy and the category sorting result to obtain corresponding coding category information; Calling a preset initial maintenance solution classification model, and extracting features of image regions in the annotated image data set whose label content is a designated maintenance solution for the same component based on the maintenance solution classification model to obtain corresponding image features; Perform cluster analysis on image features based on a preset target clustering algorithm to obtain corresponding distance data; The distance data is mapped into a corresponding continuous value based on the original label of the designated maintenance solution, and label replacement processing is performed on the designated maintenance solution based on the continuous value until the continuous label mapping processing for all the annotated image data sets is completed to obtain the image sample data.
3. The image prediction method based on artificial intelligence according to claim 1, characterized in that: Before the step of calling the pre-trained target image detection model, the method further includes: Calling the target detection model; Using a preset regression head to replace the classification head in the target detection model to obtain a corresponding first detection model; Replacing the classification loss in the first detection model with a preset regression loss to obtain a corresponding second detection model; The designated detection model is generated based on the second detection model.
4. The image prediction method based on artificial intelligence according to claim 3, characterized in that: The step of replacing the classification head in the target detection model with the preset regression head to obtain the corresponding first detection model specifically includes: Obtaining a classification head in the target detection model, and calling the regression head; Replacing the classification head in the target detection model with the regression head to obtain a corresponding first model; Based on a preset function adding strategy, adding a target mapping function after the output of the regression head in the first model to obtain a corresponding second model; Adding a preset linear layer to the second model to obtain a corresponding third model; The third model is used as the first detection model.
5. The image prediction method based on artificial intelligence according to claim 1, characterized in that: Before the step of calling the pre-trained target image detection model, the method further includes: Acquire the pre-constructed image sample data; Dividing the image sample data into a training set and a test set based on a preset division ratio; Calling the specified detection model and obtaining a preset training strategy; Based on the training strategy, the designated detection model is trained using the training set to obtain a corresponding first designated model; Evaluate the first specified model based on the test set to obtain a corresponding model evaluation result; Adjusting the first model based on the model evaluation result until a second designated model that meets preset performance requirements is obtained; The second specified model is used as the target image detection model.
6. The image prediction method based on artificial intelligence according to claim 5, characterized in that: After the step of using the second designated model as the target image detection model, the method further includes: Get the preset model deployment format; Performing model export processing on the target image detection model based on the model deployment format to obtain a processed target image detection model; The processed target image detection model is integrated and stored.
7. The image prediction method based on artificial intelligence according to claim 1, characterized in that: The step of preprocessing the maintenance solution image to obtain a corresponding target maintenance solution image specifically includes: Resizing the maintenance solution image to obtain a corresponding first image; Normalizing the first image to obtain a corresponding second image; The target maintenance scenario image is generated based on the second image.
8. An image prediction device based on artificial intelligence, characterized in that: include: A receiving module, used for receiving a maintenance plan image to be processed input by a user; A preprocessing module, used for preprocessing the maintenance solution image to obtain a corresponding target maintenance solution image; A first calling module is used to call a pre-trained target image detection model; wherein the target image detection model is obtained by training an optimized designated detection model using image sample data processed by continuous label mapping, and the designated detection model is a model obtained by modifying the model structure and loss function of a preset target detection model; A prediction module, used for performing prediction processing on the target maintenance solution image based on the target image detection model to obtain a prediction result of a regression head; A judgment module, used to judge whether the confidence of the prediction result is greater than a preset confidence threshold; A conversion module, for, if yes, performing category code conversion on the prediction result to obtain a corresponding target integer category code; The first generating module is used to generate a corresponding target maintenance solution category based on the target integer category code, and return the target maintenance solution category to the user.
9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the image prediction method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the artificial intelligence-based image prediction method according to any one of claims 1 to 7 are implemented.