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
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2018-12-04
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
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, ...