A data augmentation method, system and human body detection model

By occluding and map augmenting the human image database, the problem of insufficient detection ability of the human body detection model on the back is solved, and the detection rate and robustness of the model are improved.

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

Patent Information

Application Number
CN202010734361.4
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 body detection model has low detection ability of the back human body, especially when the number of back human body images in the image database is small, it is difficult to effectively improve the detection performance through data augmentation.

Method used

Using the data augmentation method, the images in the human image database are occlusion and map augmentation, and whether to process by randomly generating probability values ​​is determined to ensure that both the back body image and the non-back body image are properly expanded, and the increase is The proportion of hair features in the labeling box improves the model's ability to detect the human body on the back.

Benefits of technology

Through the human image database training model after data augmentation, the detection rate and robustness of the back human body are significantly improved, ensuring the improvement of the model in diversity and detection performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111914725B_ABST
    Figure CN111914725B_ABST
Patent Text Reader

Abstract

This invention discloses a data augmentation method, system, and human detection model. The data augmentation method includes: A) sequentially acquiring an image from a human image database; B) determining whether the acquired image is a back view of a human; if yes, proceed to step C; if no, proceed to step D; C) randomly generating a probability value; if the generated probability value is greater than or equal to a preset threshold, then performing occlusion augmentation processing on the acquired image; proceeding to step E; D) randomly generating a probability value; if the generated probability value is greater than or equal to a preset threshold, then performing texture augmentation processing on the acquired image; proceeding to step E; E) until all images in the human image database have been acquired; otherwise, returning to step A. This invention utilizes the database obtained by this data augmentation method to train a human detection model, which can improve the detection rate and robustness of the human detection model for back view of humans.
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. 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. 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 at 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, the data augmentation method comprising:

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

[0007] B. Determine whether the acquired image is a back human body image; if so, execute step C; if not, execute step D;

[0008] C. randomly generate a probability value. If the generated probability value is greater than or equal to a preset threshold, perform occlusion and augmentation processing on the acquired image; and execute step E;

[0009] D. randomly generate a probability value. If the generated probability value is greater than or equal to a preset threshold, perform texture augmentation processing on the acquired image; and execute step E;

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

[0011] In a second aspect, a data augmentation system is provided, the data augmentation system comprising:

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

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

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

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

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

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

[0018] 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 the human body image database, and performs mapping augmentation processing on non-back-facing human body images with a certain probability, 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 is more robust. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 It is a method flow chart of a first embodiment of a data augmentation method provided in a specific implementation manner of the present invention.

[0021] Figure 2 It is a method flow chart of a second embodiment of a data augmentation method provided in a specific implementation manner of the present invention.

[0022] Figure 3 It is a sub-method flow chart of a data augmentation method provided in a specific embodiment of the present invention.

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

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

[0025] Figure 6 It is a flow chart of another sub-method of a data augmentation method provided in a specific embodiment of the present invention.

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

[0027] Figure 8 It is provided in the specific embodiment of the present invention Figure 7 Frontal human image obtained through texture augmentation.

[0028] Fig. 9 It is another sub-method flow chart of a data augmentation method provided in a specific embodiment of the present invention.

[0029] Fig.10 It is a frontal human body image obtained in step S250 provided in a specific embodiment of the present invention.

[0030] Fig.11 It is provided in the specific embodiment of the present invention Fig.10 Frontal human image augmented by perspective transform.

[0031] Fig.12 It is a structural block diagram of a first embodiment of a data augmentation system provided in a specific implementation manner of the present invention.

[0032] Fig.13 It is a structural block diagram of a second embodiment of a data augmentation system provided in a specific implementation manner of the present invention. DETAILED DESCRIPTION

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

[0034] Please refer to Figure 1 , which is a method flow chart of the first embodiment of a data augmentation method provided in a specific implementation manner of the present invention. Figure 1 As shown, the data augmentation method includes:

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

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

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

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

[0039] Step S130: randomly generate a probability value, and if the generated probability value is greater than or equal to a preset threshold, perform occlusion augmentation processing on the acquired image. After executing step S130, execute step S150.

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

[0041] Step S140: randomly generate a probability value, and if the generated probability value is greater than or equal to a preset threshold, perform texture augmentation processing on the acquired image. After executing step S140, execute step S150.

[0042] 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, thereby making the human detection model have 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.

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

[0044] 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; if the acquired image is a non-back human image, an image augmentation process is performed on the acquired image with a certain probability, both of which aim to increase the proportion of the hair area in the human body annotation box, 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 back human body images. Step S150 determines whether all images in the human body image database have been acquired. If not, return to execute step S110; 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 back human bodies; and the human body image database after data augmentation processing has rich sample diversity, which ensures the robustness of the human body detection model.

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

[0046] Please refer to Figure 2 , which is a method flow chart of a second embodiment of a data augmentation method provided in a specific implementation manner of the present invention. Figure 2As shown, the data augmentation method includes:

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

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

[0049] 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 S270.

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

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

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

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

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

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

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

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

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

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

[0060] Step S250: 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 S260; if not, execute step S270.

[0061] Step S260: Performing texture augmentation processing on the acquired image. After executing step S260, executing step S270.

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

[0063] In some embodiments, Figure 6 As shown, the step S260: performing texture augmentation processing on the acquired image specifically includes:

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

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

[0066] Step S262: Determine the head annotation box of the acquired image.

[0067] That is, determine the head annotation box of the non-back human image.

[0068] Step S263: randomly obtain a hair picture from the stored hair pictures.

[0069] Step S264: 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.

[0070] 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 7 and Figure 8 As shown, Figure 7 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 8 The frontal human image shown is saved.

[0071] Step S270: performing perspective transformation augmentation processing on the image.

[0072] In this embodiment, perspective transformation augmentation processing is performed on the image obtained in step S230, step S240, step S250, or step S260, 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 a non-back human body image, a probability value is randomly generated, and if the generated probability value is greater than or equal to the preset threshold, mapping augmentation processing and perspective transformation augmentation processing are performed on the acquired image, otherwise, only perspective transformation augmentation processing is performed. By performing perspective transformation augmentation processing on images in the human body image database, the images subjected to perspective transformation augmentation processing are used as training samples of the human body detection model, which further improves the diversity of the data and thus further improves the robustness of the human body detection model.

[0073] In some embodiments, Fig. 9 As shown, step S270: performing perspective transformation augmentation processing on the image specifically includes:

[0074] Step S271: traverse the human body annotation box of the image obtained in step S230, step S240, step S250, or step S260 to determine the minimum bounding box of the human body.

[0075] Among them, it should be noted that: the image obtained in step S230 is the back human body image obtained when the generated probability value is less than the preset threshold; the image obtained in step S240 is the image obtained after occlusion augmentation processing; the image obtained in step S250 is the non-back human body image obtained when the generated probability value is less than the preset threshold; the image obtained in step S260 is the image obtained after map augmentation processing.

[0076] Step S272: Randomly select a corner of the image obtained in step S230, step S240, step S250, or step S260, and randomly select a side of the corner.

[0077] Step S273: 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.

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

[0079] 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 S230, step S240, step S250, or step S260, 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, Fig.10 and Fig.11 As shown, Fig.10 is a frontal human body image obtained in step S250, which is obtained after perspective transformation and augmentation processing as shown below Fig.11 The image shown is saved and used as a training sample for the human detection model.

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

[0081] In this embodiment, step S280 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.

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

[0083] The following is an embodiment of a data augmentation system provided in a specific implementation manner of the present invention. The embodiment of the data augmentation system is implemented based on the embodiment of the above-mentioned data augmentation method. For any incomplete description of the data augmentation system, please refer to the embodiment of the above-mentioned data augmentation method.

[0084] Please refer to Fig.12 , which is a structural block diagram of a first embodiment of a data augmentation system provided in a specific implementation manner of the present invention. Fig.12 As shown, the data augmentation system includes:

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

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

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

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

[0089] The map augmentation module 65 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.

[0090] 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, and performs mapping augmentation processing on non-back-facing human body images with a certain probability, so that the human body detection model trained using the human body image database obtained in this way has a higher detection rate and stronger robustness for back-facing human bodies.

[0091] Please refer to Fig.13 , which is a structural block diagram of a second embodiment of a data augmentation system provided in a specific implementation manner of the present invention. Fig.13 As shown, the data augmentation system includes:

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

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

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

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

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

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

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

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

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

[0101] The map augmentation module 75 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.

[0102] In some embodiments, the map augmentation module 75 is specifically used to:

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

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

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

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

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

[0108] The image obtained by the system here is the image obtained by the probability generation and judgment module 73, the occlusion augmentation module 74 or the map augmentation module 75. The specific content can refer to the embodiment of the data augmentation method provided in the embodiment of the present invention, which will not be repeated here.

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

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

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

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

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

[0114] To summarize, the present 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 mapping augmentation processing on non-back-facing human body images with a certain probability, thereby increasing the number and diversity of training samples; 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 for back-facing human bodies and stronger robustness.

[0115] The 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 provided in the specific embodiment of the present invention. It has a better detection rate for human bodies from the back and 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.

[0116] 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, characterized in that: The data augmentation method comprises: A. Obtain an image from the human body image database in sequence; B. Determine whether the acquired image is a back human body image; if so, execute step C; if not, execute step D; C. randomly generate a probability value. If the generated probability value is greater than or equal to a preset threshold, perform occlusion and augmentation processing on the acquired image; and execute step E; D. randomly generate a probability value. If the generated probability value is greater than or equal to a preset threshold, perform texture augmentation processing on the acquired image; and execute step E; E. 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; Modify the minimum ordinate of the human body annotation box to the random ordinate, and save the image after occlusion and augmentation processing; 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 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.

2. The data augmentation method according to claim 1, characterized in that: Before step E, the following steps are also included: If the generated probability value is less than a preset threshold, the acquired image is subjected to perspective transformation augmentation processing; Performing perspective transformation augmentation processing on the image after occlusion augmentation processing; The image after the texture augmentation is augmented by perspective transformation.

3. The data augmentation method according to claim 2, 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.

4. The data augmentation method 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.

5. A data augmentation system, characterized in that: The data augmentation system 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; 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; A map augmentation module, used for performing map augmentation processing on the acquired image if the acquired image is not a back human image and a randomly generated probability value 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; Modify the minimum ordinate of the human body annotation box to the random ordinate, and save the image after occlusion and augmentation processing; The map augmentation module is specifically used for: 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 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.

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

Citation Information

Patent Citations

  • Image processing method, model training method and corresponding device

    CN108921070A

  • Target detection method based on data enhancement

    CN109063748A