Data augmentation method, system and human body detection model for improving human body detection rate

By mapping and perspective transformation augmenting processing of non-resistive human images, a diversified data set is generated, which solves the problem of low detection rate of human body detection models on the back, and achieves higher detection rate and robustness.

CN111914723BActive Publication Date: 2024-12-17REMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010733256.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-27
Publication Date
2024-12-17
Estimated Expiration
2040-07-27

AI Technical Summary

Technical Problem

The existing human detection model has a low detection rate of the human body on the back, and due to the insufficient number of human body images on the back, it is difficult to achieve effective improvement in data augmentation.

Method used

By performing map augmentation processing on non-residual human images, the proportion of hair features in the annotation box is increased, and combined with perspective transformation augmentation processing, a diverse training data set is generated to improve the model's detection ability of back human bodies.

Benefits of technology

The detection rate and robustness of the human body detection model to the back of the human body is significantly improved, ensuring that the model has higher detection performance on a diverse data set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111914723B_ABST
    Figure CN111914723B_ABST
Patent Text Reader

Abstract

The present invention discloses a data augmentation method, system and human body detection model for improving the detection rate of human body. The data augmentation method comprises: A. acquiring an image from a human body image database in sequence; B. randomly generating a probability value if the acquired image is a non-back human body image; C. performing a map augmentation process on the acquired image if the generated probability value is greater than or equal to a preset threshold; D. until all images in the human body image database have been acquired, otherwise returning to step A. The present invention uses the database obtained by the data augmentation method for improving the detection rate of human body to train the human body detection model, which can improve the detection rate and robustness of the human body detection model for the back human body.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human body detection, and in particular to a data augmentation method, system and human body detection model for improving human body detection rate. Background Art

[0002] Human body detection is a special type of object detection in target detection technology. The human body has a variety of postures and appearance characteristics, which makes it easy for the human body detection rate to be low under certain special appearances. For example, when the human body in the picture is facing away from the camera, the detection ability of the human body from the back is not high because there are no facial features. Faced with such a situation, the most direct way is to increase the amount of data, but the number of human body images from the back in the image database is very small. It is unrealistic to collect and annotate a large number of human body images from the back. Therefore, how to increase the detection ability of the human body detection model for the human body from the back through data augmentation is a technical problem that we urgently need to solve. Summary of the invention

[0003] The present invention provides a data augmentation method, system and human body detection model for improving the detection rate of human body. The human body detection model is trained using a database obtained by the data augmentation method, which can improve the detection rate and robustness of the human body detection model for human bodies from the back.

[0004] In order to achieve the above technical problems, the present invention adopts the following technical solutions:

[0005] On the one hand, the present invention provides a data augmentation method for improving the detection rate of a human body, and the data augmentation method for improving the detection rate of a human body comprises:

[0006] A. Obtain an image from the human body image database in sequence;

[0007] B. If the acquired image is not a back-facing human image, a probability value is randomly generated;

[0008] C. If the generated probability value is greater than or equal to the preset threshold, the acquired image is subjected to texture augmentation processing;

[0009] D. Until all images in the human body image database have been acquired, otherwise return to step A.

[0010] In a second aspect, a data augmentation system for improving a human body detection rate is provided, the data augmentation system for improving a human body detection rate comprises: an image acquisition module, for acquiring an image from a human body image database;

[0011] A judging module, used to judge whether the acquired image is a back image of a human body;

[0012] A probability generation and judgment module is used to randomly generate a probability value and judge whether the generated probability value is greater than or equal to a preset threshold;

[0013] The map augmentation module is used to perform map augmentation processing on the acquired image if the acquired image is a non-back human body image and a randomly generated probability value is greater than or equal to a preset threshold.

[0014] A third aspect provides a human body detection model, which is trained using a human body image database obtained using the data augmentation method for improving human body detection rate as described above.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention performs map augmentation processing on non-back human images with a certain probability in the human image database, so that the human detection model trained using the human image database obtained thereby has a higher detection rate for back human bodies and is more robust. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. 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 the contents of the embodiments of the present invention and these drawings without paying any creative work.

[0017] Figure 1 It is a method flow chart of a first embodiment of a data augmentation method for improving human body detection rate provided in a specific implementation manner of the present invention.

[0018] Figure 2 It is a method flow chart of a second embodiment of a data augmentation method for improving human body detection rate provided in a specific implementation manner of the present invention.

[0019] Figure 3 It is a sub-method flow chart of a data augmentation method for improving human body detection rate provided in a specific embodiment of the present invention.

[0020] Figure 4 It is a frontal human body image provided in a specific embodiment of the present invention.

[0021] Figure 5 It is provided in the specific embodiment of the present invention Figure 4 Frontal human image obtained through texture augmentation.

[0022] Figure 6 It is a flow chart of another sub-method of a data augmentation method for improving human body detection rate provided in a specific embodiment of the present invention.

[0023] Figure 7 It is a frontal human body image obtained in step S230 provided in a specific embodiment of the present invention.

[0024] Figure 8 It is provided in the specific embodiment of the present invention Figure 7 Frontal human image augmented by perspective transform.

[0025] Fig. 9 It is a structural block diagram of a first embodiment of a data augmentation system for improving human body detection rate provided in a specific implementation manner of the present invention.

[0026] Fig.10 It is a structural block diagram of a second embodiment of a data augmentation system for improving human body detection rate provided in a specific implementation manner of the present invention. DETAILED DESCRIPTION

[0027] In order to make the technical problems solved by the present invention, the technical solutions adopted and the technical effects achieved clearer, the technical solutions of the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings. 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0028] Please refer to Figure 1 , which is a method flow chart of the first embodiment of a data augmentation method for improving human body detection rate provided in a specific embodiment of the present invention. Figure 1 As shown, the data augmentation method for improving the human body detection rate includes:

[0029] Step S110: sequentially acquiring an image from the human body image database.

[0030] The images in the human body image database are acquired sequentially, and the images are processed accordingly according to the judgment result of step S120.

[0031] Step S120: Determine whether the acquired image is a non-back human body image, if so, execute step S130; if not, execute step S150.

[0032] The specific embodiment of the present invention adopts different processing methods for back human body images and non-back human body images to improve the sensitivity of the human body detection model to hair features, thereby improving the human body detection model's ability to detect back human bodies.

[0033] Step S130: randomly generate a probability value.

[0034] Step S140: If the generated probability value is greater than or equal to the preset threshold, the acquired image is subjected to texture augmentation processing. After step S140 is executed, step S150 is executed.

[0035] If the acquired image is a non-back human image, a probability value is randomly generated. If the generated probability value is greater than or equal to a preset threshold, the acquired image is subjected to map augmentation processing, otherwise map augmentation processing is not performed. Whether to perform map augmentation processing on the non-back human image is determined based on the randomly generated probability value. This ensures that the data in the human image database processed by the data augmentation method provided by this embodiment is diverse, including both non-back human images that have been subjected to map augmentation processing and non-back human images that have not been subjected to map augmentation processing, so that the human detection model has both a high detection rate and strong robustness. By pasting a hair picture to the area corresponding to the head annotation box of the non-back human image, the proportion of the hair area in the human annotation box can be increased, thereby further improving the sensitivity of the human detection model to the hair features, and further improving the detection rate of the human detection module for the back human image.

[0036] Step S150: determine whether all images in the human image database have been acquired. If not, return to step S110; if so, execute step S160: complete data augmentation of all images in the human image database to obtain a human image database processed with data augmentation.

[0037] In this embodiment, if the acquired image is a non-back human image, the image acquired with a certain probability is subjected to map augmentation processing, the purpose of which is to increase the proportion of hair area in the human annotation box of the non-back human image, thereby further improving the sensitivity of the human detection model to hair features, and further improving the detection rate of the human detection module for back human images. Step S150 determines whether all images in the human image database have been acquired. If not, return to execute step S110; if so, complete data augmentation to obtain a human image database after data augmentation processing, and use the human image database after data augmentation processing to train the human detection model, which can improve the human detection model's ability to detect back human bodies; and the human image database after data augmentation processing has rich sample diversity, which ensures the robustness of the human detection model.

[0038] To sum up, this embodiment performs map augmentation processing on non-back human images with a certain probability in the human image database, so that the human detection model trained using the human image database obtained thereby has a higher detection rate and stronger robustness for back human bodies.

[0039] Please refer to Figure 2 , which is a method flow chart of a second embodiment of a data augmentation method for improving human body detection rate provided in a specific embodiment of the present invention. Figure 2 As shown, the data augmentation method for improving the human body detection rate includes:

[0040] Step S210: sequentially acquiring an image from a human body image database.

[0041] Step S220: Determine whether the acquired image is a non-back human body image, if so, execute step S230; if not, execute step S250.

[0042] Step S230: randomly generate a probability value, and determine whether the generated probability value is greater than or equal to a preset threshold value. If so, execute step S240; if not, execute step S250.

[0043] Step S240: Performing texture augmentation processing on the acquired image. After executing step S240, executing step S250.

[0044] In this embodiment, if the acquired image is a non-back human image, a probability value is randomly generated. If the generated probability value is greater than or equal to a preset threshold, the acquired image is subjected to mapping augmentation processing, otherwise only perspective transformation augmentation processing is performed. Whether to perform mapping augmentation processing on the non-back human image is determined according to the randomly generated probability value. This ensures that the data in the human image database processed by the data augmentation method provided by this embodiment has diversity, including both non-back human images that have been subjected to mapping augmentation processing and non-back human images that have not been subjected to mapping augmentation processing, so that the human detection model has both a high detection rate and strong robustness. By pasting a hair picture to the area corresponding to the head annotation box of the non-back human image, the proportion of the hair area in the human annotation box of the non-back human image can be increased, thereby further improving the sensitivity of the human detection model to the hair features, and further improving the detection rate of the human detection module for the back human image.

[0045] In some embodiments, Figure 3 As shown, the step S240: performing texture augmentation processing on the acquired image specifically includes:

[0046] Step S241: pre-capture a hair image from the back human body image according to the hair annotation frame and store it.

[0047] In this embodiment, the map augmentation process requires the use of hair pictures, so as to paste the hair pictures into the head annotation box in the non-back human image, thereby improving the sensitivity of the human detection model to the hair features. Therefore, it is necessary to pre-capture the hair pictures from the back human image according to the hair annotation box and store them to obtain a hair picture data set.

[0048] Step S242: Determine the head annotation box of the acquired image.

[0049] Step S243: randomly obtain a hair picture from the stored hair pictures.

[0050] Step S244: covering the acquired hair picture at the position of the head annotation frame of the acquired image according to the size of the head annotation frame to perform texture augmentation processing, and saving the image after the texture augmentation processing.

[0051] For example, traverse each hair annotation box in the back human image, capture the hair picture according to the hair annotation box of the back human image and save it in the hair picture dataset; traverse each head annotation box in the non-back human image, randomly obtain a hair picture from the hair picture dataset, interpolate the hair picture to the same size as 1.5 times the width w of the head annotation box, maintain the natural proportion of the hair picture, and then paste the hair picture to a height and position slightly higher than the head annotation box according to x1-0.25w, y1, 1.5w of the head annotation box, and cut off the hair picture that exceeds the human body annotation box; save the non-back human image after map augmentation, and use this saved non-back human image as a training sample for the human detection model. Figure 4 and Figure 5 As shown, Figure 4 is a frontal human image in the human image database, that is, a non-backward human image. After image augmentation, the following is obtained: Figure 5 The frontal human image shown is saved.

[0052] Step S250: performing perspective transformation augmentation processing on the image.

[0053] In this embodiment, perspective transformation augmentation processing is performed on the image obtained in step S220, step S230, or step S240, that is, if the acquired image is not a back human body image, a probability value is randomly generated, and if the generated probability value is greater than or equal to a preset threshold, mapping augmentation processing and perspective transformation augmentation processing are performed on the acquired image, otherwise only perspective transformation augmentation processing is performed; if the acquired image is a back human body image, perspective transformation augmentation processing is directly performed; the image subjected to perspective transformation augmentation processing is used as a training sample of the human body detection model, and by performing perspective transformation augmentation processing on the images in the human body image database, the diversity of the data is further improved, thereby further improving the robustness of the human body detection model.

[0054] In some embodiments, Figure 6 As shown, step S250: performing perspective transformation augmentation processing on the image specifically includes:

[0055] Step S251: traverse the human body annotation box of the image obtained in step S220, S230, or step S240 to determine the minimum bounding box of the human body.

[0056] It should be noted that: the image obtained in step S220 is a back human body image; the image obtained in step S230 is a non-back human body image obtained when the generated probability value is less than a preset threshold; the image obtained in step S240 is an image obtained after map augmentation processing.

[0057] Step S252: Randomly select a corner of the image obtained in step S220, S230, or step S240, and randomly select a side of the corner.

[0058] Step S253: randomly generating an inward value, where the inward value is less than or equal to the distance from the minimum bounding box to the selected edge.

[0059] Step S254: using a perspective transformation function to perform perspective transformation augmentation processing on the image obtained in step S220, step S230, or step S240 according to the selected angle, the selected edge, and the inset value.

[0060] For example, traverse the human body annotation boxes in the image and find the minimum bounding box; obtain the four corner points (p1, p2, p3, p4) of the image obtained in step S220, S230, or step S240, p = (x, y); randomly select one of the four corners, assuming that the selected corner is P1, and randomly select one side of the corner P1 (one of the two sides); randomly generate an inward value x', the randomly generated inward value is less than or equal to the distance from the minimum bounding box to the selected side, and obtain the four corner points (p1', p2, p3, p4) corresponding to the image after perspective transformation, where p1' = (x-x', y); use the perspective transformation function to perform perspective transformation on the image according to the four corner points (p1', p2, p3, p4), p1' = (x-x', y) and the selected side, obtain the image after perspective transformation augmentation processing and save it, and use this saved back human body image as a training sample for the human body detection model. For example, Figure 7 and Figure 8 As shown, Figure 7 is a frontal human body image obtained in step S230, which is obtained after perspective transformation and augmentation processing as shown below Figure 8 The image shown is saved and used as a training sample for the human detection model.

[0061] Step S260: determine whether all images in the human image database have been acquired. If not, return to step S210; if so, execute S270: complete data augmentation of the images in the human image database to obtain a human image database processed with data augmentation.

[0062] In this embodiment, step S260 determines whether all images in the human body image database have been acquired. If not, the process returns to step S210. If so, data augmentation is completed to obtain a human body image database after data augmentation processing. The human body detection model is trained using the human body image database after data augmentation processing, which can improve the human body detection model's ability to detect the back of the human body. Moreover, the human body image database after data augmentation processing has rich sample diversity, which ensures the robustness of the human body detection model.

[0063] This embodiment increases the number and diversity of training samples by performing occlusion augmentation processing on back-facing human body images with a certain probability in the human body image database, and performing mapping augmentation processing on non-back-facing human body images with a certain probability; and further increases the diversity of human body images by performing perspective transformation augmentation processing on all images, so that the human body detection model trained using the human body image database obtained in this way has a better detection rate for back-facing human bodies and stronger robustness.

[0064] The following is an embodiment of a data augmentation system for improving human body detection rate provided in a specific embodiment of the present invention. The embodiment of the data augmentation system for improving human body detection rate is implemented based on the above-mentioned embodiment of the data augmentation method for improving human body detection rate. For incomplete descriptions of the data augmentation system for improving human body detection rate, please refer to the above-mentioned embodiment of the data augmentation method for improving human body detection rate.

[0065] Please refer to Fig. 9 , which is a structural block diagram of a first embodiment of a data augmentation system for improving human body detection rate provided in a specific embodiment of the present invention. Fig. 9 As shown, the data augmentation system for improving the human body detection rate includes:

[0066] The image acquisition module 61 is used to sequentially acquire an image from the human body image database.

[0067] The judging module 62 is used to judge whether the acquired image is a non-back side human body image.

[0068] The probability generation and judgment module 63 is used to randomly generate a probability value and judge whether the generated probability value is greater than or equal to a preset threshold.

[0069] The map augmentation module 64 is used to perform map augmentation processing on the acquired image if the acquired image is a non-back human body image and a randomly generated probability value is greater than or equal to a preset threshold.

[0070] To sum up, this embodiment performs map augmentation processing on non-back human images with a certain probability in the human image database, so that the human detection model trained using the human image database obtained thereby has a higher detection rate and stronger robustness for the back human body.

[0071] Please refer to Fig.10 , which is a structural block diagram of a second embodiment of a data augmentation system for improving human body detection rate provided in a specific implementation manner of the present invention. Fig.10 As shown, the data augmentation system for improving the human body detection rate includes:

[0072] The image acquisition module 71 is used to sequentially acquire an image from the human body image database.

[0073] The judging module 72 is used to judge whether the acquired image is a non-back side human body image.

[0074] The probability generation and judgment module 73 is used to randomly generate a probability value and judge whether the generated probability value is greater than or equal to a preset threshold.

[0075] The map augmentation module 74 is used to perform map augmentation processing on the acquired image if the acquired image is a non-back human body image and a randomly generated probability value is greater than or equal to a preset threshold.

[0076] In some embodiments, the texture augmentation module 74 is specifically used to:

[0077] Pre-cutting and storing the hair image from the back human body image according to the hair annotation frame;

[0078] Determine the head annotation box of the acquired image;

[0079] Get a random hair picture from the stored hair pictures;

[0080] The acquired hair picture is covered at the position of the head annotation frame of the acquired image according to the size of the head annotation frame to perform a texture augmentation process, and the image after the texture augmentation process is saved.

[0081] The perspective transformation and augmentation module 75 is used to perform perspective transformation and augmentation processing on the image obtained by the system.

[0082] The image obtained by the system here is the image obtained by the judgment module 72, the probability generation and judgment module 73 or the map augmentation module 74. The specific content can refer to the embodiment of the data augmentation method for improving the human body detection rate provided in the embodiment of the present invention, which will not be repeated here.

[0083] In some embodiments, the perspective transformation augmentation module 75 is specifically used to:

[0084] Traverse the human body annotation box of the image obtained by the system to determine the minimum bounding box of the human body;

[0085] Randomly select a corner of the image obtained by the system, and randomly select a side of the corner;

[0086] Randomly generate an inward value, where the inward value is less than or equal to the distance from the minimum bounding box to the selected edge;

[0087] The perspective transformation function is used to perform perspective transformation augmentation processing on the image obtained by the system according to the selected angle, the selected edge and the inset value.

[0088] To summarize, the data augmentation system for improving the human body detection rate provided in this embodiment performs texture augmentation processing on non-back human body images with a certain probability, thereby increasing the number and diversity of training samples; and the perspective transformation augmentation processing performed on all images further increases the diversity of human body images, so that the human body detection model trained using the human body image database obtained in this way has a better detection rate and stronger robustness for back-facing human bodies.

[0089] A specific embodiment of the present invention also provides a human body detection model. The image database used in training the human body detection model is a human body image database augmented by the data augmentation method for improving the human body detection rate provided in the specific embodiment of the present invention. The human body detection rate is higher for the back side and the model has stronger robustness. For the specific data augmentation method for improving the human body detection rate, please refer to the content in the specific embodiment of the data augmentation method for improving the human body detection rate, which will not be repeated here.

[0090] The technical principle of the present invention is described above in conjunction with specific embodiments. These descriptions are only for explaining the principle of the present invention and cannot be interpreted as limiting the scope of protection of the present invention in any way. Based on the explanations herein, those skilled in the art can associate other specific implementations of the present invention without paying creative labor, and these methods will fall within the scope of protection of the present invention.

Claims

1. A data augmentation method for improving human body detection rate, characterized in that: The data augmentation method for improving the human body detection rate comprises: A. Obtain an image from the human body image database in sequence; B. If the acquired image is not a back-facing human image, a probability value is randomly generated; C. If the generated probability value is greater than or equal to the preset threshold, the acquired image is subjected to texture augmentation processing; D. until all images in the human body image database have been acquired, otherwise return to step A; The step of performing map augmentation processing on the acquired image includes: Pre-cutting and storing the hair image from the back human body image according to the hair annotation frame; Determine the head annotation box of the acquired image; Get a random hair picture from the stored hair pictures; The acquired hair picture is overlaid on the position of the head annotation frame of the acquired image according to the size of the head annotation frame to perform image augmentation processing, and the image after the image augmentation processing is saved.

2. The data augmentation method for improving human body detection rate according to claim 1, characterized in that: Before step D, the method further includes: if the acquired image is a back image of a human body, performing perspective transformation and augmentation processing on the acquired image.

3. The data augmentation method for improving human body detection rate according to claim 1, characterized in that: Before step D, the method further includes: if the probability value generated in step B is less than a preset threshold, performing perspective transformation augmentation processing on the acquired non-back human body image.

4. The data augmentation method for improving human body detection rate according to claim 1, characterized in that: Before step D, the method further includes: performing perspective transformation augmentation processing on the image obtained in step C.

5. The data augmentation method for improving human body detection rate according to any one of claims 2 to 4, characterized in that: The perspective transformation augmentation process specifically includes: Traverse the human body annotation box of the image and determine the minimum bounding box of the human body; Randomly select a corner of the image and randomly select a side of the corner; Randomly generate an inward value, where the inward value is less than or equal to the distance from the minimum bounding box to the selected edge; The perspective transformation function is used to perform perspective transformation augmentation processing on the image according to the selected angle, the selected edge and the inset value.

6. The data augmentation method for improving human body detection rate according to claim 1, characterized in that: The data augmentation method further includes: if the generated probability value is less than a preset threshold, directly performing perspective transformation augmentation processing on the acquired image.

7. A data augmentation system for improving human body detection rate, characterized in that: The data augmentation system for improving the human body detection rate comprises: An image acquisition module, used for acquiring an image from a human body image database; A judging module, used to judge whether the acquired image is a back image of a human body; A probability generation and judgment module is used to randomly generate a probability value and judge whether the generated probability value is greater than or equal to a preset threshold; A map augmentation module, used for performing map augmentation processing on the acquired image if the acquired image is not a back-view human image and a randomly generated probability value is greater than or equal to a preset threshold; The map augmentation module is specifically used for: Pre-cutting a hair picture from the back human body image according to the hair annotation frame and storing it; Determine the head annotation box of the acquired image; Get a random hair picture from the stored hair pictures; The acquired hair picture is covered at the position of the head annotation frame of the acquired image according to the size of the head annotation frame to perform a texture augmentation process, and the image after the texture augmentation process is saved.

8. A human body detection model, characterized in that: The human body detection model is trained using a human body image database obtained by using the data augmentation method for improving human body detection rate as described in any one of claims 1 to 6.