Model training method, device, electronic device and storage medium
Through the two-stage training method, the model is updated with a smaller first sample data set and a larger second sample data set, which solves the problem of low accuracy in the existing technology and achieves high accuracy training of target model.
Patent Information
- Application Number
- CN202110903615.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-06
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-08-06
AI Technical Summary
The existing model training methods are simple and the target model has poor accuracy, making it difficult to meet the needs of high accuracy.
Using a two-stage training method, first determine the depth parameters and model layer parameters of the initial model based on the smaller first sample data set to obtain the intermediate model; then further train the intermediate model based on the larger second sample data set , update the model layer parameters to obtain the target model.
The two-stage training method significantly improves the accuracy of the target model, and can more accurately identify and calibrate the microcircuit structure of the LCD panel.
Smart Images

Figure CN113627611B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a model training method, device, electronic device and storage medium. Background Art
[0002] With the development of Internet technology, deep learning technology is being applied more and more widely. The model training method in the prior art is relatively simple, and the accuracy of the target model obtained after training is relatively poor. Therefore, there is an urgent need for a model training method that can make the output result of the target model more accurate. Summary of the invention
[0003] The embodiments of the present application provide a model training method, device, electronic device and storage medium to quickly obtain a target model.
[0004] In a first aspect, an embodiment of the present application provides a model training method, the method comprising:
[0005] According to the first sample data set, the initial model is trained in the first stage to determine the model depth parameter and the model layer parameter of the first stage, and the initial model is updated according to the model depth parameter and the model layer parameter of the first stage to obtain an intermediate model;
[0006] According to the second sample data set, the intermediate model is trained in the second stage to determine the model layer parameters of the second stage, and the parameters of the intermediate model are updated according to the model layer parameters of the second stage to obtain the target model; wherein the number of the first sample data set is less than the number of the second sample data set.
[0007] In a second aspect, an embodiment of the present application provides a model training device, the device comprising:
[0008] A first training module is used to perform a first-stage training on the initial model according to the first sample data set, determine a model depth parameter and a model layer parameter of the first stage, and update the parameters of the initial model according to the model depth parameter and the model layer parameter of the first stage to obtain an intermediate model;
[0009] The second training module is used to perform a second stage of training on the intermediate model based on a second sample data set, determine the model layer parameters of the second stage, and update the parameters of the intermediate model based on the model layer parameters of the second stage to obtain a target model; wherein the number of the first sample data set is less than the number of the second sample data set.
[0010] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0011] one or more processors;
[0012] A storage device for storing one or more programs;
[0013] When the one or more programs are executed by the one or more processors, the one or more processors implement the model training method described in any embodiment of the present application.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, wherein the program, when executed by a processor, implements the model training method described in any embodiment of the present application.
[0015] The embodiment of the present application provides a model training method, device, electronic device and storage medium. According to a first sample data set, the initial model is trained in the first stage to determine the model depth parameters and the model layer parameters of the first stage, and the initial model is updated according to the model depth parameters and the model layer parameters of the first stage to obtain an intermediate model; according to a second sample data set, the intermediate model is trained in the second stage to determine the model layer parameters of the second stage, and the intermediate model is updated according to the model layer parameters of the second stage to obtain a target model; wherein the number of the first sample data set is less than the number of the second sample data set. By executing the scheme of the present application, the accuracy of the target model can be made higher by training the initial model in two stages.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0018] Figure 1 A first flow chart of a model training method provided in Example 1 of the present application;
[0019] Figure 2A A second flow chart of a model training method provided in Embodiment 2 of the present application;
[0020] Figure 2B A first image schematic diagram of a model training method provided in Embodiment 2 of the present application;
[0021] Figure 2C A second image schematic diagram of a model training method provided in Embodiment 2 of the present application;
[0022] Figure 2DA third image schematic diagram of a model training method provided in Embodiment 2 of the present application;
[0023] Figure 3 A schematic diagram of the structure of a model training device provided in Example 3 of the present application;
[0024] Figure 4 It is a block diagram of an electronic device used to implement a model training method in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] Embodiment 1
[0027] Figure 1 This is a first flow chart of a model training method provided in Example 1 of the present application. This embodiment can be applied to the case where a model is trained using a sample data set to obtain a target model. The model training method provided in this embodiment can be executed by a model training device provided in an embodiment of the present application, which can be implemented in software and / or hardware and integrated in an electronic device that executes this method.
[0028] See also Figure 1 The method of this embodiment includes but is not limited to the following steps:
[0029] S110. Perform a first-stage training on the initial model according to the first sample data set, determine the model depth parameters and the first-stage model layer parameters, and update the parameters of the initial model according to the model depth parameters and the first-stage model layer parameters to obtain an intermediate model.
[0030] Among them, the first sample data set can be the data required for training the initial model. For example, if the initial model is used to perform the task of calibrating the circuit structure in the image, the first sample data set of this embodiment can be an image set of the microcircuit structure of the liquid crystal panel. Optionally, the initial model can be any network model that needs to be trained, for example, it can be a semantic segmentation Unet model. The model depth parameter refers to the number of layers of the model. The model layer parameters include the scale of the internal parameters of the model, the ratio of the neural network unit discarded (i.e., Dropout), the size of the batch size (i.e., Batch_size), etc.
[0031] In the embodiment of the present application, according to the function that the model to be trained needs to achieve, the training data sets under different circumstances required for training the model are collected. For example, if the function that the model to be trained needs to achieve is to calibrate the circuit structure in the image, the training data collected at this time can be images of different liquid crystal panel microcircuit structures, and the acquired training data sets (such as images of different liquid crystal panel microcircuit structures) are preprocessed to obtain a first sample data set. And according to the first sample data set, the initial model is trained to obtain an intermediate model.
[0032] Optionally, this step performs a first-stage training on the initial model according to the first sample data set, determines the model depth parameter and the model layer parameters of the first stage, and updates the parameters of the initial model according to the model depth parameter and the model layer parameters of the first stage. The specific process of obtaining the intermediate model can be achieved through the following two sub-steps:
[0033] S1101. Perform model depth training on the initial model according to the first sample data set, determine the model depth parameters, and update the model depth of the initial model according to the model depth parameters to obtain an initial intermediate model.
[0034] In an embodiment of the present application, the first sample data set includes a training data set and a test data set. When the training data set is used to perform model depth iterative training on the initial model, the initial model will continue to deepen with the model depth, and the accuracy will approach 100%, which will make the initial model specialized and lose the versatility of model prediction. Therefore, when the initial model is trained in the first stage, a training-while-testing method is adopted, that is, after the initial model is trained in model depth iterative training using the training data set, the initial model after each iterative training is tested using the test data.
[0035] In an embodiment of the present application, the specific process of determining the model depth parameter by performing model depth training on the initial model according to the first sample data set is as follows: using the first sample data set, performing model depth iterative training on the initial model to obtain the model depth corresponding to each iterative training; using test data to test the initial model after each iterative training to determine the model error rate of each iterative training; using the model depth corresponding to the iterative training with the lowest error rate as the model depth parameter. The obtained model depth parameter is used as the model depth of the initial model to obtain the initial intermediate model. When using test data to test the initial model after each iterative training, selecting the model depth corresponding to the iterative training with the lowest error rate can prevent the overfitting phenomenon of model training.
[0036] S1102. Perform layer parameter training on the initial intermediate model according to the first sample data set to determine the model layer parameters of the first stage, and update the model layer parameters of the initial intermediate model according to the model layer parameters of the first stage to obtain the final intermediate model.
[0037] In the embodiment of the present application, after the above step S1101, the model depth training is performed on the initial model to determine the model depth of the initial model, and the initial intermediate model is obtained. On this basis, the layer parameter training is performed on the initial intermediate model according to the first sample data set to determine the model layer parameters of the first stage.
[0038] In an embodiment of the present application, the specific process of performing layer parameter training on the initial intermediate model according to the first sample data set to determine the model layer parameters of the first stage is: determining the model layer parameter orthogonal table according to the type of model layer parameters; performing layer parameter training on the initial intermediate model according to the first sample data set and the orthogonality of the model layer parameters, recording the error rate of each training, and using the layer parameters corresponding to the layer parameter training with the lowest error rate as the model layer parameters of the first stage.
[0039] Exemplarily, the method for determining the orthogonal table of model layer parameters can be: assuming that there are three types of model layer parameters, namely, the scale of model internal parameters, the ratio of dropout, and the batch size. First, ten values are selected within the value range of each model layer parameter, and the values can be selected at equal intervals. Then, the ten values selected for each model layer parameter are arranged and combined. Finally, one thousand arrays can be obtained, that is, the orthogonal table of model layer parameters.
[0040] In the embodiment of the present application, according to the determined orthogonal table of model layer parameters, the sample images in the first sample data set are sequentially input into the initial intermediate model, the layer parameters are trained, the error rate of each training is recorded, and a three-dimensional image of the error rate, the number of iterations, and the model layer parameters is drawn. In the three-dimensional image, the layer parameter corresponding to the lowest error rate is found, and the layer parameter is used as the model layer parameter of the first stage.
[0041] S120. Perform a second-stage training on the intermediate model according to the second sample data set, determine the model layer parameters of the second stage, and update the parameters of the intermediate model according to the model layer parameters of the second stage to obtain a target model.
[0042] Among them, the second sample data set is the data required for the second stage training of the intermediate model. For example, if the intermediate model is used to perform the task of calibrating the circuit structure in the image, the second sample data set is the same as the first sample data set. Optionally, if the function that the model to be trained needs to achieve is to identify the circuit structure in the image of the liquid crystal panel microcircuit structure, then the first sample data set and the second sample data set are both image sets of the liquid crystal panel microcircuit structure. Among them, the number of the first sample data sets is less than the number of the second sample data sets. Optionally, the first sample data set may be a part of the second sample data set, or it may not be, and this embodiment does not limit this. Correspondingly, if the first sample data set and the second sample data set are image sets of the liquid crystal panel microcircuit structure, the target model finally obtained is used to identify the circuit structure in the image of the liquid crystal panel microcircuit structure.
[0043] In the embodiment of the present application, after the above-mentioned S110 step, the initial model is trained in the first stage according to the first sample data set, and the model depth parameter and the model layer parameter of the first stage are determined, so as to update the parameters of the initial model. When the initial model is trained in the first stage, the number of the first sample data set used is small, and its purpose is to quickly obtain the depth value of the model and the approximate model layer parameter, so as to update the model depth value and model layer parameter in the initial model and obtain the intermediate model. In this step, the intermediate model is trained in the second stage using a larger number of second sample data sets to obtain a more accurate target model. Among them, the specific process of the second stage training is: iteratively train the intermediate model according to the second sample data set, and judge whether the output result of the intermediate model meets the expected effect. If it meets the expected effect, stop the iterative training and obtain the target model; if it does not meet the expected effect, fine-tune the model layer parameters until the output result of the intermediate model meets the expected effect and obtains the target model. Optionally, the method of fine-tuning the model layer parameters can be to make the model layer parameters orthogonal, which is the same as the determination process of the model layer parameters in the first stage.
[0044] The technical solution provided in this embodiment is to first perform a first-stage training on the initial model according to the first sample data set, determine the model depth parameters and the model layer parameters of the first stage, and update the parameters of the initial model according to the model depth parameters and the model layer parameters of the first stage to obtain an intermediate model; then perform a second-stage training on the intermediate model according to the second sample data set, determine the model layer parameters of the second stage, and update the parameters of the intermediate model according to the model layer parameters of the second stage to obtain a target model. The present application obtains a deep learning model that meets the expected requirements through two-stage model training, and can accurately identify the microcircuit structure of the liquid crystal panel. By executing the solution of this application, the accuracy of the target model can be made higher by performing two-stage training on the initial model.
[0045] Embodiment 2
[0046] Figure 2A A second flow chart of a model training method provided in Embodiment 2 of the present application; Figure 2B A first image schematic diagram of a model training method provided in Embodiment 2 of the present application; Figure 2C A second image schematic diagram of a model training method provided in Embodiment 2 of the present application; Figure 2D A third image schematic diagram of a model training method provided in Example 2 of the present application. The present application embodiment is optimized on the basis of the above-mentioned embodiment, and provides a detailed explanation of the process of determining a sample data set and obtaining a target image labeled with a circuit structure through the target model when training a target model to perform a task of calibrating a circuit structure in an image.
[0047] See also Figure 2A The method of this embodiment includes but is not limited to the following steps:
[0048] S210, extracting at least two image regions to be calibrated that contain liquid crystal panel microcircuit structures from the original circuit image.
[0049] In the embodiment of the present application, the image area to be calibrated is obtained by randomly extracting areas containing different features of the liquid crystal panel microcircuit structure from the original circuit images of different colors and different light intensities. Therefore, the final image area to be calibrated can contain different colors, different light intensities, different features, and different orientations (positions and angles). The advantage of such a setting is that there are more types of sample images, and the target model trained by the sample images can have a good recognition accuracy for images with different light intensities and small color differences.
[0050] S220 , preprocessing at least two image regions to be calibrated, and performing circuit structure calibration on the preprocessed images to be calibrated to obtain sample images, and adding the sample images to the first sample data set.
[0051] Among them, at least two image regions to be calibrated correspond to regions with different features and / or different orientations of the original circuit image.
[0052] In the embodiment of the present application, because the image to be calibrated contains images of different orientations and sizes, the image area to be calibrated is preprocessed, wherein the preprocessing includes adjusting the image size, rotating the angle, and normalizing. Then, the preprocessed image to be calibrated is manually calibrated for the circuit structure and added to the first sample data set as a sample image. Figure 2BIn the figure, the two left figures S1 and S3 are image areas to be calibrated containing the microcircuit structure of the liquid crystal panel extracted from the original circuit image, and the two right figures S2 and S4 are sample images obtained by preprocessing the two left figures S1 and S3 and performing circuit structure calibration, respectively.
[0053] S230. Perform a first-stage training on the initial model according to the first sample data set, determine the model depth parameters and the first-stage model layer parameters, and update the parameters of the initial model according to the model depth parameters and the first-stage model layer parameters to obtain an intermediate model.
[0054] S240, according to the second sample data set, perform a second stage training on the intermediate model, determine the model layer parameters of the second stage, and update the parameters of the intermediate model according to the model layer parameters of the second stage to obtain a target model; wherein the number of the first sample data set is less than the number of the second sample data set. Optionally, the first sample data set and the second sample data set are image sets of liquid crystal panel microcircuit structures.
[0055] S250, inputting the image to be processed including the microcircuit structure of the liquid crystal panel into the target model to obtain a target image with the circuit structure annotated.
[0056] In the embodiment of the present application, after the above steps, the initial model is trained in two stages to obtain the target model. The image to be processed containing the microcircuit structure of the liquid crystal panel is input into the target model, and the target model can recognize the microcircuit structure in the image and output the target image with the circuit structure marked. Figure 2C , 2D In the figure, S5 and S8 are the output images of the target model, S6 and S9 are the input images of the target model, and S7 and S10 are the desired output images. Figure 2C The target model in is the untrained initial model. It can be seen that the output image of the target model is very blurry and the effect is very poor. Figure 2D The target model in is the target model obtained through the above steps, and Figure 2C By comparison, it can be seen that the output image of the target model is very good and close to the expected output image.
[0057] The technical solution provided by this embodiment is to extract the image area to be calibrated from the original circuit image, and pre-process the image area to be calibrated; then calibrate the circuit structure of the pre-processed image to be calibrated to obtain a sample image, and add the sample image to the first sample data set; perform the first stage training on the initial model according to the first sample data set, determine the model depth parameter and the model layer parameter of the first stage, and update the parameters of the initial model to obtain an intermediate model; perform the second stage training on the intermediate model according to the second sample data set, determine the model layer parameter of the second stage, and update the parameters of the intermediate model to obtain a target model; finally, input the image to be processed into the target model to obtain a target image marked with a circuit structure. This application randomly extracts the image area to be calibrated from the original circuit image, so that the types of sample images are more, and the target model trained by the sample image can have a good recognition accuracy for images with different light intensities and small color differences. This application solution obtains the target model by training the initial model in two stages, which solves the cost of manual calibration and division of circuit structures required in the prior art. The implementation of this application solution can more accurately identify the microcircuit structure in the liquid crystal panel.
[0058] Embodiment 3
[0059] Figure 3 A schematic diagram of the structure of a model training device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the device 300 may include:
[0060] The first training module 310 is used to perform a first stage training on the initial model according to the first sample data set, determine the model depth parameters and the model layer parameters of the first stage, and update the parameters of the initial model according to the model depth parameters and the model layer parameters of the first stage to obtain an intermediate model.
[0061] The second training module 320 is used to perform a second stage of training on the intermediate model based on the second sample data set, determine the model layer parameters of the second stage, and update the parameters of the intermediate model based on the model layer parameters of the second stage to obtain a target model; wherein the number of the first sample data set is less than the number of the second sample data set.
[0062] Furthermore, the first training module 310 can be specifically used to: perform model depth training on the initial model according to the first sample data set to determine the model depth parameters, and update the model depth of the initial model according to the model depth parameters to obtain an initial intermediate model; perform layer parameter training on the initial intermediate model according to the first sample data set to determine the model layer parameters of the first stage, and update the model layer parameters of the initial intermediate model according to the model layer parameters of the first stage to obtain a final intermediate model.
[0063] Furthermore, the first training module 310 can be specifically used to: use the first sample data set to perform model depth iterative training on the initial model to obtain the model depth corresponding to each iterative training; use test data to test the initial model after each iterative training to determine the model error rate of each iterative training; and use the model depth corresponding to the iterative training with the lowest error rate as the model depth parameter.
[0064] Furthermore, the first training module 310 can be specifically used to: determine the orthogonal table of model layer parameters according to the types of model layer parameters; perform layer parameter training on the initial intermediate model according to the first sample data set and the orthogonality of the model layer parameters to determine the model layer parameters of the first stage.
[0065] Optionally, at least two image areas to be calibrated that contain microcircuit structures of the liquid crystal panel are extracted from the original circuit image; the at least two image areas to be calibrated are preprocessed, and the circuit structure calibration is performed on the preprocessed images to be calibrated to obtain a sample image, and the sample image is added to the first sample data set.
[0066] Optionally, the first sample data set and the second sample data set are image sets of liquid crystal panel microcircuit structures; and the target model is used to identify circuit structures in the images of the liquid crystal panel microcircuit structures.
[0067] Optionally, at least two image regions to be calibrated correspond to regions with different features and / or different orientations of the original circuit image.
[0068] Optionally, the image to be processed containing the microcircuit structure of the liquid crystal panel is input into the target model to obtain a target image marked with the circuit structure.
[0069] The model training device provided in this embodiment can be applied to the model training method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0070] Embodiment 4
[0071] Figure 4A schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention, Figure 4 A block diagram of an exemplary electronic device suitable for implementing an exemplary embodiment of the present invention is shown. Figure 4 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention. The electronic device can typically be a smart phone, a tablet computer, a laptop computer, a vehicle terminal, a wearable device, etc.
[0072] like Figure 4 As shown, the electronic device 400 is in the form of a general purpose computing device. The components of the electronic device 400 may include, but are not limited to: one or more processors or processing units 416, a memory 428, and a bus 418 connecting different system components (including the memory 428 and the processing unit 416).
[0073] Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0074] The electronic device 400 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 400, including volatile and non-volatile media, removable and non-removable media.
[0075] The memory 428 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. The electronic device 400 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 434 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 418 via one or more data medium interfaces. Memory 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of each embodiment of the present invention.
[0076] A program / utility 440 having a set (at least one) of program modules 442 may be stored, for example, in memory 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 442 generally perform the functions and / or methods of the embodiments described in the embodiments of the present invention.
[0077] The electronic device 400 may also communicate with one or more external devices 414 (e.g., keyboards, pointing devices, displays 424, etc.), one or more devices that enable a user to interact with the electronic device 400, and / or any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 422. Furthermore, the electronic device 400 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 420. Figure 4 As shown, the network adapter 420 communicates with other modules of the electronic device 400 via the bus 418. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0078] The processing unit 416 executes various functional applications and data processing by running the programs stored in the memory 428, such as implementing the product supervision method provided by any embodiment of the present invention.
[0079] Embodiment 5
[0080] Embodiment 5 of the present invention further provides a computer-readable storage medium on which a computer program (or computer-executable instructions) is stored. When the program is executed by a processor, it can be used to execute the product supervision method provided in any of the above embodiments of the present invention.
[0081] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0082] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0083] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0084] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0085] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A model training method, characterized in that: The method comprises: According to the first sample data set, the initial model is trained in the first stage to determine the model depth parameter and the model layer parameter of the first stage, and the initial model is updated according to the model depth parameter and the model layer parameter of the first stage to obtain an intermediate model, including: using the training data set to perform model depth iterative training on the initial model to obtain the model depth corresponding to each iterative training; using the test data set to test the initial model after each iterative training to determine the model error rate of each iterative training; using the model depth corresponding to the iterative training with the lowest error rate as the model depth parameter, wherein the first sample data set contains the training data set and the test data set; According to the second sample data set, the intermediate model is trained in the second stage to determine the model layer parameters of the second stage, and the parameters of the intermediate model are updated according to the model layer parameters of the second stage to obtain a target model; wherein the number of the first sample data sets is less than the number of the second sample data sets, the first sample data sets and the second sample data sets are image sets of liquid crystal panel microcircuit structures, the target model is used to identify the circuit structure in the image of the liquid crystal panel microcircuit structure, and the intermediate model is used to perform the task of calibrating the circuit structure in the image.
2. The method according to claim 1, characterized in that The method further comprises: performing a first-stage training on the initial model according to the first sample data set, determining a model depth parameter and a model layer parameter of the first stage, and updating parameters of the initial model according to the model depth parameter and the model layer parameter of the first stage to obtain an intermediate model. According to the model depth parameter, the model depth of the initial model is updated to obtain an initial intermediate model; According to the first sample data set, the layer parameter training of the initial intermediate model is performed to determine the model layer parameters of the first stage, and according to the model layer parameters of the first stage, the model layer parameters of the initial intermediate model are updated to obtain the final intermediate model.
3. The method according to claim 2, characterized in that The step of training the initial intermediate model layer parameters according to the first sample data set to determine the model layer parameters of the first stage includes: According to the types of model layer parameters, an orthogonal table of model layer parameters is determined; According to the orthogonality between the first sample data set and the model layer parameters, the layer parameters of the initial intermediate model are trained to determine the model layer parameters of the first stage.
4. The method according to claim 1, characterized in that: Also includes: Extracting at least two image regions to be calibrated containing microcircuit structures of the liquid crystal panel from the original circuit image; Preprocessing is performed on at least two image regions to be calibrated, and circuit structure calibration is performed on the preprocessed images to be calibrated to obtain sample images, and the sample images are added to the first sample data set.
5. The method according to claim 4, characterized in that At least two image regions to be calibrated correspond to regions with different features and / or different orientations of the original circuit image.
6. The method according to claim 4, characterized in that Also includes: The image to be processed containing the microcircuit structure of the liquid crystal panel is input into the target model to obtain a target image with the circuit structure annotated.
7. A model training device, characterized in that: The device comprises: A first training module is used to perform a first-stage training on the initial model according to the first sample data set, determine a model depth parameter and a model layer parameter of the first stage, and update the parameters of the initial model according to the model depth parameter and the model layer parameter of the first stage to obtain an intermediate model; A second training module is used to perform a second-stage training on the intermediate model according to a second sample data set, determine the model layer parameters of the second stage, and update the parameters of the intermediate model according to the model layer parameters of the second stage to obtain a target model; wherein the number of the first sample data set is less than the number of the second sample data set; The first training module is specifically used to use the training data set to perform iterative model depth training on the initial model to obtain the model depth corresponding to each iterative training; use the test data set to test the initial model after each iterative training to determine the model error rate of each iterative training; and use the model depth corresponding to the iterative training with the lowest error rate as the model depth parameter, wherein the first sample data set contains the training data set and the test data set, the first sample data set and the second sample data set are image sets of liquid crystal panel microcircuit structures, the target model is used to identify the circuit structure in the image of the liquid crystal panel microcircuit structure, and the intermediate model is used to perform the task of calibrating the circuit structure in the image.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the model training method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the model training method as described in any one of claims 1 to 6 is implemented.
