CN111914725A - Data augmentation method and system and human body detection model - Google Patents

Data augmentation method and system and human body detection model Download PDF

Info

Publication number
CN111914725A
CN111914725A CN202010734361.4A CN202010734361A CN111914725A CN 111914725 A CN111914725 A CN 111914725A CN 202010734361 A CN202010734361 A CN 202010734361A CN 111914725 A CN111914725 A CN 111914725A
Authority
CN
China
Prior art keywords
human body
image
augmentation
hair
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010734361.4A
Other languages
Chinese (zh)
Inventor
李帅
董健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruimo Intelligent Technology Shenzhen Co ltd
Original Assignee
Ruimo Intelligent Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruimo Intelligent Technology Shenzhen Co ltd filed Critical Ruimo Intelligent Technology Shenzhen Co ltd
Priority to CN202010734361.4A priority Critical patent/CN111914725A/en
Publication of CN111914725A publication Critical patent/CN111914725A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a data augmentation method, a data augmentation system and a human body detection model. The data method comprises the following steps: A. sequentially acquiring an image from a human body image database; B. judging whether the acquired image is a back human body image; if yes, executing the step C; if not, executing the step D; C. randomly generating a probability value, and if the generated probability value is greater than or equal to a preset threshold value, carrying out shielding and amplification processing on the acquired image; executing the step E; D. randomly generating a probability value, and if the generated probability value is greater than or equal to a preset threshold value, performing mapping augmentation processing on the acquired image; executing the step E; E. and C, returning to the step A until the images in the human body image database are all obtained. The invention trains the human body detection model by using the database obtained by the data augmentation method, and can improve the detection rate and robustness of the human body detection model to the back human body.

Description

Data augmentation method and system and human body detection model
Technical Field
The invention relates to the technical field of human body detection, in particular to a data augmentation method, a data augmentation system and a human body detection model.
Background
Human detection is a special object detection of target detection technology. The human body has various postures and appearance characteristics, so that the situation that the human body detection rate is low under certain special appearances is easy to occur. For example, when a human body in the screen is facing away from the lens, the back human body detection capability is not high because there is no facial feature. In the face of such a situation, the most direct way is to increase the number of data, but the number of back human body images in the image database is small, and it is unrealistic to collect a large number of back human body images and label them, so how to increase the detection capability of the human body detection model for the back human body through data expansion is a technical problem that we need to solve urgently.
Disclosure of Invention
The invention provides a data augmentation method, a data augmentation system and a human body detection model.
In order to realize the technical problem, the invention adopts the following technical scheme:
in one aspect, the present invention provides a data augmentation method, including:
A. sequentially acquiring an image from a human body image database;
B. judging whether the acquired image is a back human body image; if yes, executing the step C; if not, executing the step D;
C. randomly generating a probability value, and if the generated probability value is greater than or equal to a preset threshold value, carrying out shielding and amplification processing on the acquired image; executing the step E;
D. randomly generating a probability value, and if the generated probability value is greater than or equal to a preset threshold value, performing mapping augmentation processing on the acquired image; executing the step E;
E. and C, returning to the step A until the images in the human body image database are all obtained.
In a second aspect, there is provided a data augmentation system comprising:
the image acquisition module is used for acquiring an image from a human body image database;
the judging module is used for judging whether the acquired image is a back human body image;
the probability generation and judgment module is used for randomly generating a probability value and judging whether the generated probability value is greater than or equal to a preset threshold value;
the shielding and amplifying module is used for shielding and amplifying the acquired image if the acquired image is a back human body image and the probability value generated by the probability generating module is greater than or equal to a preset threshold value;
and the map augmentation module is used for carrying out map augmentation processing on the acquired image if the acquired image is a non-back human body image and a probability value greater than or equal to a preset threshold value is randomly generated.
A third aspect provides a human body detection model, which is trained by using the human body image database obtained by the data augmentation method as described above.
Compared with the prior art, the invention has the beneficial effects that: according to the method, the back human body image with a certain probability in the human body image database is subjected to shielding and amplifying treatment, and the non-back human body image with a certain probability is subjected to mapping and amplifying treatment, so that the human body detection model obtained by training the obtained human body image database is higher in detection rate of the back human body and higher in robustness.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the contents of the embodiments of the present invention and the drawings without creative efforts.
Fig. 1 is a flowchart of a data augmentation method according to a first embodiment of the present invention.
Fig. 2 is a flowchart of a data augmentation method according to a second embodiment of the present invention.
Fig. 3 is a flowchart of a sub-method of a data augmentation method according to an embodiment of the present invention.
Fig. 4 is a back human image provided in an embodiment of the present invention.
Fig. 5 is a back human body image obtained by the occlusion augmentation process of fig. 4 according to an embodiment of the present invention.
Fig. 6 is a flowchart of another sub-method of a data augmentation method according to an embodiment of the present invention.
Fig. 7 is a front human image provided in an embodiment of the present invention.
Fig. 8 is a front human body image obtained by the mapping augmentation process of fig. 7 according to an embodiment of the present invention.
Fig. 9 is a flowchart of another sub-method of a data augmentation method according to an embodiment of the present invention.
Fig. 10 is a front human body image obtained in step S250 according to the embodiment of the present invention.
Fig. 11 is a front human body image obtained by perspective transformation and augmentation processing of fig. 10 according to an embodiment of the present invention.
Fig. 12 is a block diagram illustrating a first exemplary embodiment of a data augmentation system according to an embodiment of the present invention.
Fig. 13 is a block diagram illustrating a second embodiment of a data augmentation system according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems solved, technical solutions adopted and technical effects achieved by the present invention clearer, the technical solutions of the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Please refer to fig. 1, which is a flowchart illustrating a data augmentation method according to a first embodiment of the present invention. As shown in fig. 1, the data augmentation method includes:
step S110: and sequentially acquiring an image from a human body image database.
And sequentially acquiring images of the human body image database, and correspondingly processing the images according to the judgment result.
Step S120: judging whether the acquired image is a back human body image, if so, executing step S130; if not, go to step S140.
According to the specific embodiment of the invention, different processing modes are adopted for the back human body image and the non-back human body image so as to improve the sensitivity of the human body detection model to hair characteristics, thereby improving the detection capability of the human body detection model to the back human body.
Step S130: and randomly generating a probability value, and if the generated probability value is greater than or equal to a preset threshold value, carrying out shielding and broadening processing on the acquired image. After step S130 is performed, step S150 is performed.
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 value, shielding and amplifying processing is performed on the acquired image, otherwise, shielding and amplifying processing is not performed, and whether shielding and amplifying processing is performed on the back human body image is judged according to the randomly generated probability value, so that the data in the human body image database processed by the data amplifying method provided by the embodiment has diversity, and the back human body image subjected to shielding and amplifying processing and the back human body image not subjected to shielding and amplifying processing exist, so that the human body detection model has a high detection rate and high robustness. The area corresponding to the non-hair marking frame of the back human body image is shielded, so that the proportion of the hair area in the back human body image can be increased, the sensitivity of the human body detection model to hair characteristics is improved, and the detection rate of the human body detection module to the back human body image is improved.
Step S140: and randomly generating a probability value, and if the generated probability value is greater than or equal to a preset threshold value, performing mapping augmentation processing on the acquired image. After step S140 is executed, step S150 is executed.
If the acquired image is a non-back human body image, a probability value is randomly generated, if the generated probability value is greater than or equal to a preset threshold value, mapping augmentation processing is carried out on the acquired image, otherwise, mapping augmentation processing is not carried out, and whether mapping augmentation processing is carried out on the non-back human body image or not is judged according to the randomly generated probability value, so that the data in the human body image database processed by the data augmentation method provided by the embodiment are ensured to have diversity, and the human body detection model has a high detection rate and high robustness. The hair picture is pasted in the area corresponding to the head marking frame of the non-back human body image, so that the proportion of the hair area in the human body marking frame of the non-back human body image can be increased, the sensitivity of the human body detection model to hair characteristics is further improved, and the detection rate of the human body detection module to the back human body image is further improved.
Step S150: judging whether the images in the human body image database are all acquired, if not, returning to the step S110; if yes, go to step S160: and finishing data amplification of all images in the human body image database to obtain the human body image database subjected to data amplification processing.
In this embodiment, if the acquired image is a back human body image, shielding and augmenting the acquired image with a certain probability; if the acquired image is a non-back human body image, the acquired image with a certain probability is subjected to mapping augmentation processing, and the purpose is to increase the proportion of the hair area in the human body marking frame, so that the sensitivity of the human body detection model to hair characteristics is further improved, and the detection rate of the human body detection module to the back human body image is further improved. Step S150, judging whether the images in the human body image database are all acquired, if not, returning to execute the step S110; if so, completing data augmentation to obtain a human body image database after data augmentation, and training the human body detection model by using the human body image database after data augmentation to improve the detection capability of the human body detection model on the back human body; and the human body image database after data amplification processing has rich sample diversity, and the robustness of the human body detection model is ensured.
In summary, in the embodiment, the human body detection model trained by the obtained human body image database has a higher detection rate of the human body on the back side and a higher robustness by performing the shielding and augmenting processing on the human body image on the back side with a certain probability and performing the mapping and augmenting processing on the non-back human body image with a certain probability.
Please refer to fig. 2, which is a flowchart illustrating a data augmentation method according to a second embodiment of the present invention. As shown in fig. 2, the data augmentation method includes:
step S210: and sequentially acquiring an image from a human body image database.
Step S220: judging whether the acquired image is a back human body image, if so, executing step S230; if not, go to step S250.
Step S230: randomly generating a probability value, judging whether the generated probability value is greater than or equal to a preset threshold value, if so, executing a step S240; if not, go to step S270.
In this implementation, 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 value, the acquired image is subjected to shielding and amplification processing, otherwise, only perspective transformation and amplification processing is performed, and whether shielding and amplification processing is performed on the back human body image is judged according to the randomly generated probability value, so that it is ensured that data in the human body image database processed by the data amplification method provided by this embodiment has diversity, and both the back human body image subjected to shielding and amplification processing and the back human body image not subjected to shielding and amplification processing exist, so that the human body detection model has a high detection rate and strong robustness. The area corresponding to the non-hair marking frame of the back human body image is shielded, so that the proportion of the hair area in the back human body image can be increased, the sensitivity of the human body detection model to hair characteristics is improved, and the detection rate of the human body detection module to the back human body image is improved.
Step S240: and carrying out shielding and broadening processing on the acquired image. After step S240 is executed, step S270 is executed.
In some embodiments, as described in fig. 3, step S240: the shielding and broadening processing of the acquired image specifically comprises the following steps:
step S241: and acquiring a human body marking frame and a hair marking frame of the image.
Namely, a human body marking frame and a hair marking frame of the back human body image are obtained.
Step S242: and acquiring a random vertical coordinate between the minimum vertical coordinate of the human body labeling frame and the minimum vertical coordinate of the hair labeling frame.
Step S243: and replacing the pixel value of the area between the minimum vertical coordinate and the random vertical coordinate in the human body labeling frame with a random uniform pixel value to carry out shielding and augmentation processing.
Step S244: and modifying the minimum vertical coordinate of the human body labeling frame as the random vertical coordinate, and storing the image after shielding and amplifying processing.
In the images obtained in steps S241 to S244, the shielded part is no longer a department of the human body labeling frame, the minimum ordinate of the human body labeling frame is modified to the random ordinate obtained in step S242, and the random ordinate is greater than or equal to the minimum ordinate of the human body labeling frame and less than or equal to the minimum ordinate of the hair labeling frame.
For example, traversing each human body labeling frame of the hair labeling frames contained in the back human body image; obtaining x1, x2 and y1 of the human body labeling frame and y1' of the hair labeling frame, wherein x1, x2 and y1 are respectively the minimum abscissa, the maximum abscissa and the minimum ordinate of the human body labeling frame; randomly taking a random ordinate between y1 and y1' as y; replacing pixel values in occlusion areas (x1, x2, y1 and y) in a human body labeling frame of the original back human body image with an average value or a random color; and y1 of the modified human body labeling frame is a random vertical coordinate y, the back human body image subjected to shielding and amplification treatment and the modified human body labeling frame are stored, and the stored back human body image is used as a training sample of the human body detection model. For example, as shown in fig. 4 and 5, fig. 4 is a back human body image in the human body image database, and the back human body image shown in fig. 5 is obtained after the occlusion and augmentation process, and the image is saved.
Step S250: randomly generating a probability value, judging whether the generated probability value is greater than or equal to a preset threshold value, and if so, executing a step S260; if not, go to step S270.
Step S260: and carrying out mapping augmentation processing on the acquired image. After step S260 is performed, step S270 is performed.
In this embodiment, if the acquired image is a non-back human body image, a probability value is randomly generated, if the generated probability value is greater than or equal to a preset threshold, mapping augmentation processing is performed on the acquired image, otherwise, only perspective transformation augmentation processing is performed, and whether mapping augmentation processing is performed on the non-back human body image is determined according to the randomly generated probability value, so that data in the human body image database processed by the data augmentation method provided by this embodiment are guaranteed to have diversity, and the non-back human body image subjected to mapping augmentation processing and the non-back human body image not subjected to mapping augmentation processing exist, so that the human body detection model has a high detection rate and high robustness. The hair picture is pasted in the area corresponding to the head marking frame of the non-back human body image, so that the proportion of the hair area in the human body marking frame of the non-back human body image can be increased, the sensitivity of the human body detection model to hair characteristics is further improved, and the detection rate of the human body detection module to the back human body image is further improved.
In some embodiments, as shown in fig. 6, the step S260: the map-pasting augmentation processing on the acquired image specifically comprises the following steps:
step S261: and intercepting and storing a hair picture from the back human body image according to the hair marking frame in advance.
In this embodiment, the mapping augmentation process needs to use the hair picture to paste the hair picture to the head labeling frame in the non-back human body image, so as to improve the sensitivity of the human body detection model to the hair characteristics, and therefore, the hair picture needs to be captured from the back human body image in advance according to the hair labeling frame and stored, so as to obtain the hair picture data set.
Step S262: and determining a head labeling frame of the acquired image.
Namely, determining a head marking frame of the non-back human body image.
Step S263: and randomly acquiring a hair picture from the stored hair pictures.
Step S264: covering the obtained hair picture at the position of the head marking frame of the obtained image according to the size of the head marking frame so as to carry out mapping augmentation processing, and storing the image after mapping augmentation processing.
For example, traversing each hair labeling frame in the back human body image, capturing a hair image according to the hair labeling frame of the back human body image, and storing the hair image into a hair image data set; traversing each head marking frame in the non-back human body image, randomly acquiring a hair picture from the hair picture data set, interpolating the hair picture to the same size according to 1.5 times of the width w of the head marking frame, keeping the natural proportion of the hair picture, pasting the hair picture to the height and position slightly higher than the head marking frame according to x1-0.25w, y1 and 1.5w of the head marking frame, and cutting the hair picture exceeding the human body marking frame; and storing the non-back human body image subjected to the mapping augmentation treatment, and taking the stored non-back human body image as a training sample of the human body detection model. As shown in fig. 7 and 8, fig. 7 is a front human body image, i.e., a non-back human body image in the human body image database, which is obtained by performing mapping and augmentation processing on the front human body image shown in fig. 8, and storing the front human body image.
Step S270: and carrying out perspective transformation and augmentation processing on the image.
In this embodiment, the images obtained in step S230, step S240, step S250, or step S260 are subjected to perspective transformation and augmentation processing, that is, if the obtained images are back human body images, a probability value is randomly generated, and if the generated probability value is greater than or equal to a preset threshold, the obtained images are subjected to occlusion augmentation processing and perspective transformation and augmentation processing; otherwise, only perspective transformation augmentation processing is carried out; if the acquired image is a non-back human body image, a probability value is randomly generated, if the generated probability value is larger than or equal to a preset threshold value, mapping augmentation processing and perspective transformation augmentation processing are carried out on the acquired image, otherwise, only perspective transformation augmentation processing is carried out, the image subjected to the perspective transformation augmentation processing is used as a training sample of the human body detection model by carrying out the perspective transformation augmentation processing on the image in the human body image database, and the diversity of data is further improved, so that the robustness of the human body detection model is further improved.
In some embodiments, as shown in fig. 9, step S270: the perspective transformation and augmentation processing of the image specifically comprises:
step S271: and traversing the human body labeling frame of the image obtained in the step S230, the step S240, the step S250 or the step S260, and determining the minimum enclosing frame of the human body.
Among them, it should be noted that: the image obtained in step S230 is the corresponding acquired back human body image when the generated probability value is smaller than the preset threshold value; the image obtained in step S240 is an image obtained after the occlusion augmentation process; the image obtained in step S250 is a non-back human body image obtained correspondingly when the generated probability value is smaller than a preset threshold; the image obtained in step S260 is an image obtained after the mapping augmentation process.
Step S272: one corner of the image obtained in step S230, step S240, step S250, or step S260 is randomly selected, and one side of the corner is randomly selected.
Step S273: and randomly generating an adduction value, wherein the adduction value is less than or equal to the distance from the minimum enclosing frame to the selected edge.
Step S274: and performing perspective transformation augmentation processing on the image obtained in step S230, step S240, step S250 or step S260 according to the selected corner, the selected side and the adduction value by using a perspective transformation function.
For example, traversing a human body labeling frame in the picture to find a minimum bounding frame; obtaining four corner points (p1, p2, p3, p4) of the image obtained in step S230, step S240, step S250, or step S260, where p is (x, y); randomly selecting one of the four corners, assuming that the selected corner is P1, and randomly selecting one side (one of the two sides) of the corner P1; randomly generating an adduction value x ', wherein the randomly generated adduction value is less than or equal to the distance from the minimum enclosing frame to the selected edge, and obtaining four corner points (p1', p2, p3 and p4) corresponding to the perspective transformation of the image, wherein p1 'is (x-x', y); and performing perspective transformation on the image according to four corner points (p1', p2, p3, p4), p1 ═ x-x', y) and the selected edges by using a perspective transformation function to obtain an image subjected to perspective transformation and amplification treatment, storing the image, and taking the stored back human body image as a training sample of the human body detection model. For example, as shown in fig. 10 and 11, fig. 10 is a front human body image obtained in step S250, which is subjected to perspective transformation and amplification processing to obtain an image shown in fig. 11, and the image is saved and used as a training sample of the human body detection model.
Step S280: judging whether the images in the human body image database are all acquired, if not, returning to execute the step S210; if yes, go to S290: and finishing data amplification of the images in the human body image database to obtain the human body image database subjected to data amplification processing.
In this embodiment, step S280 determines whether all the images in the human body image database have been acquired, and if not, returns to step S210; if so, completing data augmentation to obtain a human body image database after data augmentation, and training the human body detection model by using the human body image database after data augmentation to improve the detection capability of the human body detection model on the back human body; and the human body image database after data amplification processing has rich sample diversity, and the robustness of the human body detection model is ensured.
In the embodiment, the back human body images with certain probability in the human body image database are shielded and augmented, and the non-back human body images with certain probability are mapped and augmented, so that the number and diversity of training samples are increased; and the perspective transformation augmentation processing of all images further increases the diversity of human body images, so that the human body detection model obtained by training the human body image database obtained by the method has better detection rate and stronger robustness for the back human body.
The following is an embodiment of a data augmentation system provided in the detailed description of the present invention, which is implemented based on the above-mentioned embodiment of the data augmentation method, and please refer to the above-mentioned embodiment of the data augmentation method.
Please refer to fig. 12, which is a block diagram illustrating a data augmentation system according to a first embodiment of the present invention. As shown in fig. 12, the data augmentation system includes:
the image acquiring module 61 is configured to sequentially acquire an image from a human body image database.
And the judging module 62 is configured to judge whether the acquired image is a back human body image.
And a probability generating and judging module 63, configured to randomly generate a probability value, and judge whether the generated probability value is greater than or equal to a preset threshold.
And the shielding augmentation module 64 is used for shielding 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 value.
And the map augmentation module 65 is configured to perform map augmentation processing on the acquired image if the acquired image is a non-back human body image and a probability value greater than or equal to a preset threshold is randomly generated.
In summary, in the embodiment, the human body detection model trained by the obtained human body image database has a higher detectable rate and a higher robustness for the back human body by performing the shielding augmentation processing on the back human body image with a certain probability in the human body image database and performing the mapping augmentation processing on the non-back human body image with a certain probability.
Please refer to fig. 13, which is a block diagram illustrating a second embodiment of a data augmentation system according to an embodiment of the present invention. As shown in fig. 13, the data augmentation system includes:
the image acquiring module 71 is configured to sequentially acquire an image from a human body image database.
And the judging module 72 is configured to judge whether the acquired image is a back human body image.
And a probability generating and judging module 73, configured to randomly generate a probability value, and judge whether the generated probability value is greater than or equal to a preset threshold.
And the shielding augmentation module 74 is configured to perform shielding 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.
In some embodiments, the occlusion augmentation module 74 is specifically configured to:
acquiring a human body marking frame and a hair marking frame of the image;
acquiring a random vertical coordinate between the minimum vertical coordinate of the human body labeling frame and the minimum vertical coordinate of the hair labeling frame;
replacing the pixel value of the area between the minimum vertical coordinate and the random vertical coordinate in the human body labeling frame with a random uniform pixel value to carry out shielding and augmentation treatment;
and modifying the minimum vertical coordinate of the human body labeling frame as the random vertical coordinate, and storing the image after shielding and amplifying processing.
And a map augmentation module 75, configured to perform map augmentation on the acquired image if the acquired image is a non-back human body image and a probability value greater than or equal to a preset threshold is randomly generated.
In some embodiments, the map augmentation module 75 is specifically configured to:
cutting a hair picture from the back human body image in advance according to the hair marking frame and storing the hair picture;
determining a head labeling frame of the obtained image;
randomly acquiring a hair picture from the stored hair pictures;
covering the obtained hair picture at the position of the head marking frame of the obtained image according to the size of the head marking frame so as to carry out mapping augmentation processing, and storing the image after mapping augmentation processing.
And a perspective transformation and augmentation module 76 for performing perspective transformation and augmentation processing on the image obtained by the system.
The image obtained by the system is the image obtained by the probability generation and judgment module 73, the occlusion augmentation module 74 or the mapping augmentation module 75, and specific contents refer to the embodiment of the data augmentation method provided in the embodiment of the present invention, and are not described herein again.
In some embodiments, perspective transformation augmentation module 76 is specifically configured to:
traversing a human body labeling frame of the image obtained by the system, and determining a minimum enclosing frame of the human body;
randomly selecting one corner of an image obtained by a system and randomly selecting one side of the corner;
randomly generating an adduction value, wherein the adduction value is less than or equal to the distance from the minimum enclosing frame to the selected edge;
and carrying out perspective transformation augmentation processing on the image obtained by the system according to the selected angle, the selected edge and the adduction value by utilizing a perspective transformation function.
In summary, the data augmentation system provided in this embodiment performs the occlusion augmentation process on the back human body images with a certain probability in the human body image database, and performs the mapping augmentation process on the non-back human body images with a certain probability, so as to increase the number and diversity of training samples; and the perspective transformation augmentation processing of all images further increases the diversity of human body images, so that the human body detection model obtained by training the human body image database obtained by the method has better detection rate and stronger robustness for the back human body.
The embodiment of the invention also provides a human body detection model, and the image database adopted during the training of the human body detection model is the human body image database which is subjected to the amplification treatment by using the data amplification method provided by the embodiment of the invention, so that the human body detection rate on the back side is better, and the human body detection model has stronger robustness; for a specific data amplification method, please refer to the contents in the foregoing specific embodiments of the data amplification method, which are not described herein again.
The technical principle of the present invention is described above in connection with specific embodiments. The description is made for the purpose of illustrating the principles of the invention and should not be construed in any way as limiting the scope of the invention. Based on the explanations herein, those skilled in the art will be able to conceive of other embodiments of the present invention without inventive effort, which would fall within the scope of the present invention.

Claims (10)

1. A data augmentation method, comprising:
A. sequentially acquiring an image from a human body image database;
B. judging whether the acquired image is a back human body image; if yes, executing the step C; if not, executing the step D;
C. randomly generating a probability value, and if the generated probability value is greater than or equal to a preset threshold value, carrying out shielding and amplification processing on the acquired image; executing the step E;
D. randomly generating a probability value, and if the generated probability value is greater than or equal to a preset threshold value, performing mapping augmentation processing on the acquired image; executing the step E;
E. and C, returning to the step A until the images in the human body image database are all obtained.
2. The data augmentation method of claim 1, wherein the occlusion augmentation process on the acquired image comprises:
acquiring a human body marking frame and a hair marking frame of the image;
acquiring a random vertical coordinate between the minimum vertical coordinate of the human body labeling frame and the minimum vertical coordinate of the hair labeling frame;
replacing the pixel value of the area between the minimum vertical coordinate and the random vertical coordinate in the human body labeling frame with a random uniform pixel value to carry out shielding and augmentation treatment;
and modifying the minimum vertical coordinate of the human body labeling frame as the random vertical coordinate, and storing the image after shielding and amplifying processing.
3. The data augmentation method of claim 1, wherein the mapping augmentation process on the acquired image comprises:
cutting a hair picture from the back human body image in advance according to the hair marking frame and storing the hair picture;
determining a head labeling frame of the obtained image;
randomly acquiring a hair picture from the stored hair pictures;
covering the obtained hair picture at the position of the head marking frame of the obtained image according to the size of the head marking frame so as to carry out mapping augmentation processing, and storing the image after mapping augmentation processing.
4. The data augmentation method of claim 1, wherein step E is preceded by:
if the generated probability value is smaller than a preset threshold value, carrying out perspective transformation and augmentation processing on the acquired image;
carrying out perspective transformation augmentation processing on the image subjected to shielding augmentation processing;
and performing perspective transformation and augmentation processing on the image subjected to the mapping augmentation processing.
5. The data augmentation method according to claim 4, wherein the performing perspective transformation augmentation specifically comprises:
traversing a human body labeling frame of the image, and determining a minimum enclosing frame of the human body;
randomly selecting a corner of the image, and randomly selecting one side of the corner;
randomly generating an adduction value, wherein the adduction value is less than or equal to the distance from the minimum enclosing frame to the selected edge;
and carrying out perspective transformation augmentation processing on the image according to the selected angle, the selected edge and the adduction value by utilizing a perspective transformation function.
6. The data augmentation method of claim 1, further comprising: and if the generated probability value is smaller than a preset threshold value, the acquired image is directly subjected to perspective transformation and augmentation processing.
7. A data augmentation system, comprising:
the image acquisition module is used for acquiring an image from a human body image database;
the judging module is used for judging whether the acquired image is a back human body image;
the probability generation and judgment module is used for randomly generating a probability value and judging whether the generated probability value is greater than or equal to a preset threshold value;
the shielding and amplifying module is used for shielding and amplifying the acquired image if the acquired image is a back human body image and the probability value generated by the probability generating module is greater than or equal to a preset threshold value;
and the map augmentation module is used for carrying out map augmentation processing on the acquired image if the acquired image is a non-back human body image and a probability value greater than or equal to a preset threshold value is randomly generated.
8. The data augmentation system of claim 7, wherein the occlusion augmentation module is specifically configured to:
acquiring a human body marking frame and a hair marking frame of the image;
acquiring a random vertical coordinate between the minimum vertical coordinate of the human body labeling frame and the minimum vertical coordinate of the hair labeling frame;
replacing the pixel value of the area between the minimum vertical coordinate and the random vertical coordinate in the human body labeling frame with a random uniform pixel value to carry out shielding and augmentation treatment;
and modifying the minimum vertical coordinate of the human body labeling frame as the random vertical coordinate, and storing the image after shielding and amplifying processing.
9. The data augmentation system of claim 7, wherein the map augmentation module is specifically configured to:
cutting a hair picture from the back human body image in advance according to the hair marking frame and storing the hair picture;
determining a head labeling frame of the obtained image;
randomly acquiring a hair picture from the stored hair pictures;
covering the obtained hair picture at the position of the head marking frame of the obtained image according to the size of the head marking frame so as to carry out mapping augmentation processing, and storing the image after mapping augmentation processing.
10. A human body test model, characterized in that the human body test model is trained by using a human body image database obtained by the data augmentation method according to any one of claims 1 to 6.
CN202010734361.4A 2020-07-27 2020-07-27 Data augmentation method and system and human body detection model Pending CN111914725A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010734361.4A CN111914725A (en) 2020-07-27 2020-07-27 Data augmentation method and system and human body detection model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010734361.4A CN111914725A (en) 2020-07-27 2020-07-27 Data augmentation method and system and human body detection model

Publications (1)

Publication Number Publication Date
CN111914725A true CN111914725A (en) 2020-11-10

Family

ID=73281900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010734361.4A Pending CN111914725A (en) 2020-07-27 2020-07-27 Data augmentation method and system and human body detection model

Country Status (1)

Country Link
CN (1) CN111914725A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112633392A (en) * 2020-12-29 2021-04-09 博微太赫兹信息科技有限公司 Terahertz human body security inspection image target detection model training data augmentation method
CN112819089A (en) * 2021-02-19 2021-05-18 东南大学 Free deformation-based conductive particle data augmentation method and system and detection model

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108921070A (en) * 2018-06-22 2018-11-30 北京旷视科技有限公司 Image processing method, model training method and corresponding intrument
CN109063748A (en) * 2018-07-16 2018-12-21 重庆大学 Object detection method based on data enhancing
CN109544496A (en) * 2018-11-19 2019-03-29 南京旷云科技有限公司 Generation method, the training method and device of object detection model of training data
CN110175575A (en) * 2019-05-29 2019-08-27 南京邮电大学 A kind of single Attitude estimation method based on novel high-resolution network model
CN110288614A (en) * 2019-06-24 2019-09-27 睿魔智能科技(杭州)有限公司 Image processing method, device, equipment and storage medium
CN110599445A (en) * 2019-07-24 2019-12-20 安徽南瑞继远电网技术有限公司 Target robust detection and defect identification method and device for power grid nut and pin
CN111311475A (en) * 2020-02-21 2020-06-19 广州腾讯科技有限公司 Detection model training method and device, storage medium and computer equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108921070A (en) * 2018-06-22 2018-11-30 北京旷视科技有限公司 Image processing method, model training method and corresponding intrument
CN109063748A (en) * 2018-07-16 2018-12-21 重庆大学 Object detection method based on data enhancing
CN109544496A (en) * 2018-11-19 2019-03-29 南京旷云科技有限公司 Generation method, the training method and device of object detection model of training data
CN110175575A (en) * 2019-05-29 2019-08-27 南京邮电大学 A kind of single Attitude estimation method based on novel high-resolution network model
CN110288614A (en) * 2019-06-24 2019-09-27 睿魔智能科技(杭州)有限公司 Image processing method, device, equipment and storage medium
CN110599445A (en) * 2019-07-24 2019-12-20 安徽南瑞继远电网技术有限公司 Target robust detection and defect identification method and device for power grid nut and pin
CN111311475A (en) * 2020-02-21 2020-06-19 广州腾讯科技有限公司 Detection model training method and device, storage medium and computer equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112633392A (en) * 2020-12-29 2021-04-09 博微太赫兹信息科技有限公司 Terahertz human body security inspection image target detection model training data augmentation method
CN112819089A (en) * 2021-02-19 2021-05-18 东南大学 Free deformation-based conductive particle data augmentation method and system and detection model
CN112819089B (en) * 2021-02-19 2024-03-08 东南大学 Free deformation-based conductive particle data augmentation method, system and detection model

Similar Documents

Publication Publication Date Title
Jiang et al. Unsupervised decomposition and correction network for low-light image enhancement
Peng et al. Image haze removal using airlight white correction, local light filter, and aerial perspective prior
US10565691B2 (en) Method of multi-view deblurring for 3D shape reconstruction, recording medium and device for performing the method
CN108564551A (en) Fish eye images processing method and fish eye images processing unit
CN111914725A (en) Data augmentation method and system and human body detection model
CN106412441B (en) A kind of video stabilization control method and terminal
CN103902730B (en) Thumbnail generation method and system
CN112330527A (en) Image processing method, image processing apparatus, electronic device, and medium
US11238302B2 (en) Method and an apparatus for performing object illumination manipulation on an image
CN114862725A (en) Method and device for realizing motion perception fuzzy special effect based on optical flow method
CN109934834A (en) Image outline extracting method and system
CN110598139A (en) Web browser augmented reality real-time positioning method based on 5G cloud computing
WO2022148248A1 (en) Image processing model training method, image processing method and apparatus, electronic device, and computer program product
CN109978907A (en) A kind of sitting posture of student detection method towards household scene
Hyun et al. Hardware architecture of a Haar classifier based face detection system using a skip scheme
EP4276733A1 (en) Image processing method and apparatus, and device and readable storage medium
CN111583357A (en) Object motion image capturing and synthesizing method based on MATLAB system
CN111144156B (en) Image data processing method and related device
CN111914723A (en) Data augmentation method and system for improving human body detection rate and human body detection model
WO2024139298A1 (en) Image labeling method and apparatus, and electronic device and storage medium
CN111160063B (en) Internet of things IPC two-dimensional code distribution network image enhancement method and system
CN111914722A (en) Data augmentation method, system and model for improving back human body detection rate
CN111797694B (en) License plate detection method and device
CN110310341A (en) Method, device, equipment and storage medium for generating default parameters in color algorithm
CN115187978A (en) Complex background seal identification method based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination