Training method, device and computer storage medium for object recognition model
By adjusting the training set of the object recognition model, adding missed and missed data, and iteratively training the model, the problem of difficult to balance the model accuracy and complexity in the existing technology is solved, and accuracy improvement and complexity control are achieved.
Patent Information
- Application Number
- CN202110272497.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-12
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-03-12
AI Technical Summary
While improving the accuracy of object recognition models, the prior art leads to a sharp increase in model complexity, making it difficult to balance accuracy and complexity.
By obtaining the training set and test set of object data, the training set is used to train the object to identify the model, and the test set is used to test the model, adjust the training set according to the recall threshold, and add the missed test object box and the wrongly detected test background box to iterate the training model.
Without increasing the complexity of the model, the accuracy of the object recognition model is effectively improved, and the test results of the integration of the original and mirror images can be evaluated more accurately.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of object recognition, and in particular to a training method, device and computer storage medium for an object recognition model. Background Art
[0002] Object recognition, represented by face recognition, is the most widely used technology in the field of computer vision and is the basic technology in fields such as autonomous driving, smart payment, security monitoring, and smart home. How to improve the accuracy of object recognition models has always been a goal pursued by the industry.
[0003] The industry often optimizes object recognition models by increasing model expressiveness, optimizing loss functions, adding key points as supervisory information, etc. However, these methods dramatically increase the complexity of the model while improving model accuracy. Summary of the invention
[0004] The present invention provides a training method, device and computer storage medium for an object recognition model, so as to solve the problem in the prior art that while the accuracy of the model is improved, the complexity of the model increases sharply.
[0005] To solve the above technical problems, a technical solution adopted by the present invention is a training method for an object recognition model. The method includes: obtaining an object data training set and an object data test set, the object data training set includes a training background and a labeled training object frame, and the object data test set includes a test background and a labeled test object frame; using the object data training set to train the object recognition model; using the object data test set to test the object recognition model and obtain the corresponding recall rate, missed test object frames, and falsely detected test background frames; and in response to the recall rate being less than a recall rate threshold, adding the missed test object frame to the object data training set as a labeled training object frame, adding the falsely detected test background frame to the object data training set as a training background, and returning to the step of training the object recognition model using the object data training set to perform iterative training.
[0006] To solve the above technical problems, another technical solution adopted by the present invention is a training device for an object recognition model. The device includes an acquisition module, a training module and a testing module. The acquisition module is configured to acquire an object data training set and an object data test set, the object data training set includes a labeled training object frame and a training background, and the object data test set includes a labeled test object frame and a test background. The training module is configured to train the object recognition model using the object data training set. The testing module is configured to test the object recognition model using the object data test set and obtain the corresponding recall rate, missed test object frame and falsely detected test background frame. In response to the recall rate being less than the recall rate threshold, the missed test object frame is added to the object data training set as a training object frame, the falsely detected test background frame is added to the object data training set as a training background, and the step of training the object recognition model using the object data training set is returned to perform iterative training.
[0007] To solve the above technical problem, another technical solution adopted by the present invention is a training device for an object recognition model. The device includes a processor and a memory. A computer program is stored in the memory. The processor is used to execute the computer program to implement the above training method for the object recognition model.
[0008] To solve the above technical problem, another technical solution adopted by the present invention is a non-transitory computer storage medium. The non-transitory computer storage medium stores a computer program. When the computer program is executed, the above training method for the object recognition model is implemented.
[0009] Different from the prior art, the present invention achieves the technical effect of effectively improving the model accuracy without increasing the complexity of the object recognition model through the above-mentioned method, device and storage medium. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0011] Figure 1 It is a flow chart of the training method for the object recognition model of the present invention;
[0012] Figure 2 An example image containing a missed test object box in the object data test set is shown;
[0013] Figure 3 is a schematic diagram of the present invention performing image enhancement processing on a missed test object frame;
[0014] Figure 4 An example image showing a test background box containing a false detection in the object data test set;
[0015] Figure 5 is a schematic diagram of the present invention performing image enhancement processing on a falsely detected test background frame;
[0016] Figure 6 is a schematic diagram of a method for measuring the accuracy of an object recognition model of the present invention;
[0017] Figure 7 It is a structural schematic diagram of an embodiment of a training device for an object recognition model of the present invention;
[0018] Figure 8 is a structural schematic diagram of another embodiment of a training device for an object recognition model of the present invention;
[0019] Fig. 9 It is a structural schematic diagram of an embodiment of a non-transitory computer storage medium of the present invention. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] In the following, face recognition is used as an example to describe the object recognition of the present application. However, those skilled in the art should understand that the object recognition of the present application is not limited to face recognition, but may include various object recognitions such as animal recognition, plant recognition, text recognition, scene type recognition, etc.
[0022] Please refer to Figure 1 , Figure 1 1 is a flow chart of an embodiment of a method for training an object recognition model of the present invention. The method for training an object recognition model of this embodiment includes the following steps.
[0023] Step S11, obtaining an object data training set and an object data test set. Taking face recognition as an example, step S11 includes collecting images containing faces and annotating faces to obtain an object data set.
[0024] Optionally, the collected images containing faces may come from a public face database, such as the MIT face database, the Yale face database B, the PIE face database, etc.
[0025] Optionally, users can use their own image database or collect images containing faces from channels such as the Internet and annotate the faces therein to create a face dataset.
[0026] Optionally, the scene containing images of human faces needs to meet diverse requirements. These images containing human faces may optionally include images under different conditions such as regions, weather, lighting, time, etc., to enhance the robustness of the trained model.
[0027] Optionally, do not label faces that are too small in the image (for example, faces with pixels smaller than 15*15 are not labeled), faces with large-angle deflection (for example, faces with deflection angles greater than 30 degrees in any direction are not labeled), and faces that are occluded by a large area. Sufficiently large frontal unobstructed face images help the trained object recognition model learn more abstract facial features, thereby improving the expressiveness of the object recognition model.
[0028] For example, a user can obtain an image of a scene such as a beach, a park, or a bar, and mark the faces that meet the conditions in the image using a rectangular frame that tightly surrounds the face. The rectangular frame may also be referred to as a face frame or an object frame hereinafter. In the field of object recognition, the marked face frame is usually called the "foreground", and the unmarked part of the image is usually called the "background". The foreground is usually the object to be recognized, and the background is not the object to be recognized.
[0029] As described above, the annotated images constitute the object dataset.
[0030] Optionally, images that do not contain faces at all can be directly incorporated into the object dataset as background. Optionally, images that do not contain faces that meet the annotation conditions in terms of size, posture, occlusion, etc. can also be directly incorporated into the object dataset as background.
[0031] Step S11 also includes: dividing the object data set into an object data training set and an object data test set.
[0032] The object data training set is used to train the object recognition model. The object data test set is used to verify the effectiveness of the trained object recognition model. The following uses the face recognition model as an example to illustrate the object recognition model.
[0033] Optionally, the object data set is divided into an object data training set and an object data test set in a ratio of 7:3. Optionally, the object data set is divided into an object data training set and an object data test set in another ratio, such as 8:2. The object boxes in the object data training set may be referred to as labeled training object boxes. The object boxes in the object data test set may be referred to as labeled test object boxes. The background in the object data training set may be referred to as a training background. The background in the object data test set may be referred to as a test background.
[0034] Step S12: training the object recognition model using the object data training set.
[0035] The object recognition model is generally a neural network model, such as a regional convolutional neural network (RCNN), FASTER-RCNN, etc. The object recognition model in the present application may also be other types of models, which is not limited in the present application.
[0036] Optionally, the object recognition model used in step S12 may be a pre-trained object recognition model. For example, the user may select an object recognition model that has been trained in other ways. Optionally, the user may train several different object recognition models using other training data sets, and select the object recognition model with the best performance for training using the training method of the present invention. The best performance may be, for example, the best accuracy, or the best comprehensive performance that weighs model accuracy, model complexity, etc.
[0037] Optionally, an object recognition model based on FASTER-RCNN is used as an example for illustration. Object recognition based on the object recognition model of FASTER-RCNN includes four basic functions or steps: candidate region generation, feature extraction, target classification and position refinement. Specifically, after the image to be recognized is input into the object recognition model, the object recognition model first divides the image into multiple candidate regions through the candidate region generation function. The object recognition model then extracts the features of these candidate regions through the feature extraction function. The object recognition model then classifies the candidate regions according to the above-extracted features through the target classification function, which in face recognition is to determine whether the candidate region is a region containing a face. Finally, the object recognition model integrates the classification results of the above-mentioned candidate regions through the position refinement function and outputs the optimal object region coordinates (or a rectangular frame surrounding the object).
[0038] In the training process of the object recognition model based on FASTER-RCNN, the images in the object data training set and the training object box positions annotated in the images are input into the object recognition model. The object recognition model performs object recognition as described above, compares the identified training object box position (i.e., the above-mentioned object region coordinates or rectangular box) with the annotated training object box position, and calculates the difference (also called loss) between the two positions. The object recognition model then updates the parameters of the object recognition model based on the loss with the goal of minimizing the loss. This process is repeated to complete the training of the object recognition model.
[0039] Optionally, step S12 includes, when the loss no longer decreases or the loss is less than a threshold set by the user, stopping the training of the object recognition model. This application does not impose any limitation on this.
[0040] Step S13, using the object data test set to test the object recognition model and obtain the corresponding recall rate, missed test object frames and falsely detected test background frames.
[0041] Specifically, the object recognition model trained in step S12 is used to perform object recognition on the images in the object data test set.
[0042] Optionally, taking face recognition as an example, the object recognition model recognizes faces in images in the object data test set (hereinafter referred to as test images), and outputs a rectangular box or a rectangular box position surrounding the suspected face. Optionally, the object recognition model also gives a score (or confidence) for each rectangular box. The score indicates the possibility that the object recognition model believes that the image area in the rectangular box is a face area. For example, if the object recognition model outputs a rectangular box with a score of 0.8, it indicates that the object recognition model believes that there is an 80% probability that the image area in the rectangular box is a face image.
[0043] In step S13, the rectangular frame identified by the object recognition model may correspond to the annotated test object frame. In other words, the image area in the rectangular frame identified by the object recognition model is the face area surrounded by the annotated test object frame. Obviously, the rectangular frame identified by the object recognition model does not necessarily completely overlap with the annotated test object frame.
[0044] For a labeled test object box in the object data test set, if a rectangular box recognized by the object recognition model corresponds to the labeled test object box, and the score of the rectangular box is not less than a first score threshold, then the labeled test object box is successfully recognized by the object recognition model.
[0045] If the object recognition model does not recognize a rectangular box corresponding to the annotated test object box, or although the rectangular box recognized by the object recognition model corresponds to the annotated test object box, the score of the rectangular box is less than the first score threshold, the annotated test object box is not successfully recognized by the object recognition model. That is, the annotated test object box is missed, and the annotated test object box is called a missed test object box.
[0046] The first score threshold may be optionally 0.9 or higher. This application does not impose any restrictions on this. When the first score threshold is 0.9, if the object recognition model identifies a rectangular box corresponding to a labeled test object box, and the score of the rectangular box is greater than or equal to 0.9, that is, the object recognition model believes that the labeled test object box has a probability greater than or equal to 90% of being the object to be recognized, then the labeled test object box is successfully recognized by the object recognition model.
[0047] In step S13, the rectangular frame identified by the object recognition model may also correspond to the test background in the object data test set. That is, the rectangular frame identified by the object recognition model surrounds the background in the image.
[0048] If the rectangular frame identified by the object recognition model corresponds to the test background in the object data test set, and the score of the rectangular frame is higher than the second score threshold, the rectangular frame is called a falsely detected test background frame. In step S13, a falsely detected test background frame is also obtained.
[0049] The second score threshold is less than the above-mentioned first score threshold. The second score threshold can be optionally 0.5. This application does not impose any restrictions on this. When the second score threshold is 0.5, if the object recognition model recognizes a rectangular box corresponding to the test background, and the score of the rectangular box is higher than 0.5, that is, the object recognition model believes that the test background has a probability greater than 50% of being the object to be recognized, then the test background is incorrectly recognized by the object recognition model.
[0050] In the field of object recognition, a concept called recall is often used. It represents the ratio of the labeled test object frames correctly identified by the model to all labeled test object frames in the identified data set, also known as recall rate. Taking face recognition as an example, if there are N labeled face frames in the object data test set, and the object recognition model correctly identifies M of them, then the current recall rate R is 召回 M / N*100%. Optionally, the marked face frame being correctly recognized means that the score of the rectangular frame corresponding to the marked face frame recognized by the object recognition model is higher than the first score threshold.
[0051] In step S13, the recall rate R corresponding to the current recognition step is also obtained. 召回 .
[0052] Step S14, determine the recall rate R 召回 Is it greater than the recall rate threshold T? 召回 . In response to the recall rate R 召回 Less than or equal to the recall threshold T 召回 , the method proceeds to step S15 to continue training the object recognition model. 召回 Greater than the recall threshold T 召回 , the method proceeds to step S16, stopping the training of the object recognition model. Recall rate threshold T 召回 It can be 98%, 99%, etc. Users can set their own recall rate threshold T according to actual needs. 召回 .
[0053] Step S15, adding the missed test object frame to the object data training set as the labeled training object frame, adding the falsely detected test background frame to the object data training set as the training background, and then returning to step S12 to iteratively train the object recognition model.
[0054] Optionally, expand the boundaries of the missed test object boxes and add them to the object data training set as labeled training object boxes. Figure 2 , Figure 2 An image I in the object data test set is shown 测试1 Image I 测试1 Includes a missed test object box B 漏检 The missed test object box B 漏检 The size of is, for example, S1*S2 pixels. 漏检 It is often the smallest rectangular box that surrounds the recognition object, such as a face. Therefore, its boundaries need to be expanded to leave space for the object recognition model to recognize. Figure 2 As shown, the missed test object box B 漏检 Expand in at least one direction to obtain the test object box B that contains the missed detection 漏检 Expansion box B 扩充 . For the missed test object box B 漏检 The rules for expanding the border can be preset, and this application does not limit this. Specifically, this application does not limit the expansion frame B 扩充 The original missed test object box B 漏检 The size ratio relationship, expansion box B 扩充 The shape and direction of 漏检 Expansion box B 扩充 It is then used as the new training image I 训练 Add to the object data training set. Expand box B 扩充 The missed test object box B 漏检 Correspondingly, it becomes a labeled training object box in the object data training set. Optionally, from image I 测试1 Delete expansion box B 扩充 Optionally, image I 测试1 Middle and expansion box B 扩充 The corresponding area can be replaced by other background pixels. 测试1 Middle and expansion box B 扩充 The corresponding area may be replaced by a solid color area.
[0055] Optionally, for the training image I 训练 , that is, expand frame B 扩充Perform image enhancement processing. The so-called image enhancement processing includes at least one of flipping, blurring, color change, brightness change, etc., or a combination thereof. The image enhancement processing process can be automatically performed in batches using a pre-set module, and this application does not limit this. Figure 3 , Figure 3 The image I 训练 An example of image enhancement processing. Figure 3 In the training image I 训练 The image is flipped to obtain the training image I 训练1 ; For training image I 训练 The image is blurred to obtain the training image I 训练2 For training image I 训练 After color change processing, the training image I is obtained 训练3 For training image I 训练 The image brightness change is processed to obtain the training image I 训练4 These new training images I 训练1 ,I 训练2 ,I 训练3 ,I 训练4 are added to the object data training set. And these new training images I 训练1 ,I 训练2 ,I 训练3 ,I 训练4 Each includes a test object frame B that is missing from the test 漏检 The corresponding annotated training object box.
[0056] Optionally, the falsely detected test background box is expanded and added to the object data training set as the training background. Figure 4 , Figure 4 Another image I in the object data test set is shown 测试2 Image I 测试2 Including a falsely detected test background frame B 误检 The falsely detected test background frame B 误检 Surround a test background area, Figure 4 The image in the figure is a horse head, but it is mistakenly identified by the object recognition model as a human face with a high enough probability. 误检 The size of is, for example, S3*S4 pixels. Optionally, the falsely detected test background frame B 误检 The boundary of is expanded to expand the recognition space of the object recognition model. Figure 4 As shown, the misdetected test background frame B 误检 Expand in at least one direction to obtain the test background frame B containing the false detection 误检 Expanded background frame B 背景扩充 . For the false detection test background box B误检 The rules for expanding the border can be preset, and this application does not limit this. Specifically, this application does not limit the expansion of the background frame B 背景扩充 The original false detection test background frame B 误检 The size ratio relationship is to expand the background frame B 背景扩充 The shape and direction of the test background box B can be included as long as it can contain the false detection 误检 Expand background frame B 背景扩充 It is then used as the new background image I 背景 Add to the object data training set. Expand the background box B 背景扩充 The falsely detected test background box B 误检 It becomes a training background in the object data training set accordingly. 测试2 Delete the extended background frame B 背景扩充 Optionally, image I 测试2 Center and expand background frame B 背景扩充 The corresponding area can be replaced by other background pixels. 测试2 Center and expand background frame B 背景扩充 The corresponding area may be replaced by a solid color area.
[0057] Optionally, for the background image I 背景 , that is, expand the background frame B 背景扩充 Perform image enhancement processing. The so-called image enhancement processing includes at least one of flipping, blurring, color change, brightness change, etc., or a combination thereof. The image enhancement processing process can be automatically performed in batches using a pre-set module, and this application does not limit this. Figure 5 , Figure 5 The image I 背景 An example of image enhancement processing. Figure 5 In the background image I 背景 The image is flipped to obtain the background image I 背景1 ; For background image I 背景 The image is blurred to obtain the background image I 背景2 . For background image I 背景 After color change processing, the background image I is obtained. 背景3 . For background image I 背景 The image brightness change processing is performed to obtain the background image I 背景4 These new background images I 背景1 ,I 背景2 ,I 背景3 ,I 背景4 are added to the object data training set. And these new background images I 背景1 ,I 背景2 ,I背景3 ,I 背景4 Each includes a test background frame B 误检 The corresponding training background.
[0058] After step S15, the object recognition model training method returns to step S12 to iteratively train the object recognition model.
[0059] By adding missed test object frames to the object data training set as labeled training objects, adding misdetected test background frames to the object data training set as training background and iteratively training the object recognition model, the present application can effectively improve the accuracy of the object recognition model without increasing the complexity of the model.
[0060] As described above, in step S14, in response to the recall rate R 召回 Greater than the recall threshold T 召回 , the object recognition model training method can terminate the object recognition model training and output the trained object recognition model.
[0061] Optionally, the object recognition model training method may proceed to step S16.
[0062] Step S16: Measuring the accuracy of the object recognition model. Optionally, the object recognition model recognizes the first object frame and the second object frame that is a mirror image of the first object frame, respectively, to obtain the first recognition frame and the second recognition frame, respectively, and uses the intersection and union ratio of the first recognition frame and the second recognition frame as the accuracy of the object recognition model.
[0063] refer to Figure 6 , Figure 6 A method for measuring the accuracy of an object recognition model is shown. Figure 6 As shown, the first image I1 includes a first object frame B 对象1 The second image I2 is a mirror image of the first image I1. Accordingly, the second image I2 includes the first object frame B 对象1 The second object frame B is a mirror image 对象2 The object recognition model recognizes the first image I1 and the second image I2, and obtains the first recognition box B as shown in the figure 识别1 and the second recognition frame B 识别2 .like Figure 6 As shown in the lower part of 识别1 The first object frame B 对象1 and with a second identification frame B 识别2 The second object frame B 对象2 Completely overlap, calculate the first recognition box B at this time 识别1 and the second recognition frame B 识别2 The intersection-over-union ratio is used as the accuracy of the object recognition model.
[0064] First identification frame B 识别1 and the second recognition frame B 识别2 The intersection-and-union ratio is the first recognition box B 识别1 and the second recognition frame B 识别2 The ratio between the intersection and the union of . The intersection is the ratio between the intersection and the union of . 识别1 and the second recognition frame B 识别2 The part covered by both. The union is the part covered by the first recognition box B 识别1 and the second recognition frame B 识别2 If the object recognition model accurately identifies the first object box B 对象1 and the second object frame B 对象2 , then the first recognition box B 识别1 and the second recognition frame B 识别2 The intersection and union of are exactly the same, and the accuracy of the object recognition model is 1. On the contrary, as shown in the figure, the first recognition box B 识别1 and the second recognition frame B 识别2 They do not completely overlap, their intersection is smaller than their union, the resulting intersection-union ratio is less than 1, and the corresponding accuracy of the object recognition model is also less than 1.
[0065] Through the above step S16, the object recognition model training method of the present invention integrates the test results of the original image and the mirror image, thereby allowing a more accurate evaluation of the accuracy of the object recognition model.
[0066] like Figure 7 As shown, the present application also provides a training device 300 for an object recognition model. The training device 300 includes an acquisition module 31, a training module 32, a testing module 33 and an accuracy measurement module 34.
[0067] Wherein, the acquisition module 31 is configured to acquire an object data training set and an object data test set. The object data training set includes annotated training object frames and training backgrounds, and the object data test set includes annotated test object frames and test backgrounds. The training module 32 is configured to train an object recognition model using the object data training set. The testing module 33 is configured to test the object recognition model using the object data test set and obtain the corresponding recall rate, missed test object frames, and falsely detected test background frames. Wherein, in response to the recall rate being less than the recall rate threshold, the missed test object frames are added to the object data training set as training object frames, the falsely detected test background frames are added to the object data training set as training backgrounds, and the step of training the object recognition model using the object data training set is returned. The accuracy measurement module 34 is configured to measure the accuracy of the object recognition model.
[0068] The above-mentioned training method for the object recognition model is generally implemented by a training device for the object recognition model, so the present invention also proposes a training device for the object recognition model. Figure 8 , Figure 8 1 is a schematic diagram of a structure of an embodiment of a training device for an object recognition model of the present invention. The training device 100 for an object recognition model of this embodiment includes a processor 12 and a memory 11; the memory 11 stores a computer program, and the processor 12 is used to execute the computer program to implement the steps of the training method for an object recognition model.
[0069] The logical process of the training method for the object recognition model is presented in the form of a computer program. In terms of the computer program, if it is sold or used as an independent software product, it can be stored in a computer storage medium. Therefore, the present invention proposes a non-transitory computer storage medium. Fig. 9 , Fig. 9 2 is a schematic diagram of the structure of an embodiment of a non-transitory computer storage medium of the present invention. In this embodiment, a non-transitory computer storage medium 200 stores a computer program 21, and the above method is implemented when the computer program is executed by a processor.
[0070] The non-transitory computer storage medium 200 may specifically be a medium that can store computer programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, or may also be a server storing the computer program, which may send the stored computer program to other devices for execution, or may also execute the stored computer program itself. From a physical entity point of view, the computer storage medium 200 may be a combination of multiple entities, such as multiple servers, a server plus a memory, or a memory plus a mobile hard disk, and other combinations.
[0071] In summary, the present invention adds the missed test object frame to the object data training set as the training object frame when testing the object recognition model, and adds the misdetected test background frame to the object data training set as the training background to iteratively train the object recognition model, thereby achieving the technical effect of effectively improving the model accuracy without increasing the complexity of the object recognition model. Furthermore, the present invention allows for a more accurate evaluation of the accuracy of the object recognition model by integrating the test results of the original image and the mirror image.
[0072] The above description is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for training an object recognition model, the object recognition model being applied to an image, characterized in that: The method comprises: Acquire an object data training set and an object data test set, wherein the object data training set includes a training background and an annotated training object frame, and the object data test set includes a test background and an annotated test object frame; Training the object recognition model using the object data training set; Using the object data test set to test the object recognition model and obtain corresponding recall rate, missed test object frames, and falsely detected test background frames; In response to the recall rate being less than a recall rate threshold, adding the missed test object frame to the object data training set as the labeled training object frame, adding the falsely detected test background frame to the object data training set as the training background, and returning to the step of training the object recognition model using the object data training set to perform iterative training; In response to the recall being greater than the recall threshold, measuring the accuracy of the object recognition model; Wherein, in response to the recall rate being greater than the recall rate threshold, the step of measuring the accuracy of the object recognition model includes: using the object recognition model to identify a first object frame and a second object frame that is a mirror image of the first object frame, respectively obtaining a first recognition frame corresponding to the first object frame and a second recognition frame corresponding to the second object frame, and taking the intersection and union ratio of the first recognition frame and the second recognition frame as the accuracy of the object recognition model.
2. The method according to claim 1, characterized in that: In response to the recall rate being less than a recall rate threshold, the step of adding the missed test object frame to the object data training set as the labeled training object frame, adding the falsely detected test background frame to the object data training set as the training background, and returning to the step of training the object recognition model using the object data training set comprises: Performing image enhancement on the missed test object frame to obtain a corresponding image enhanced object frame, and adding the image enhanced object frame to the object data training set as the labeled training object frame; Perform image enhancement on the falsely detected test background frame to obtain a corresponding image enhanced background, and add the image enhanced background to the object data training set as the training background.
3. The method according to claim 2, characterized in that The image enhancement includes at least one of image flipping, image blurring, image color change, image brightness change, or a combination thereof.
4. The method according to claim 1, characterized in that: In response to the recall rate being less than a recall rate threshold, the step of adding the missed test object frame to the object data training set as the labeled training object frame, adding the falsely detected test background frame to the object data training set as the training background, and returning to the step of training the object recognition model using the object data training set comprises: The missed-detected test object frame and the false-detected test background frame are removed from the object data test set.
5. The method according to claim 1, characterized in that In response to the recall rate being less than a recall rate threshold, the step of adding the missed test object frame to the object data training set as the labeled training object frame, adding the falsely detected test background frame to the object data training set as the training background, and returning to the step of training the object recognition model using the object data training set comprises: The missed test object frame is expanded with its boundary and added to the object data training set as the labeled training object frame, and the falsely detected test background frame is expanded with its boundary and added to the object data training set as the training background.
6. A training device for an object recognition model, the object recognition model being applied to an image, characterized in that: The device comprises: An acquisition module configured to acquire an object data training set and an object data test set, wherein the object data training set includes a labeled training object frame and a training background, and the object data test set includes a labeled test object frame and a test background; a training module configured to train an object recognition model using the object data training set; a testing module configured to test the object recognition model using the object data test set and obtain corresponding recall rate, missed test object frames and falsely detected test background frames, In which, in response to the recall rate being less than the recall rate threshold, the missed test object frame is added to the object data training set as a training object frame, the falsely detected test background frame is added to the object data training set as a training background, and the step of training the object recognition model using the object data training set is returned to perform iterative training, wherein, in response to the recall rate being greater than the recall rate threshold, measuring the accuracy of the object recognition model, Wherein, in response to the recall rate being greater than the recall rate threshold, measuring the accuracy of the object recognition model includes: using the object recognition model to identify a first object frame and a second object frame that is a mirror image of the first object frame, and obtaining a first recognition frame corresponding to the first object frame and a second recognition frame corresponding to the second object frame, respectively, and using the intersection and union ratio of the first recognition frame and the second recognition frame as the accuracy of the object recognition model.
7. A training device for an object recognition model, the object recognition model being applied to an image, characterized in that: The device comprises a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the method according to any one of claims 1 to 5.
8. A non-transitory computer storage medium, characterized in that The non-transitory computer storage medium stores a computer program, and when the computer program is executed, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Target detection model training method based on convolutional neural network, equipment and medium
CN111079638A
Power transmission line insulator defect analysis method
CN112184746A