CN109146830A - For generating the method, apparatus, system and storage medium of training data - Google Patents

For generating the method, apparatus, system and storage medium of training data Download PDF

Info

Publication number
CN109146830A
CN109146830A CN201810785130.9A CN201810785130A CN109146830A CN 109146830 A CN109146830 A CN 109146830A CN 201810785130 A CN201810785130 A CN 201810785130A CN 109146830 A CN109146830 A CN 109146830A
Authority
CN
China
Prior art keywords
image
training data
foreground
identified
foreground image
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
CN201810785130.9A
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.)
Beijing Megvii Technology Co Ltd
Original Assignee
Beijing Megvii Technology 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 Beijing Megvii Technology Co Ltd filed Critical Beijing Megvii Technology Co Ltd
Priority to CN201810785130.9A priority Critical patent/CN109146830A/en
Publication of CN109146830A publication Critical patent/CN109146830A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides a kind of for generating the method, apparatus, system and storage medium of training data, this method comprises: obtaining the image including scene as background image, and obtains the image including object to be identified as foreground image;And by predetermined position region that the foreground image is fitted in the background image to generate blending image, the blending image is as the training data.Method, apparatus, system and storage medium according to an embodiment of the present invention for generating training data using the image including object to be identified as foreground image by being fitted in the background image of all kinds of scenes, image of the object to be identified under all kinds of scenes can be quickly generated, so as to realize low cost, efficiently generate the training data for training to detection and/or the identification of object to be identified.

Description

For generating the method, apparatus, system and storage medium of training data
Technical field
The present invention relates to object identification depth learning technology fields, relate more specifically to a kind of for generating training data Method, apparatus, system and storage medium.
Background technique
The old process of the detection of object identification deep learning and recognizer is to need a large amount of acquisition objects in various scenes Under picture, ensure that model to the generalization ability of object identification in this way (modelling effect is good).Current process is all logical The picture that manually acquisition and network crawl to obtain object under all kinds of scenes is crossed, it is usually time-consuming and laborious, and also the project cycle is long.
Summary of the invention
The invention proposes a kind of schemes about for generating training data, by the figure that will include object to be identified As being fitted in the background image of all kinds of scenes as foreground image, object to be identified can be quickly generated under all kinds of scenes Image, so as to realize low cost, efficiently generate the training for training to detection and/or the identification of object to be identified Data.The scheme proposed by the present invention about for generating training data is briefly described below, more details will be in subsequent combination Attached drawing is described in a specific embodiment.
According to an aspect of the present invention, a kind of method for generating training data is provided, which comprises obtain packet The image of scene is included as background image, and obtains the image including object to be identified as foreground image;And will be described before The predetermined position region that scape image is fitted in the background image is to generate blending image, and the blending image is as the instruction Practice data.
In one embodiment, the method also includes: before implementing the fitting, by the attribute of the foreground image It is aligned with the attribute of the background image.
In one embodiment, the attribute includes color and/or angle.
In one embodiment, it is described by the foreground image be fitted in the predetermined position region in the background image with Generating blending image is based on Poisson clone algorithm.
In one embodiment, it is described by the foreground image be fitted in the predetermined position region in the background image with Generating blending image includes: the gradient fields for calculating separately the foreground image and the gradient fields of the background image;Based on described The gradient fields of the gradient field computation of the gradient fields of foreground image and background image image to be generated;Based on the figure to be generated The divergence of image to be generated described in the gradient field computation of picture;And the coefficient matrix of Poisson Reconstructed equation is solved, and based on described The divergence of coefficient matrix and the image to be generated calculates the pixel value of each pixel of the image to be generated, to generate Image to be generated is stated as the blending image.
In one embodiment, the image of the acquisition including object to be identified includes: that acquisition includes as foreground image The image of the object to be identified;It and will include the object to be identified from the image including the object to be identified Partial segmentation come out using as the foreground image.
In one embodiment, it is described obtain the foreground image further include obtain the foreground image identification information and Attribute information, the training data further include that the identification information, attribute information and the foreground image of the foreground image exist Location information in the blending image.
According to a further aspect of the invention, provide a kind of for generating the device of training data, described device includes: to obtain Module for obtaining the image including scene as background image, and obtains the image including object to be identified as foreground picture Picture;And fitting module, the predetermined position region for the foreground image to be fitted in the background image is melted with generating Image is closed, the blending image is as the training data.
In one embodiment, the fitting module is also used to: before implementing the fitting, by the foreground image The alignment of the attribute of attribute and the background image.
In one embodiment, the attribute includes color and/or angle.
In one embodiment, the foreground image is fitted in the pre-determined bit in the background image by the fitting module It is based on Poisson clone algorithm that region, which is set, to generate blending image.
In one embodiment, the foreground image is fitted in the pre-determined bit in the background image by the fitting module It includes: the gradient fields for calculating separately the foreground image and the gradient fields of the background image that region, which is set, to generate blending image; The gradient fields of the gradient field computation image to be generated of gradient fields and the background image based on the foreground image;Based on described The divergence of image to be generated described in the gradient field computation of image to be generated;And the coefficient matrix of Poisson Reconstructed equation is solved, and Divergence based on the coefficient matrix and the image to be generated calculates the pixel value of each pixel of the image to be generated, To generate the image to be generated as the blending image.
In one embodiment, the image of the module acquisition including object to be identified that obtain includes: as foreground image Obtain the image including the object to be identified;And from the image including the object to be identified will include it is described to Identify that the partial segmentation of object comes out using as the foreground image.
In one embodiment, it further includes the mark for obtaining the foreground image that the acquisition module, which obtains the foreground image, Know information and attribute information, the training data further include the identification information of the foreground image, attribute information and it is described before Location information of the scape image in the blending image.
Another aspect according to the present invention provides a kind of system for generating training data, and the system comprises storages Device and processor are stored with the computer program run by the processor, the computer program on the storage device The method described in any of the above embodiments for generating training data is executed when being run by the processor.
According to a further aspect of the present invention, a kind of storage medium is provided, is stored with computer program on the storage medium, The computer program executes the method described in any of the above embodiments for generating training data at runtime.
Method, apparatus, system and storage medium according to an embodiment of the present invention for generating training data will be by that will wrap The image for including object to be identified is fitted in the background image of all kinds of scenes as foreground image, and it is to be identified right to quickly generate As the image under all kinds of scenes, so as to realize low cost, efficiently generate the inspection for training to object to be identified The training data surveyed and/or identified.
Detailed description of the invention
The embodiment of the present invention is described in more detail in conjunction with the accompanying drawings, the above and other purposes of the present invention, Feature and advantage will be apparent.Attached drawing is used to provide to further understand the embodiment of the present invention, and constitutes explanation A part of book, is used to explain the present invention together with the embodiment of the present invention, is not construed as limiting the invention.In the accompanying drawings, Identical reference label typically represents same parts or step.
Fig. 1 shows for realizing the method, apparatus according to an embodiment of the present invention for being used to generate training data, system and deposits The schematic block diagram of the exemplary electronic device of storage media;
Fig. 2 shows according to an embodiment of the present invention for generating the schematic flow chart of the method for training data;
Fig. 3 shows according to an embodiment of the present invention for generating the schematic block diagram of the device of training data;And
Fig. 4 shows according to an embodiment of the present invention for generating the schematic block diagram of the system of training data.
Specific embodiment
In order to enable the object, technical solutions and advantages of the present invention become apparent, root is described in detail below with reference to accompanying drawings According to example embodiments of the present invention.Obviously, described embodiment is only a part of the embodiments of the present invention, rather than this hair Bright whole embodiments, it should be appreciated that the present invention is not limited by example embodiment described herein.Based on described in the present invention The embodiment of the present invention, those skilled in the art's obtained all other embodiment in the case where not making the creative labor It should all fall under the scope of the present invention.
Firstly, referring to Fig.1 come describe for realizing the embodiment of the present invention for generate training data method, apparatus, System and the exemplary electronic device of storage medium 100.
As shown in Figure 1, electronic equipment 100 include one or more processors 102, it is one or more storage device 104, defeated Enter device 106 and output device 108, these components (are not shown by the bindiny mechanism of bus system 110 and/or other forms It interconnects out).It should be noted that the component and structure of electronic equipment 100 shown in FIG. 1 are illustrative, and not restrictive, root According to needs, the electronic equipment also can have other assemblies and structure.
The processor 102 can be central processing unit (CPU), graphics processing unit (GPU) or have at data The processing unit of reason ability and/or the other forms of instruction execution capability, and can control its in the electronic equipment 100 Its component is to execute desired function.
The storage device 104 may include one or more computer program products, and the computer program product can To include various forms of computer readable storage mediums, such as volatile memory and/or nonvolatile memory.It is described easy The property lost memory for example may include random access memory (RAM) and/or cache memory (cache) etc..It is described non- Volatile memory for example may include read-only memory (ROM), hard disk, flash memory etc..In the computer readable storage medium On can store one or more computer program instructions, processor 102 can run described program instruction, to realize hereafter institute The client functionality (realized by processor) in the embodiment of the present invention stated and/or other desired functions.In the meter Can also store various application programs and various data in calculation machine readable storage medium storing program for executing, for example, the application program use and/or The various data etc. generated.
The input unit 106 can be the device that user is used to input instruction, and may include keyboard, mouse, wheat One or more of gram wind and touch screen etc..
The output device 108 can export various information (such as image or sound) to external (such as user), and It may include one or more of display, loudspeaker etc..
Illustratively, for realizing according to an embodiment of the present invention for generating the example of the method and apparatus of training data Electronic equipment can be such as smart phone, tablet computer etc. mobile terminal.Illustratively, for realizing real according to the present invention Applying the exemplary electronic device of the method and apparatus by generating training data of example may be any with based on computing capability Calculate equipment.
In the following, reference Fig. 2 is described the method 200 according to an embodiment of the present invention for being used to generate training data.Such as Fig. 2 institute Show, the method 200 for generating training data may include steps of:
In step S210, the image including scene is obtained as background image, and obtains the image including object to be identified As foreground image.
In one example, template largely including all kinds of scenes can be prepared in advance, then pass through image collector Set all kinds of scene backgrounds of (such as mobile phone, camera etc.) real scene shooting, with obtain include all kinds of scenes a large amount of background image.Another In a example, can by interconnect network method (such as being crawled by network) obtain include all kinds of scenes a large amount of Background Picture.In other examples, the image including scene can be obtained as background image by any other suitable means.Show Example property, different background images may include the image under different scenes.Illustratively, different background images can also wrap Include the image of different illumination, different angle etc. under Same Scene.
In one example, available includes object to be identified (such as pedestrian, face, animal, vehicle, text etc.) Then partial segmentation including object to be identified is come out from the image including object to be identified and is used as foreground image by image. For example, the image of object to be identified can be shot, then the extracting section of object to be identified in the captured image is come out, is picked Except remaining background parts using obtain include the object to be identified image section as foreground image.In another example, institute The foreground image of acquisition can be for only including the image of object to be identified.In other examples, it can also directly be obtained from any source Take including or only including object to be identified image as foreground image.
In step S220, the predetermined position region that the foreground image is fitted in the background image is merged with generating Image, the blending image is as the training data.
In embodiments of the present invention, since the position of the object to be identified in blending image is known, so not needing The position of object to be identified is marked in blending image, which is used directly for training, so as to realize it is low at Originally, the training data for training to detection and/or the identification of object to be identified is efficiently generated.
In one embodiment, (Seamless cloning) algorithm can be cloned based on Poisson come by the foreground image The predetermined position region being fitted in the background image is to generate blending image.In one example, described by the prospect The predetermined position region that image is fitted in the background image may include: to calculate separately the prospect to generate blending image The gradient fields of the gradient fields of image and the background image;The ladder of gradient fields and the background image based on the foreground image The gradient fields for spending field computation image to be generated (are replaced using the gradient fields of foreground image described predetermined in the background image The gradient fields of the band of position);The divergence of image to be generated described in gradient field computation based on the image to be generated;And it solves The coefficient matrix of Poisson Reconstructed equation, and it is described to be generated based on the calculating of the divergence of the coefficient matrix and the image to be generated The pixel value of each pixel of image, to generate the image to be generated as the blending image.Such as Poisson reconstruction side Journey is Ax=b, and wherein A indicates that coefficient matrix, x indicate that the pixel value of each pixel in image to be generated, b indicate figure to be generated The divergence of picture can solve x according to A and b.
In another example, it is described by the foreground image be fitted in the predetermined position region in the background image with Generate blending image may include: calculate separately the foreground image gradient fields and the background image except the pre-determined bit Set the gradient fields other than region;Gradient fields and the background image based on the foreground image remove the predetermined position region The gradient fields of gradient field computation image to be generated in addition are (that is, add the background image for the gradient fields of the foreground image The gradient fields in addition to the predetermined position region obtain the gradient fields of image to be generated);Based on the image to be generated Gradient field computation described in image to be generated divergence;And the coefficient matrix of Poisson Reconstructed equation is solved, and be based on the system The divergence of matrix number and the image to be generated calculates the pixel value of each pixel of the image to be generated, described in generating Image to be generated is as the blending image.
In other embodiments, the foreground image can also be fitted in using any other suitable method described Predetermined position region in background image is to generate blending image.
It in one embodiment, can before the predetermined position region being fitted in foreground image in the background image To be first aligned the attribute of the attribute of foreground image and background image, such as the color of foreground image, angle etc. can be belonged to Property is each self-aligned with the attributes such as the color of background image, angle respectively, can make melting for background image and foreground image in this way It is more natural to close effect.In other embodiments, other any suitable places can also be implemented to foreground image and background image It manages to improve the syncretizing effect of the two.
It in an embodiment of the present invention, can be in the Background for the every background image obtained in step S210 The band of position for being bonded foreground image is preset as in, that is to say, that in the blending image formed after fitting, prospect The band of position where image (i.e. object to be identified) is known.Further, in an embodiment of the present invention, before acquisition When scape image, it can while obtaining the identification information even attribute information of foreground image.Wherein, the identification information of foreground image It can indicate that the classification of object to be identified, such as instruction object to be identified are pedestrians, are faces, are animals, are vehicles, are texts Or other classifications etc..Correspondingly, the attribute information of foreground image can indicate each attribute of object to be identified.For example, When object to be identified is pedestrian, attribute information may include gender, age, clothing, posture, hair style of pedestrian etc.;When to When identifying that object is face, whether attribute information may include expression, gender, the age, hair style, makes up;When to be identified right When as vehicle, attribute information may include brand, vehicle, color, height, license plate number of vehicle etc..Therefore, foreground image The identification information and attribute information of the location information and foreground image in blending image formed after fitting can be Know, in this way, can be directly as the instruction for training to detection and/or the identification of object to be identified after forming blending image Practice data to come using can further improve efficiency without being labeled.
Based on above description, the method according to an embodiment of the present invention for generating training data will be by that will include wait know The image of other object is fitted in the background image of all kinds of scenes as foreground image, can quickly generate object to be identified each Image under class scene, so as to realize low cost, efficiently generate for training to the detection of object to be identified and/or The training data of identification.
The method according to an embodiment of the present invention for generating training data is described above exemplarily.Illustratively, It is according to an embodiment of the present invention for generate training data method can with memory and processor unit or It is realized in person's system.
In addition, the method according to an embodiment of the present invention for generating training data is deployed to intelligent hand in which can be convenient In the mobile devices such as machine, tablet computer, personal computer.Alternatively, according to an embodiment of the present invention for generating training data Method can also be deployed in server end (or cloud).Alternatively, according to an embodiment of the present invention for generating training data Method can also be deployed in being distributed at server end (or cloud) and personal terminal.
The device for being used to generate training data of another aspect of the present invention offer is described below with reference to Fig. 3.Fig. 3 shows root According to the schematic block diagram of the device 300 for generating training data of the embodiment of the present invention.
As shown in figure 3, the device 300 according to an embodiment of the present invention for generating training data includes obtaining module 310 With fitting module 320.The modules can execute the method for generating training data above in conjunction with Fig. 2 description respectively Each step/function.Only the major function of each module of the device 300 for generating training data is described below, And omit the detail content having been described above.
It obtains module 310 and is used to obtain the image including scene as background image, and obtaining includes object to be identified Image is as foreground image.The predetermined position that fitting module 320 is used to be fitted in the foreground image in the background image Region is to generate blending image, and the blending image is as the training data.Obtain module 310 and fitting module 320 It is realized with the program instruction that is stored in 102 Running storage device 104 of processor in electronic equipment as shown in Figure 1.
In one example, template largely including all kinds of scenes can be prepared in advance, then pass through image collector Set all kinds of scene backgrounds of (such as mobile phone, camera etc.) real scene shooting, with obtained by acquisition module 310 include all kinds of scenes a large amount of back Scape image.In another example, obtaining module 310 can be included by interconnecting network method (such as crawling by network) The a large amount of background image of all kinds of scenes.In other examples, obtain module 310 can by any other suitable means come The image including scene is obtained as background image.Illustratively, different background images may include the figure under different scenes Picture.Illustratively, different background images can also include the image of different illumination, different angle etc. under Same Scene.
In one example, it includes object to be identified (such as pedestrian, face, animal, vehicle that it is available, which to obtain module 310, , text etc.) image, then from include object to be identified image in will include that the partial segmentation of object to be identified comes out and makees For foreground image.For example, can be using the image of image collecting device shooting object to be identified, then obtaining module 310 should The extracting section of object to be identified comes out in captured image, rejects remaining background parts to obtain including the object to be identified Image section is as foreground image.In another example, obtain foreground image acquired in module 310 can for only include to Identify the image of object.In other examples, acquisition module 310 can also directly from any source, acquisition includes or only includes wait know The image of other object is as foreground image.
In one embodiment, the foreground image can be fitted in by fitting module 320 based on Poisson clone algorithm Predetermined position region in the background image is to generate blending image.In one example, the fitting module 320 will be described The predetermined position region that foreground image is fitted in the background image with generate blending image may include: calculate separately it is described The gradient fields of the gradient fields of foreground image and the background image;Gradient fields and the background image based on the foreground image Gradient field computation image to be generated gradient fields (i.e. using foreground image gradient fields replace it is described in the background image The gradient fields in predetermined position region);The divergence of image to be generated described in gradient field computation based on the image to be generated;And Solve the coefficient matrix of Poisson Reconstructed equation, and based on the divergence of the coefficient matrix and the image to be generated calculate it is described to The pixel value for generating each pixel of image, to generate the image to be generated as the blending image.
In another example, the foreground image is fitted in pre- in the background image by the fitting module 320 Location area may include: the gradient fields for calculating separately the foreground image and the background image to generate blending image Gradient fields in addition to the predetermined position region;Removing for gradient fields and the background image based on the foreground image is described The gradient fields of gradient field computation image to be generated other than the region of predetermined position are (that is, the gradient fields of the foreground image are added The gradient fields in addition to the predetermined position region of the background image obtain the gradient fields of image to be generated);Based on institute State the divergence of image to be generated described in the gradient field computation of image to be generated;And the coefficient matrix of Poisson Reconstructed equation is solved, And the divergence based on the coefficient matrix and the image to be generated calculates the pixel of each pixel of the image to be generated Value, to generate the image to be generated as the blending image.
In other embodiments, fitting module 320 can also use any other suitable method by the foreground picture As the predetermined position region being fitted in the background image is to generate blending image.
In one embodiment, before the predetermined position region being fitted in foreground image in the background image, patch Can first the attribute of the attribute of foreground image and background image be aligned by molding block 320, such as can be by the face of foreground image The attributes such as color, angle are each self-aligned with the attributes such as the color of background image, angle respectively, can make background image with before in this way The syncretizing effect of scape image is more natural.In other embodiments, fitting module 320 can also be to foreground image and background image Implement other any suitable processing to improve the syncretizing effect of the two.
In an embodiment of the present invention, it for every acquired background image, can be set in advance in the background image Determine the band of position for being bonded foreground image, that is to say, that in the blending image formed after fitting, foreground image (i.e. to Identify object) where the band of position be known.Further, in an embodiment of the present invention, the acquisition of module 310 is being obtained When foreground image, it can while obtaining the identification information even attribute information of foreground image.Wherein, the mark letter of foreground image Breath can indicate that the classification of object to be identified, such as instruction object to be identified are pedestrians, are faces, are animals, are vehicles, are texts Word or other classifications etc..Correspondingly, the attribute information of foreground image can indicate each attribute of object to be identified.Example Such as, when object to be identified is pedestrian, attribute information may include gender, age, clothing, posture, hair style of pedestrian etc.;When When object to be identified is face, whether attribute information may include expression, gender, the age, hair style, makes up;When to be identified When object is vehicle, attribute information may include brand, vehicle, color, height, license plate number of vehicle etc..Therefore, foreground picture As the identification information and attribute information of location information and foreground image in the blending image that is formed after fitting can be It is known, in this way, after forming blending image can directly as training to the detection of object to be identified and/or identification Training data comes using can further improve efficiency without being labeled.
Based on above description, the device according to an embodiment of the present invention for generating training data will be by that will include wait know The image of other object is fitted in the background image of all kinds of scenes as foreground image, can quickly generate object to be identified each Image under class scene, so as to realize low cost, efficiently generate for training to the detection of object to be identified and/or The training data of identification.
Fig. 4 shows according to an embodiment of the present invention for generating the schematic block diagram of the system 400 of training data.For The system 400 for generating training data includes storage device 410 and processor 420.
Wherein, the storage of storage device 410 is for realizing the method according to an embodiment of the present invention for generating training data In corresponding steps program code.Program code of the processor 420 for being stored in Running storage device 410, to execute root According to the corresponding steps of the method for generating training data of the embodiment of the present invention, and for realizing according to embodiments of the present invention For generating the corresponding module in the device of training data.In addition, the system 400 for generating training data can also include Image collecting device (not shown in FIG. 4), can be used for acquiring background image and foreground image.Certainly, image collector It sets and is not required, can directly receive the input of background image and foreground image from other sources.
In one embodiment, make when said program code is run by processor 420 for generating training data System 400 executes following steps: obtaining the image including scene as background image, and obtains the image including object to be identified As foreground image;And by predetermined position region that the foreground image is fitted in the background image to generate fusion figure Picture, the blending image is as the training data.
In one embodiment, also make when said program code is run by processor 420 for generating training data System 400 execute following steps: before implementing the fitting, by the attribute of the foreground image and the background image Attribute alignment.
In one embodiment, the attribute includes color and/or angle.
In one embodiment, make when said program code is run by processor 420 for generating training data The predetermined position region that the foreground image is fitted in the background image that system 400 executes is to generate fusion figure It seem based on Poisson clone algorithm.
In one embodiment, make when said program code is run by processor 420 for generating training data The predetermined position region that the foreground image is fitted in the background image that system 400 executes is to generate fusion figure Gradient fields as including: the gradient fields and background image for calculating separately the foreground image;Based on the foreground image The gradient fields of the gradient field computation of gradient fields and background image image to be generated;Gradient fields based on the image to be generated Calculate the divergence of the image to be generated;And solve the coefficient matrix of Poisson Reconstructed equation, and based on the coefficient matrix and The divergence of the image to be generated calculates the pixel value of each pixel of the image to be generated, to generate the figure to be generated As being used as the blending image.
In one embodiment, make when said program code is run by processor 420 for generating training data The acquisition that system 400 executes includes that the image of object to be identified as foreground image includes: to obtain including described to be identified The image of object;And by the partial segmentation including the object to be identified from the image including the object to be identified Out using as the foreground image.
In one embodiment, make when said program code is run by processor 420 for generating training data The acquisition foreground image that system 400 executes further includes the identification information and attribute information for obtaining the foreground image, The training data further includes the identification information, attribute information and the foreground image of the foreground image in the fusion figure Location information as in.
In addition, according to embodiments of the present invention, additionally providing a kind of storage medium, storing program on said storage Instruction, when described program instruction is run by computer or processor for execute the embodiment of the present invention for generating trained number According to method corresponding steps, and for realizing the phase according to an embodiment of the present invention for generating in the device of training data Answer module.The storage medium for example may include the storage card of smart phone, the storage unit of tablet computer, personal computer Hard disk, read-only memory (ROM), Erasable Programmable Read Only Memory EPROM (EPROM), portable compact disc read-only memory (CD-ROM), any combination of USB storage or above-mentioned storage medium.The computer readable storage medium can be one Any combination of a or multiple computer readable storage mediums.
In one embodiment, the computer program instructions may be implemented real according to the present invention when being run by computer Each functional module of the device for generating training data of example is applied, and/or can be executed according to embodiments of the present invention The method for generating training data.
In one embodiment, the computer program instructions make computer or place when being run by computer or processor It manages device execution following steps: obtaining the image including scene as background image, and acquisition includes the image work of object to be identified For foreground image;And by predetermined position region that the foreground image is fitted in the background image to generate fusion figure Picture, the blending image is as the training data.
In one embodiment, the computer program instructions also make when being run by computer or processor computer or Processor executes following steps: before implementing the fitting, by the category of the attribute of the foreground image and the background image Property alignment.
In one embodiment, the attribute includes color and/or angle.
In one embodiment, the computer program instructions make computer or place when being run by computer or processor The predetermined position region that the foreground image is fitted in the background image of device execution is managed to generate blending image It is based on Poisson clone algorithm.
In one embodiment, the computer program instructions make computer or place when being run by computer or processor The predetermined position region that the foreground image is fitted in the background image of device execution is managed to generate blending image It include: the gradient fields for the gradient fields and background image for calculating separately the foreground image;Ladder based on the foreground image Spend the gradient fields of the gradient field computation image to be generated of field and the background image;Based on the gradient fields of the image to be generated Calculate the divergence of the image to be generated;And the coefficient matrix of Poisson Reconstructed equation is solved, and be based on the coefficient matrix and institute State image to be generated divergence calculate the image to be generated each pixel pixel value, to generate the image to be generated As the blending image.
In one embodiment, the computer program instructions make computer or place when being run by computer or processor Reason device execute the acquisition include object to be identified image as foreground image include: obtain include the object to be identified Image;And the partial segmentation including the object to be identified is come out from the image including the object to be identified Using as the foreground image.
In one embodiment, the computer program instructions make computer or place when being run by computer or processor Managing the acquisition foreground image that device executes further includes the identification information and attribute information for obtaining the foreground image, described Training data further includes the identification information, attribute information and the foreground image of the foreground image in the blending image Location information.
Each module in device according to an embodiment of the present invention for generating training data can be by according to the present invention The processor of the electronic equipment for generating training data of embodiment runs the computer program instructions stored in memory It realizes, or can be stored in the computer readable storage medium of computer program product according to an embodiment of the present invention Realization when computer instruction is run by computer.
Method, apparatus, system and storage medium according to an embodiment of the present invention for generating training data will be by that will wrap The image for including object to be identified is fitted in the background image of all kinds of scenes as foreground image, and it is to be identified right to quickly generate As the image under all kinds of scenes, so as to realize low cost, efficiently generate the inspection for training to object to be identified The training data surveyed and/or identified.
According to embodiments of the present invention, additionally provide a kind of computer program, the computer program can store beyond the clouds or On local storage medium.When the computer program is run by computer or processor for executing the use of the embodiment of the present invention In the corresponding steps for the method for generating training data, and for realizing according to an embodiment of the present invention for generating training data Device in corresponding module.
Although describing example embodiment by reference to attached drawing here, it should be understood that above example embodiment are only exemplary , and be not intended to limit the scope of the invention to this.Those of ordinary skill in the art can carry out various changes wherein And modification, it is made without departing from the scope of the present invention and spiritual.All such changes and modifications are intended to be included in appended claims Within required the scope of the present invention.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, apparatus embodiments described above are merely indicative, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied Another equipment is closed or is desirably integrated into, or some features can be ignored or not executed.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the present invention and help to understand one or more of the various inventive aspects, To in the description of exemplary embodiment of the present invention, each feature of the invention be grouped together into sometimes single embodiment, figure, Or in descriptions thereof.However, the method for the invention should not be construed to reflect an intention that i.e. claimed The present invention claims features more more than feature expressly recited in each claim.More precisely, such as corresponding power As sharp claim reflects, inventive point is that the spy of all features less than some disclosed single embodiment can be used Sign is to solve corresponding technical problem.Therefore, it then follows thus claims of specific embodiment are expressly incorporated in this specific Embodiment, wherein each, the claims themselves are regarded as separate embodiments of the invention.
It will be understood to those skilled in the art that any combination pair can be used other than mutually exclusive between feature All features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed any method Or all process or units of equipment are combined.Unless expressly stated otherwise, this specification (is wanted including adjoint right Ask, make a summary and attached drawing) disclosed in each feature can be replaced with an alternative feature that provides the same, equivalent, or similar purpose.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any Can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize some or all of some modules according to an embodiment of the present invention Function.The present invention is also implemented as some or all program of device (examples for executing method as described herein Such as, computer program and computer program product).It is such to realize that program of the invention can store in computer-readable medium On, or may be in the form of one or more signals.Such signal can be downloaded from an internet website to obtain, or Person is provided on the carrier signal, or is provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.
The above description is merely a specific embodiment or to the explanation of specific embodiment, protection of the invention Range is not limited thereto, and anyone skilled in the art in the technical scope disclosed by the present invention, can be easily Expect change or replacement, should be covered by the protection scope of the present invention.Protection scope of the present invention should be with claim Subject to protection scope.

Claims (10)

1. a kind of method for generating training data, which is characterized in that the described method includes:
The image including scene is obtained as background image, and obtains the image including object to be identified as foreground image;With And
By predetermined position region that the foreground image is fitted in the background image to generate blending image, the fusion figure As being used as the training data.
2. the method according to claim 1, wherein the method also includes:
Before implementing the fitting, the attribute of the attribute of the foreground image and the background image is aligned.
3. according to the method described in claim 2, it is characterized in that, the attribute includes color and/or angle.
4. method according to claim 1 or 2, which is characterized in that described that the foreground image is fitted in the background Predetermined position region in image is based on Poisson clone algorithm to generate blending image.
5. according to the method described in claim 4, it is characterized in that, described be fitted in the background image for the foreground image In predetermined position region include: to generate blending image
Calculate separately the gradient fields of the foreground image and the gradient fields of the background image;
The gradient fields of the gradient field computation image to be generated of gradient fields and the background image based on the foreground image;
The divergence of image to be generated described in gradient field computation based on the image to be generated;And
The coefficient matrix of Poisson Reconstructed equation is solved, and institute is calculated based on the divergence of the coefficient matrix and the image to be generated The pixel value for stating each pixel of image to be generated, to generate the image to be generated as the blending image.
6. method according to claim 1 or 2, which is characterized in that described to obtain the image conduct including object to be identified Foreground image includes:
Obtain the image including the object to be identified;And
From the image including the object to be identified by include the object to be identified partial segmentation come out using as The foreground image.
7. method according to claim 1 or 2, which is characterized in that the acquisition foreground image further includes obtaining institute The identification information and attribute information of foreground image are stated, the training data further includes the identification information of the foreground image, attribute The location information of information and the foreground image in the blending image.
8. a kind of for generating the device of training data, which is characterized in that described device includes:
Module is obtained, for obtaining the image including scene as background image, and the image including object to be identified is obtained and makees For foreground image;And
It is bonded module, the predetermined position region for the foreground image to be fitted in the background image is to generate fusion figure Picture, the blending image is as the training data.
9. a kind of system for generating training data, which is characterized in that the system comprises storage devices and processor, described The computer program run by the processor is stored on storage device, the computer program is run by the processor Method for generate training data of the Shi Zhihang as described in any one of claim 1-7.
10. a kind of storage medium, which is characterized in that be stored with computer program, the computer program on the storage medium The method for generating training data as described in any one of claim 1-7 is executed at runtime.
CN201810785130.9A 2018-07-17 2018-07-17 For generating the method, apparatus, system and storage medium of training data Pending CN109146830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810785130.9A CN109146830A (en) 2018-07-17 2018-07-17 For generating the method, apparatus, system and storage medium of training data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810785130.9A CN109146830A (en) 2018-07-17 2018-07-17 For generating the method, apparatus, system and storage medium of training data

Publications (1)

Publication Number Publication Date
CN109146830A true CN109146830A (en) 2019-01-04

Family

ID=64800889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810785130.9A Pending CN109146830A (en) 2018-07-17 2018-07-17 For generating the method, apparatus, system and storage medium of training data

Country Status (1)

Country Link
CN (1) CN109146830A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727264A (en) * 2019-01-10 2019-05-07 南京旷云科技有限公司 Image generating method, the training method of neural network, device and electronic equipment
CN110033463A (en) * 2019-04-12 2019-07-19 腾讯科技(深圳)有限公司 A kind of foreground data generates and its application method, relevant apparatus and system
CN110414480A (en) * 2019-08-09 2019-11-05 威盛电子股份有限公司 Training image production method and electronic device
CN110503146A (en) * 2019-08-21 2019-11-26 杭州比智科技有限公司 Data enhancement methods, calculate equipment and computer storage medium at device
CN111462162A (en) * 2019-01-18 2020-07-28 上海大学 Foreground segmentation algorithm for specific class of pictures
CN111709873A (en) * 2020-05-27 2020-09-25 北京百度网讯科技有限公司 Training method and device of image conversion model generator
CN111753836A (en) * 2019-08-27 2020-10-09 北京京东尚科信息技术有限公司 Character recognition method and device, computer readable medium and electronic equipment
CN111783874A (en) * 2020-06-29 2020-10-16 联想(北京)有限公司 Sample generation method, sample training method and device
CN111899204A (en) * 2020-07-30 2020-11-06 平安科技(深圳)有限公司 Vehicle damage detection data synthesis method and device and storage medium
CN112102315A (en) * 2020-11-02 2020-12-18 腾讯科技(深圳)有限公司 Medical image processing method, medical image processing device, computer equipment and storage medium
CN113688887A (en) * 2021-08-13 2021-11-23 百度在线网络技术(北京)有限公司 Training and image recognition method and device of image recognition model
CN113902956A (en) * 2021-09-30 2022-01-07 北京百度网讯科技有限公司 Training method of fusion model, image fusion method, device, equipment and medium
CN114612744A (en) * 2022-03-10 2022-06-10 平安科技(深圳)有限公司 Detection model training method, vehicle damage detection method and terminal equipment
CN114820609A (en) * 2022-06-29 2022-07-29 南昌大学 Photovoltaic module EL image defect detection method
CN117523341A (en) * 2023-11-23 2024-02-06 中船(北京)智能装备科技有限公司 Deep learning training image sample generation method, device and equipment
US11967081B2 (en) 2019-01-22 2024-04-23 Mitsubishi Electric Corporation Information processing apparatus, non-transitory computer-readable storage medium, and information processing method
CN117523341B (en) * 2023-11-23 2024-06-21 中船(北京)智能装备科技有限公司 Deep learning training image sample generation method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154046A (en) * 2017-04-06 2017-09-12 南京邮电大学 A kind of method of video background processing and secret protection
CN107767391A (en) * 2017-11-02 2018-03-06 北京奇虎科技有限公司 Landscape image processing method, device, computing device and computer-readable storage medium
CN107808373A (en) * 2017-11-15 2018-03-16 北京奇虎科技有限公司 Sample image synthetic method, device and computing device based on posture
CN108156370A (en) * 2017-12-07 2018-06-12 Tcl移动通信科技(宁波)有限公司 By the use of local picture as the photographic method of background, storage medium and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107154046A (en) * 2017-04-06 2017-09-12 南京邮电大学 A kind of method of video background processing and secret protection
CN107767391A (en) * 2017-11-02 2018-03-06 北京奇虎科技有限公司 Landscape image processing method, device, computing device and computer-readable storage medium
CN107808373A (en) * 2017-11-15 2018-03-16 北京奇虎科技有限公司 Sample image synthetic method, device and computing device based on posture
CN108156370A (en) * 2017-12-07 2018-06-12 Tcl移动通信科技(宁波)有限公司 By the use of local picture as the photographic method of background, storage medium and mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《美术大观》编辑部: "《中国美术教育学术论丛 艺术设计卷 6》", 31 October 2016 *
崔丽 等: "《Matlab小波分析与应用:30个案例分析》", 30 June 2016 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727264A (en) * 2019-01-10 2019-05-07 南京旷云科技有限公司 Image generating method, the training method of neural network, device and electronic equipment
CN111462162A (en) * 2019-01-18 2020-07-28 上海大学 Foreground segmentation algorithm for specific class of pictures
CN111462162B (en) * 2019-01-18 2023-07-21 上海大学 Foreground segmentation algorithm for specific class pictures
US11967081B2 (en) 2019-01-22 2024-04-23 Mitsubishi Electric Corporation Information processing apparatus, non-transitory computer-readable storage medium, and information processing method
CN110033463B (en) * 2019-04-12 2021-06-04 腾讯科技(深圳)有限公司 Foreground data generation and application method thereof, and related device and system
CN110033463A (en) * 2019-04-12 2019-07-19 腾讯科技(深圳)有限公司 A kind of foreground data generates and its application method, relevant apparatus and system
US11961237B2 (en) 2019-04-12 2024-04-16 Tencent Technology (Shenzhen) Company Limited Foreground data generation method and method for applying same, related apparatus, and system
CN110414480A (en) * 2019-08-09 2019-11-05 威盛电子股份有限公司 Training image production method and electronic device
CN110503146A (en) * 2019-08-21 2019-11-26 杭州比智科技有限公司 Data enhancement methods, calculate equipment and computer storage medium at device
CN111753836A (en) * 2019-08-27 2020-10-09 北京京东尚科信息技术有限公司 Character recognition method and device, computer readable medium and electronic equipment
CN111709873A (en) * 2020-05-27 2020-09-25 北京百度网讯科技有限公司 Training method and device of image conversion model generator
CN111783874A (en) * 2020-06-29 2020-10-16 联想(北京)有限公司 Sample generation method, sample training method and device
WO2021139357A1 (en) * 2020-07-30 2021-07-15 平安科技(深圳)有限公司 Vehicle damage check data synthesis method and system, and apparatus and storage medium
CN111899204A (en) * 2020-07-30 2020-11-06 平安科技(深圳)有限公司 Vehicle damage detection data synthesis method and device and storage medium
CN111899204B (en) * 2020-07-30 2024-04-09 平安科技(深圳)有限公司 Vehicle loss detection data synthesis method, device and storage medium
CN112102315A (en) * 2020-11-02 2020-12-18 腾讯科技(深圳)有限公司 Medical image processing method, medical image processing device, computer equipment and storage medium
CN112102315B (en) * 2020-11-02 2021-02-19 腾讯科技(深圳)有限公司 Medical image processing method, medical image processing device, computer equipment and storage medium
CN113688887A (en) * 2021-08-13 2021-11-23 百度在线网络技术(北京)有限公司 Training and image recognition method and device of image recognition model
CN113902956A (en) * 2021-09-30 2022-01-07 北京百度网讯科技有限公司 Training method of fusion model, image fusion method, device, equipment and medium
WO2023050868A1 (en) * 2021-09-30 2023-04-06 北京百度网讯科技有限公司 Method and apparatus for training fusion model, image fusion method and apparatus, and device and medium
CN114612744A (en) * 2022-03-10 2022-06-10 平安科技(深圳)有限公司 Detection model training method, vehicle damage detection method and terminal equipment
CN114820609A (en) * 2022-06-29 2022-07-29 南昌大学 Photovoltaic module EL image defect detection method
CN117523341A (en) * 2023-11-23 2024-02-06 中船(北京)智能装备科技有限公司 Deep learning training image sample generation method, device and equipment
CN117523341B (en) * 2023-11-23 2024-06-21 中船(北京)智能装备科技有限公司 Deep learning training image sample generation method, device and equipment

Similar Documents

Publication Publication Date Title
CN109146830A (en) For generating the method, apparatus, system and storage medium of training data
CN110084874B (en) Image style migration for three-dimensional models
US20220383649A1 (en) System and method for facilitating graphic-recognition training of a recognition model
JP2022513272A (en) Training A method and system for automatically generating mass training datasets from 3D models of deep learning networks
CN106203305A (en) Human face in-vivo detection method and device
CN110363213B (en) Method and system for cognitive analysis and classification of garment images
US9262853B2 (en) Virtual scene generation based on imagery
CN108876833A (en) Image processing method, image processing apparatus and computer readable storage medium
CN108875932A (en) Image-recognizing method, device and system and storage medium
CN108037823B (en) Information recommendation method, Intelligent mirror and computer readable storage medium
CN108876804A (en) It scratches as model training and image are scratched as methods, devices and systems and storage medium
CN109919211A (en) Commodity recognition method, device, system and computer-readable medium
CN108875523A (en) Human synovial point detecting method, device, system and storage medium
US20210027514A1 (en) Method and system for creating animal type avatar using human face
US11256958B1 (en) Training with simulated images
CN108961149A (en) Image processing method, device and system and storage medium
CN108875515A (en) Face identification method, device, system, storage medium and capture machine
CN106132341B (en) The prediction of shape
CN108875731A (en) Target identification method, device, system and storage medium
CN108875483A (en) Image detecting method, device, system and computer-readable medium
CN106651973A (en) Image structuring method and device
CN111008935A (en) Face image enhancement method, device, system and storage medium
CN107959798A (en) Video data real-time processing method and device, computing device
CN111311480A (en) Image fusion method and device
CN110490058A (en) Training method, device, system and the computer-readable medium of pedestrian detection model

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190104