A data augmentation method, system and model for improving the detection rate of human body from behind

By occluding and augmenting the back body images with a certain probability in the human image database, the problem of low detection ability of the back body is solved, and the detection rate and robustness of the human detection model for the back body is improved.

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

Patent Information

Application Number
CN202010733246.5
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

In the prior art, the detection ability of the back human body is low, especially due to the small number of back human body images, the detection rate of the back human body by the human body detection model is not high.

Method used

By blocking and augmenting the back body image with a certain probability in the human image database, the proportion of hair area in the back body image is increased, thereby increasing the sensitivity of the human detection model to hair characteristics, and thus improving the detection rate of the back body. and robustness.

Benefits of technology

The detection rate and robustness of the human body detection model for the back of the human body is improved, ensuring the efficient and diverse model when detecting the back of the human body.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111914722B_ABST
    Figure CN111914722B_ABST
Patent Text Reader

Abstract

The present invention discloses a data augmentation method, system and model for improving the detection rate of human bodies from the back. The data augmentation method for improving the detection rate of human bodies from the back comprises: A. acquiring an image from a human body image database in sequence; B. if the acquired image is a human body image from the back; randomly generating a probability value; C. if the generated probability value is greater than or equal to a preset threshold, performing occlusion augmentation processing on the acquired image; 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 bodies from the back to train a human body detection model, which can improve the detection rate and robustness of the human body detection model for human bodies from the back.
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 model for improving the detection rate of human bodies from behind. 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 model for improving the detection rate of human bodies from behind. The database obtained by the data augmentation method for improving the detection rate of human bodies from behind is used to train a human body detection model, which can improve the detection rate and robustness of the human body detection model for human bodies from behind.

[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 person from behind, the data augmentation method for improving the detection rate of a person from behind comprising:

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

[0007] B. If the acquired image is a back image of a human body, 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 occlusion 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 the detection rate of a person from behind is provided. The data augmentation system for improving the detection rate of a person from behind comprises:

[0011] An image acquisition module, used for acquiring an image from a human body image database;

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

[0013] 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;

[0014] The occlusion augmentation module is used to perform occlusion augmentation processing on the acquired image if the acquired image is a back human body image and the probability value generated by the probability generation module is greater than or equal to a preset threshold.

[0015] 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 the back-side human body detection rate as described above.

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

[0017] 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.

[0018] 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.

[0019] 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.

[0020] 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.

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

[0022] Figure 5 It is provided in the specific embodiment of the present invention Figure 4 Back view of a human body after occlusion augmentation.

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

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

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

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

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

[0028] 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.

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

[0030] Step S110: sequentially acquiring an image from a human body image database.

[0031] The images of the human body image database are acquired sequentially, and the images are processed accordingly according to the judgment results.

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

[0033] The specific embodiment of the present invention performs occlusion data augmentation processing on the back human body image to increase the sensitivity of the human body detection model to the hair features, thereby improving the human body detection model's ability to detect the back human body.

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

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

[0036] If the acquired image is a back human body 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 occlusion augmentation processing. Otherwise, the occlusion augmentation processing is not performed. Whether the back human body image is subjected to occlusion augmentation processing is determined based on the randomly generated probability value. This ensures that the data in the human body image database processed by the data augmentation method provided by this embodiment has diversity, including both back human body images subjected to occlusion augmentation processing and back human body images not subjected to occlusion augmentation processing, so that the human body detection model has both a high detection rate and strong robustness. By performing occlusion processing on the area corresponding to the non-hair annotation box of the back human body image, the proportion of the hair area in the back human body image can be increased, thereby improving the sensitivity of the human body detection model to the hair features, and further improving the detection rate of the human body detection module to the back human body image.

[0037] 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.

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

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

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

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

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

[0043] 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.

[0044] In this embodiment, if the acquired image is a back human body 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 occlusion augmentation processing, otherwise only perspective transformation augmentation processing is performed. Whether to perform occlusion augmentation processing on the back human body image is determined according to the randomly generated probability value. This ensures that the data in the human body image database processed by the data augmentation method provided by this embodiment has diversity, including both back human body images that have been subjected to occlusion augmentation processing and back human body images that have not been subjected to occlusion augmentation processing, so that the human body detection model has both a high detection rate and strong robustness. By performing occlusion processing on the area corresponding to the non-hair annotation box of the back human body image, the proportion of the hair area in the back human body image can be increased, thereby improving the sensitivity of the human body detection model to the hair features, and further improving the detection rate of the human body detection module to the back human body image.

[0045] Step S240: performing occlusion augmentation processing on the acquired image. After step S240 is performed, step S250 is performed.

[0046] In some embodiments, Figure 3 The step S240: performing occlusion augmentation processing on the acquired image specifically includes:

[0047] Step S241: Obtain the human body annotation frame and hair annotation frame of the image.

[0048] That is, obtain the human body annotation box and hair annotation box of the back human body image.

[0049] Step S242: obtaining a random vertical coordinate between the minimum vertical coordinate of the human body annotation frame and the minimum vertical coordinate of the hair annotation frame.

[0050] Step S243: replacing the pixel value of the area between the minimum ordinate and the random ordinate in the human body annotation frame with a random uniform pixel value to perform occlusion augmentation processing.

[0051] Step S244: modifying the minimum ordinate of the human body annotation box to the random ordinate, and saving the image after the occlusion and augmentation processing.

[0052] In the image obtained through steps S241 to S244, the occluded part is no longer part of the human body annotation box, and the minimum vertical coordinate of the human body annotation box has been modified to the random vertical coordinate obtained in step S242, which is greater than or equal to the minimum vertical coordinate of the human body annotation box and less than or equal to the minimum vertical coordinate of the hair annotation box.

[0053] For example, traverse each body annotation frame of the back body image that contains a hair annotation frame; obtain x1, x2, y1 of the body annotation frame and y1' of the hair annotation frame, where x1, x2 and y1 are the minimum horizontal coordinate, maximum horizontal coordinate and minimum vertical coordinate of the body annotation frame respectively; randomly select a random vertical coordinate between y1 and y1' as y; replace the pixel values ​​in the occluded area (x1, x2, y1, y) in the body annotation frame of the original back body image with the mean or random color; modify y1 of the body annotation frame to the random vertical coordinate y, and save the back body image after occlusion and augmentation and its modified body annotation frame, and use the saved back body image as a training sample for the body detection model. For example, Figure 4 and Figure 5 As shown, Figure 4 is a back human image in the human image database. After occlusion and augmentation processing, the following is obtained: Figure 5 The back human body image shown is saved.

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

[0055] 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 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, occlusion 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 not a back human body image, perspective transformation augmentation processing is directly performed. 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.

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

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

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

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

[0060] 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.

[0061] 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.

[0062] 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, step 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 front human body image obtained in step S220, that is, a non-back human body image, 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.

[0063] 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.

[0064] 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.

[0065] 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 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 and stronger robustness for back-facing human bodies.

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

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

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

[0069] The judging module 62 is used to judge whether the acquired image is a back image of a human body.

[0070] 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.

[0071] The occlusion augmentation module 64 is used to perform occlusion augmentation processing on the acquired image if the acquired image is a back human body image and the probability value generated by the probability generation module is greater than or equal to a preset threshold.

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

[0073] Please refer to Fig.10 , which is a structural block diagram of a second embodiment of a data augmentation system for improving the backside human body detection rate provided in a specific embodiment of the present invention. Fig.10 As shown in FIG. 1 , the data augmentation system for improving the detection rate of human bodies from behind includes:

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

[0075] The judging module 72 is used to judge whether the acquired image is a back image of a human body.

[0076] 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.

[0077] The occlusion augmentation module 74 is used to perform occlusion augmentation processing on the acquired image if the acquired image is a back human body image and the probability value generated by the probability generation module is greater than or equal to a preset threshold.

[0078] In some embodiments, the occlusion augmentation module 74 is specifically used to:

[0079] Obtain the human body annotation box and hair annotation box of the image;

[0080] Obtain a random vertical coordinate between the minimum vertical coordinate of the human body annotation frame and the minimum vertical coordinate of the hair annotation frame;

[0081] Replacing the pixel value of the area between the minimum ordinate and the random ordinate in the human body annotation frame with a random uniform pixel value to perform occlusion augmentation processing;

[0082] The minimum ordinate of the human body annotation box is modified to be the random ordinate, and the image after occlusion and augmentation processing is saved.

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

[0084] 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 occlusion augmentation module 74. The specific content can refer to the embodiment of the data augmentation method for improving the detection rate of human body from the back provided in the embodiment of the present invention, and will not be repeated here.

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

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

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

[0088] 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;

[0089] 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.

[0090] To summarize, this embodiment provides a data augmentation system that performs occlusion augmentation processing on back-facing human body images with a certain probability in a human body image database, and performs perspective transformation augmentation processing on all images to further increase 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.

[0091] 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 a data augmentation method for improving the back-face human body detection rate as provided in the specific embodiment of the present invention. The back-face human body detection rate is better and the model has strong robustness. For the specific data augmentation method, please refer to the content in the aforementioned specific embodiment of the data augmentation method, which will not be repeated here.

[0092] 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 the detection rate of a person from behind, characterized in that: The data augmentation method for improving the detection rate of a person at the back includes: A. Obtain an image from the human body image database in sequence; B. If the acquired image is a back image of a human body, 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 occlusion augmentation processing; D. until all images in the human body image database have been acquired, otherwise return to step A; The step of performing occlusion and augmentation processing on the acquired image includes: Obtain the human body annotation box and hair annotation box of the image; Obtain a random vertical coordinate between the minimum vertical coordinate of the human body annotation frame and the minimum vertical coordinate of the hair annotation frame; Replacing the pixel value of the area between the minimum ordinate and the random ordinate in the human body annotation frame with a random uniform pixel value to perform occlusion augmentation processing; The minimum ordinate of the human body annotation box is modified to be the random ordinate, and the image after occlusion and augmentation processing is saved.

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

3. The data augmentation method for improving the detection rate of a person at the back 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 and augmentation processing on the acquired back human body image.

4. The data augmentation method for improving the detection rate of a person at the back 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 the detection rate of a person from the back 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 the detection rate of a person from behind according to claim 1, characterized in that: The data augmentation method for improving the detection rate of a human body from behind also 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 the detection rate of a person from behind, characterized in that: The data augmentation system for improving the detection rate of people at the back includes: 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; An occlusion augmentation module, used for performing occlusion augmentation processing on the acquired image if the acquired image is an image of a human body from the back and the probability value generated by the probability generation module is greater than or equal to a preset threshold; The occlusion augmentation module is specifically used for: Obtain the human body annotation box and hair annotation box of the image; Obtain a random vertical coordinate between the minimum vertical coordinate of the human body annotation frame and the minimum vertical coordinate of the hair annotation frame; Replacing the pixel value of the area between the minimum ordinate and the random ordinate in the human body annotation frame with a random uniform pixel value to perform occlusion augmentation processing; The minimum ordinate of the human body annotation box is modified to be the random ordinate, and the image after occlusion and augmentation processing 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 the back-side human body detection rate as described in any one of claims 1 to 6.