Method for generating deep learning samples

A deep learning and sample technology, applied in the field of image processing, can solve the problems of high cost and poor effect of collecting data and labeling data, saving time and labor costs, reducing preparation time and labor costs, and increasing robustness. sexual effect

CN108932735AActive Publication Date: 2018-12-04广州众聚智能科技有限公司
9 Cites 22 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2018-12-04

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing and discloses a method for generating deep learning samples. The invention comprises the following steps: acquiring an initial image taken under a pure color background; acquiring position and contour of a target image from the initial image, and intercepting the target image; performing data augmentation on the intercepted target image so as to obtain an initial data set of the target image; placing the current target image stochastically in a preset background image and performing Poisson image fusion after an arbitrary targetimage is selected from the initial data set, and recording the position of the current target image in the preset background image; repeating the previous step so as to form a target detection data set of deep learning. The invention reduces the preparation time cost, the labor cost and the hardware cost of the massive target data, generates a high-quality target detection data set, further provides a high-quality sample for deep learning, and increases the robustness of a target detection network.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention belongs to the technical field of image processing, and in particular relates to a method for generating deep learning samples. Background technique

[0002] In the multi-target detection tasks of image recognition, such as commodity recognition, signboard recognition, etc., deep learning methods are often used, which require a large amount of training sample data, and need to mark the targets in the image, but often collect data and mark data High cost is required.

[0003] At the same time, generally when the training sample set is small, data augmentation techniques are used, that is, operations such as rotating, cropping, and flipping the training image are used to expand the sample data set. However, this processing is too simple and does not increase the complexity of the background. The degree, so the application in the target detection task, the effect is not good. Contents of the invention

[0004] In order to solve the above...

Examples

Embodiment

[0045] Such as figure 1 As shown, this embodiment provides a method for generating deep learning samples, including the following steps:

[0046] S1. Collect initial images taken under a solid-color background; the initial images can be one or multiple.

[0047] S2. Obtain the position and outline of the target image from the initial image, and intercept the target image;

[0048] In this embodiment, in step S2, the morphological gradient of the initial image is firstly calculated, followed by threshold segmentation, and then the position and contour of the target image are obtained.

[0049] In this embodiment, when calculating the morphological gradient of the initial image, according to the formula:

[0050] dst(x,y)=max{src(x-r:x+r,y-r:y+r)}-min{src(x-r:x+r,y-r:y+r)};

[0051] Among them, src is the initial image, src(x-r:x+r, y-r:y+r) is a square neighborhood, and the four corner coordinates of the square neighborhood are (x+r, y+r), (x-r, y-r ), (x+r, y-r) and (x-r, ...