CN108961174A - A kind of image repair method, device and electronic equipment - Google Patents

A kind of image repair method, device and electronic equipment Download PDF

Info

Publication number
CN108961174A
CN108961174A CN201810506706.3A CN201810506706A CN108961174A CN 108961174 A CN108961174 A CN 108961174A CN 201810506706 A CN201810506706 A CN 201810506706A CN 108961174 A CN108961174 A CN 108961174A
Authority
CN
China
Prior art keywords
model
repaired
complex pattern
confrontation network
network model
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
CN201810506706.3A
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 Faceall Co
Original Assignee
Beijing Faceall Co
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 Faceall Co filed Critical Beijing Faceall Co
Priority to CN201810506706.3A priority Critical patent/CN108961174A/en
Publication of CN108961174A publication Critical patent/CN108961174A/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/77Retouching; Inpainting; Scratch removal
    • 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

Landscapes

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

Abstract

This specification embodiment discloses a kind of image repair method, device and electronic equipment, which comprises obtains complex pattern to be repaired;Based on inpainting model, repair process is carried out to the complex pattern to be repaired;Wherein, described image repairing model is based on obtaining after confrontation network model is trained.By collecting original image and based on original image treated complex pattern to be repaired, training set as confrontation network model, generation model and discrimination model are trained, input of the reparation picture that the generation model obtains as discrimination model will be passed through, by the output of discrimination model as the input for generating model, so that constantly game optimizes repeatedly for generation model and discrimination model in confrontation network model, it is hereby achieved that the inpainting model after the optimization based on confrontation network model.Can effectively lift scheme optimization efficiency, and promoted inpainting model repairing effect.

Description

A kind of image repair method, device and electronic equipment
Technical field
This specification is related to field of computer technology more particularly to a kind of image repair method, device and electronic equipment.
Background technique
Perfect with monitoring system, Image Acquisition collects in great amount of images, since acquisition is set using more and more extensive Standby problem causes to collect image section damage;Alternatively, causing acquired image imperfect, quilt due to acquisition condition problem Barrier blocks.Therefore, it will affect the further identification to picture material.
In existing image restoration technology, using preset algorithm, image to be repaired is repaired, but repairs result There are larger differences with original image;Image is preferably repaired in order to obtain effect, staff is generally required and continues to optimize reparation Algorithm, so as to obtain be more nearly original image be repaired image.
Based on the prior art, it is desirable to be able to accurately and rapidly carry out the scheme of image repair.
Summary of the invention
This specification embodiment provides a kind of image repair method, device and electronic equipment, for solving following technology Problem: it is required to fast implement the scheme of living body image repair.
In order to solve the above technical problems, this specification embodiment is achieved in that
A kind of image repair method that this specification embodiment provides, comprising:
Obtain complex pattern to be repaired;
Based on inpainting model, repair process is carried out to the complex pattern to be repaired;Wherein, described image repairing model base It is obtained after confrontation network model is trained.
Further, training described image repairing model, specifically includes:
It obtains and repairs training set of images, the reparation training set of images includes: N number of original image and N number of complex pattern to be repaired;Its In, N number of complex pattern to be repaired is handled based on N number of original image;
Based on the reparation training set of images, the confrontation network model is trained, described image is obtained and repairs mould Type.
Further, the confrontation network model includes: to generate model and discrimination model;
The confrontation network model majorized function is as follows:
Wherein, G expression generates model, D indicates discrimination model,Indicate X be derived from original image distribution, Indicate that z is derived from complex pattern to be repaired.
Further, the discrimination model optimal way, comprising:
Based on the confrontation network model majorized function, is risen using gradient and obtain V (D, G) maximum value;
The discrimination model based on acquisition V (D, G) maximum value, after being optimized.
Further, the generation model optimization mode, comprising:
Based on the confrontation network model majorized function, is declined using gradient and obtain V (D, G) minimum value;
The generation model based on acquisition V (D, G) minimum value, after being optimized.
Further, further includes:
Optimization aim discriminant function:
Wherein, X indicates the original image, and G (z), which indicates to repair, completes the complex pattern to be repaired.
A kind of image fixing apparatus that this specification embodiment provides characterized by comprising
Module is obtained, complex pattern to be repaired is obtained;
Repair module is based on inpainting model, carries out repair process to the complex pattern to be repaired;Wherein, described image Repairing model is based on obtaining after confrontation network model is trained.
Further, further includes: training module;
The training module, obtains and repairs training set of images, and the reparation training set of images includes: N number of original image and N number of Complex pattern to be repaired;Wherein, N number of complex pattern to be repaired is handled based on N number of original image;
Based on the reparation training set of images, the confrontation network model is trained, described image is obtained and repairs mould Type.
Further, the confrontation network model includes: to generate model and discrimination model;
The confrontation network model majorized function is as follows:
Wherein, G expression generates model, D indicates discrimination model,Indicate X be derived from original image distribution, Indicate that z is derived from complex pattern to be repaired.
Further, the discrimination model optimal way, comprising:
Based on the confrontation network model majorized function, is risen using gradient and obtain V (D, G) maximum value;
The discrimination model based on acquisition V (D, G) maximum value, after being optimized.
Further, the generation model optimization mode, comprising:
Based on the confrontation network model majorized function, is declined using gradient and obtain V (D, G) minimum value;
The generation model based on acquisition V (D, G) minimum value, after being optimized.
Further, further includes: optimization aim discriminating gear;
The optimization aim discriminating gear includes: optimization aim discriminant function:
Wherein, X indicates the original image, and G (z), which indicates to repair, completes the complex pattern to be repaired.
The a kind of electronic equipment that this specification embodiment provides, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one A processor executes so that at least one described processor can:
Obtain complex pattern to be repaired;
Based on inpainting model, repair process is carried out to the complex pattern to be repaired;Wherein, described image repairing model base It is obtained after confrontation network model is trained.
This specification embodiment use at least one above-mentioned technical solution can reach it is following the utility model has the advantages that
Training by collecting original image and based on original image treated complex pattern to be repaired, as confrontation network model Collection is trained generation model and discrimination model, i.e., using the reparation picture obtained by the generation model as differentiation mould The input of type, by the output of discrimination model as the input for generating model, so that fighting the generation model in network model and sentencing Constantly game optimizes other model repeatedly, it is hereby achieved that the inpainting model after the optimization based on confrontation network model.It can With the efficiency that effective lift scheme optimizes, and promote the repairing effect of inpainting model.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification, for those of ordinary skill in the art, in not making the creative labor property Under the premise of, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the image repair process schematic that the scheme of this specification is related under a kind of practical application scene;
Fig. 2 is a kind of flow diagram for image repair method that this specification embodiment provides;
Fig. 3 is the schematic diagram for the practical application image repair process that this specification embodiment provides;
Fig. 4 is a kind of structural schematic diagram for image fixing apparatus that this specification embodiment provides.
Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification, below in conjunction with this explanation Attached drawing in book embodiment is clearly and completely described the technical solution in this specification embodiment, it is clear that described Embodiment be merely a part but not all of the embodiments of the present application.Based on this specification embodiment, this field Those of ordinary skill's every other embodiment obtained without creative efforts, all should belong to the application The range of protection.
Fig. 1 is a kind of schematic diagram for the image repair process that the scheme of this specification is related under practical application scene.It is logical It crosses acquisition and repairs training set of images, which includes original image and the figure to be repaired that obtains after being handled based on original image Picture.Based on training set of images is repaired, the training of confrontation network model is carried out;Wherein, confrontation network model include generate model and Discrimination model.Specifically, using the differentiation of complex pattern to be repaired and discrimination model as a result, training generates model;Utilize original graph Image, training discrimination model are completed in picture and the reparation for generating model generation.By generating the mutual game of model and discrimination model, The optimization of confrontation network model is realized, it is hereby achieved that the image after repairing is made to be more nearly the image repair mould of original image Type.
Based on above-mentioned scene, the scheme of this specification is described in detail below.
Fig. 2 is the flow diagram of a kind of image repair method that this specification embodiment provides, and this method specifically can be with The following steps are included:
Step S202: complex pattern to be repaired is obtained.
In one embodiment, complex pattern to be repaired can be is obtained by image capture device, also, these images can be with It is building object image, animal painting or facial image etc..For example, monitoring device, collects facial image, due to barrier Block, cause obtain facial image it is imperfect, therefore, it is necessary to repair the facial image, be generally possible to identify The identity of collected face.
Step S204: being based on inpainting model, carries out repair process to the complex pattern to be repaired;Wherein, described image Repairing model is based on obtaining after confrontation network model is trained.
In one embodiment, image is repaired using inpainting model, wherein image repair mentioned here Model is obtained based on confrontation network model training.
In confrontation network model, comprising generating model and discrimination model.Wherein, model is generated to be used to image to be repaired It is repaired, whether discrimination model is used to judge to generate image that model reparation is completed close to original image.In practical applications, It is input to facial image to be repaired in inpainting model, based on model and discrimination model is generated, continues to optimize to be repaired Facial image, the facial image that the reparation so as to obtain being more nearly with protoplast's face image is completed.
Training by collecting original image and based on original image treated complex pattern to be repaired, as confrontation network model Collection is trained generation model and discrimination model, i.e., using the reparation picture obtained by the generation model as differentiation mould The input of type, by the output of discrimination model as the input for generating model, so that fighting the generation model in network model and sentencing Constantly game optimizes other model repeatedly, it is hereby achieved that the inpainting model after the optimization based on confrontation network model.It can With the efficiency that effective lift scheme optimizes, and promote the repairing effect of inpainting model.
In one or more embodiment of this specification, training described image repairing model is specifically included:
It obtains and repairs training set of images, the reparation training set of images includes: N number of original image and N number of complex pattern to be repaired;Its In, N number of complex pattern to be repaired is handled based on N number of original image;Based on the reparation training set of images, to described right Anti- network model is trained, and obtains described image repairing model.
Training set of images is preferably repaired in order to obtain, in construction, often (wherein, N is greater than etc. for N number of original image In 1), corresponding, N number of complex pattern to be repaired is handled based on N number of original image.
For example, obtain 3 protoplast's face images, and according to 3 facial images, 3 faces to be repaired that carry out that treated Image.It using 3 facial images to be repaired, is input to and generates in model, export 3 reparations completion face figures using model is generated Picture;Further, facial image and 3 protoplast's face images are completed based on 3 reparations, be input in discrimination model, training differentiates Model, in general, discrimination model output differentiate that result can be a probability value (that is, threshold value), complete for differentiating to repair Whether facial image, which meets reparation, requires;In the present embodiment, 3 probability values are exported respectively.
In one or more embodiment of this specification, the confrontation network model includes: to generate model and differentiation mould Type;
The confrontation network model majorized function is as follows:
Wherein, G expression generates model, D indicates discrimination model,Indicate X be derived from original image distribution, Indicate that z is derived from complex pattern to be repaired.
For example, the confrontation network model is to be constructed based on neural network model, generation model (generator, Generator) and discrimination model (discriminator, Discriminator) is convolution+fully connected network.The former is from generating random vector One sample, who on earth whose true vacation of the sample and training set sample that the latter's identification generates.The two training simultaneously.Differentiate in training When model, minimizes and differentiate error;When training generates model, maximizes and differentiate error.Two trained purposes can lead to Cross back-propagation method realization.Trained generation network can be converted to any one noise vector similar with training set Sample.The noise can regard the sample as in the coding of lower dimensional space.
In practical applications, as shown in figure 3, when being repaired to facial image, based on trained obtained generation model (that is, inpainting model) repairs facial image to be repaired, and obtains the reparation figure with protoplast's face image relatively Picture.
In one or more embodiment of basic explanation book, the discrimination model optimal way, comprising: based on described right Anti- network model majorized function is risen using gradient and obtains V (D, G) maximum value;Based on V (D, G) maximum value is obtained, optimized The discrimination model afterwards.
In discrimination model, including convolutional layer, pond layer and full articulamentum etc., the discrimination model are used to judge complete people Face image be by generate model generate come or script be exactly complete facial image.
During training, it is desirable to which the discriminant value of truthful data is the bigger the better.Simultaneously it is desirable that data are generated Discriminant value logD (x) is the smaller the better, so log (1-D (G (z))) is also to be the bigger the better.Risen in training using gradient, makes valence The value of value function is higher and higher.
In one or more embodiment of this specification, the generation model optimization mode, comprising: be based on the confrontation Network model majorized function is declined using gradient and obtains V (D, G) minimum value;Based on acquisition V (D, G) minimum value, after being optimized The generation model.
In generating model, including convolutional layer, pond layer, full articulamentum, warp lamination etc..It is desirable to the value of cost function It is the smaller the better, i.e., the parameter for generating model is trained using gradient decline.
In one or more embodiment of this specification, further includes: optimization aim discriminant function:Wherein, X indicates the original image, and G (z), which indicates to repair, completes the complex pattern to be repaired.
In order to guarantee that picture is similar as far as possible with original image after repair, the pixel difference of image is used to lose as excellent Change target, shown in following formula:
Wherein, X indicates complete face picture, and G (z) indicates the facial image after repairing.
Based on same thinking, the embodiment of the present application also provides a kind of image fixing apparatus, as shown in figure 4, device master Include:
Module 401 is obtained, complex pattern to be repaired is obtained;
Repair module 402 is based on inpainting model, carries out repair process to the complex pattern to be repaired;Wherein, the figure As repairing model is based on obtaining after confrontation network model is trained.
Further, further includes: training module 403;
The training module 403 obtains and repairs training set of images, the reparations training set of images include: N number of original image with N number of complex pattern to be repaired;Wherein, N number of complex pattern to be repaired is handled based on N number of original image;
Based on the reparation training set of images, the confrontation network model is trained, described image is obtained and repairs mould Type.
Further, the confrontation network model includes: to generate model and discrimination model;
The confrontation network model majorized function is as follows:
Wherein, G expression generates model, D indicates discrimination model,Indicate X be derived from original image distribution, Indicate that z is derived from complex pattern to be repaired.
Further, the discrimination model optimal way, comprising:
Based on the confrontation network model majorized function, is risen using gradient and obtain V (D, G) maximum value;
The discrimination model based on acquisition V (D, G) maximum value, after being optimized.
Further, the generation model optimization mode, comprising:
Based on the confrontation network model majorized function, is declined using gradient and obtain V (D, G) minimum value;
The generation model based on acquisition V (D, G) minimum value, after being optimized.
Further, further includes: optimization aim discriminating gear;
The optimization aim discriminating gear includes: optimization aim discriminant function:
Wherein, X indicates the original image, and G (z), which indicates to repair, completes the complex pattern to be repaired.
Based on same thinking, the embodiment of the present application also provides a kind of electronic equipment, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one A processor executes so that at least one described processor can:
Obtain complex pattern to be repaired;
Based on inpainting model, repair process is carried out to the complex pattern to be repaired;Wherein, described image repairing model base It is obtained after confrontation network model is trained.
Training by collecting original image and based on original image treated complex pattern to be repaired, as confrontation network model Collection is trained generation model and discrimination model, i.e., using the reparation picture obtained by the generation model as differentiation mould The input of type, by the output of discrimination model as the input for generating model, so that fighting the generation model in network model and sentencing Constantly game optimizes other model repeatedly, it is hereby achieved that the inpainting model after the optimization based on confrontation network model.It can With the efficiency that effective lift scheme optimizes, and promote the repairing effect of inpainting model.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can With or may be advantageous.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For electronic equipment, nonvolatile computer storage media embodiment, since it is substantially similar to the method embodiment, so description It is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
Device that this specification embodiment provides, electronic equipment, nonvolatile computer storage media with method are corresponding , therefore, device, electronic equipment, nonvolatile computer storage media also have the Advantageous effect similar with corresponding method Fruit, since the advantageous effects of method being described in detail above, which is not described herein again corresponding intrument, The advantageous effects of electronic equipment, nonvolatile computer storage media.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware face module.For example, programmable logic device (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " is patrolled Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method process can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can Read medium, logic gate, switch, specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and insertion microcontroller, the example of controller includes but is not limited to following microcontroller Device: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320 are deposited Memory controller is also implemented as a part of the control logic of memory.It is also known in the art that in addition to Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic Controller is obtained to come in fact in the form of logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion microcontroller etc. Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or face, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when specification one or more embodiment.
It should be understood by those skilled in the art that, this specification embodiment can provide as method, system or computer program Product.Therefore, this specification embodiment can be used complete hardware embodiment, complete software embodiment or combine software and hardware The form of the embodiment of aspect.Moreover, it wherein includes that computer is available that this specification embodiment, which can be used in one or more, It is real in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form for the computer program product applied.
This specification is referring to the method, equipment (system) and computer program product according to this specification embodiment Flowchart and/or the block diagram describes.It should be understood that can be realized by computer program instructions every in flowchart and/or the block diagram The combination of process and/or box in one process and/or box and flowchart and/or the block diagram.It can provide these computers Processor of the program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices To generate a machine, so that generating use by the instruction that computer or the processor of other programmable data processing devices execute In the dress for realizing the function of specifying in one or more flows of the flowchart and/or one or more blocks of the block diagram It sets.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
This specification can describe in the general context of computer-executable instructions executed by a computer, such as journey Sequence module.Generally, program module include routines performing specific tasks or implementing specific abstract data types, programs, objects, Component, data structure etc..Specification can also be practiced in a distributed computing environment, in these distributed computing environments, By executing task by the connected remote processing devices of communication network.In a distributed computing environment, program module can To be located in the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely this specification embodiments, are not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (13)

1. a kind of image repair method characterized by comprising
Obtain complex pattern to be repaired;
Based on inpainting model, repair process is carried out to the complex pattern to be repaired;Wherein, described image repairing model be based on pair Anti- network model obtains after being trained.
2. the method as described in claim 1, which is characterized in that training described image repairing model specifically includes:
It obtains and repairs training set of images, the reparation training set of images includes: N number of original image and N number of complex pattern to be repaired;Wherein, N number of complex pattern to be repaired is handled based on N number of original image;
Based on the reparation training set of images, the confrontation network model is trained, described image repairing model is obtained.
3. the method as described in claim 1, which is characterized in that the confrontation network model includes: to generate model and differentiation mould Type;
The confrontation network model majorized function is as follows:
Wherein, G expression generates model, D indicates discrimination model,Indicate X be derived from original image distribution,It indicates Z is derived from complex pattern to be repaired.
4. method as claimed in claim 3, which is characterized in that the discrimination model optimal way, comprising:
Based on the confrontation network model majorized function, is risen using gradient and obtain V (D, G) maximum value;
The discrimination model based on acquisition V (D, G) maximum value, after being optimized.
5. method as claimed in claim 3, which is characterized in that the generation model optimization mode, comprising:
Based on the confrontation network model majorized function, is declined using gradient and obtain V (D, G) minimum value;
The generation model based on acquisition V (D, G) minimum value, after being optimized.
6. the method as described in claim 1, which is characterized in that further include:
Optimization aim discriminant function:
Wherein, X indicates the original image, and G (z), which indicates to repair, completes the complex pattern to be repaired.
7. a kind of image fixing apparatus characterized by comprising
Module is obtained, complex pattern to be repaired is obtained;
Repair module is based on inpainting model, carries out repair process to the complex pattern to be repaired;Wherein, described image reparation Model is based on obtaining after confrontation network model is trained.
8. device as claimed in claim 7, which is characterized in that further include: training module;
The training module, obtains and repairs training set of images, and the reparation training set of images includes: N number of original image and N number of to be repaired Complex pattern;Wherein, N number of complex pattern to be repaired is handled based on N number of original image;
Based on the reparation training set of images, the confrontation network model is trained, described image repairing model is obtained.
9. device as claimed in claim 7, which is characterized in that the confrontation network model includes: to generate model and differentiation mould Type;
The confrontation network model majorized function is as follows:
Wherein, G expression generates model, D indicates discrimination model,Indicate X be derived from original image distribution,It indicates Z is derived from complex pattern to be repaired.
10. device as claimed in claim 9, which is characterized in that the discrimination model optimal way, comprising:
Based on the confrontation network model majorized function, is risen using gradient and obtain V (D, G) maximum value;
The discrimination model based on acquisition V (D, G) maximum value, after being optimized.
11. device as claimed in claim 9, which is characterized in that the generation model optimization mode, comprising:
Based on the confrontation network model majorized function, is declined using gradient and obtain V (D, G) minimum value;
The generation model based on acquisition V (D, G) minimum value, after being optimized.
12. device as claimed in claim 7, which is characterized in that further include: optimization aim discriminating gear;
The optimization aim discriminating gear includes: optimization aim discriminant function:
Wherein, X indicates the original image, and G (z), which indicates to repair, completes the complex pattern to be repaired.
13. a kind of electronic equipment, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one Manage device execute so that at least one described processor can:
Obtain complex pattern to be repaired;
Based on inpainting model, repair process is carried out to the complex pattern to be repaired;Wherein, described image repairing model be based on pair Anti- network model obtains after being trained.
CN201810506706.3A 2018-05-24 2018-05-24 A kind of image repair method, device and electronic equipment Pending CN108961174A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810506706.3A CN108961174A (en) 2018-05-24 2018-05-24 A kind of image repair method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810506706.3A CN108961174A (en) 2018-05-24 2018-05-24 A kind of image repair method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN108961174A true CN108961174A (en) 2018-12-07

Family

ID=64499580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810506706.3A Pending CN108961174A (en) 2018-05-24 2018-05-24 A kind of image repair method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108961174A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727209A (en) * 2018-12-13 2019-05-07 北京爱奇艺科技有限公司 A kind of method and device of determining incomplete historical relic complete image
CN109784349A (en) * 2018-12-25 2019-05-21 东软集团股份有限公司 Image object detection model method for building up, device, storage medium and program product
CN110197716A (en) * 2019-05-20 2019-09-03 广东技术师范大学 Processing method, device and the computer readable storage medium of medical image
CN110288079A (en) * 2019-05-20 2019-09-27 阿里巴巴集团控股有限公司 Characteristic acquisition methods, device and equipment
CN110443746A (en) * 2019-07-25 2019-11-12 阿里巴巴集团控股有限公司 Based on image processing method, device and the electronic equipment for generating confrontation network
CN110796637A (en) * 2019-09-29 2020-02-14 郑州金惠计算机系统工程有限公司 Training and testing method and device of image defect detection model and storage medium
CN111127366A (en) * 2019-12-26 2020-05-08 山东浪潮人工智能研究院有限公司 Portrait picture restoration method, device and equipment
CN111353965A (en) * 2020-02-28 2020-06-30 Oppo广东移动通信有限公司 Image restoration method, device, terminal and storage medium
CN111724310A (en) * 2019-03-21 2020-09-29 马上消费金融股份有限公司 Training method of image restoration model, image restoration method and device
CN113177892A (en) * 2021-04-29 2021-07-27 北京百度网讯科技有限公司 Method, apparatus, medium, and program product for generating image inpainting model
CN113674176A (en) * 2021-08-23 2021-11-19 北京市商汤科技开发有限公司 Image restoration method and device, electronic equipment and storage medium
CN116681980A (en) * 2023-07-31 2023-09-01 北京建筑大学 Deep learning-based large-deletion-rate image restoration method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107507153A (en) * 2017-09-21 2017-12-22 百度在线网络技术(北京)有限公司 Image de-noising method and device
CN107679483A (en) * 2017-09-27 2018-02-09 北京小米移动软件有限公司 Number plate recognition methods and device
CN107730458A (en) * 2017-09-05 2018-02-23 北京飞搜科技有限公司 A kind of fuzzy facial reconstruction method and system based on production confrontation network
CN107798669A (en) * 2017-12-08 2018-03-13 北京小米移动软件有限公司 Image defogging method, device and computer-readable recording medium
CN107945140A (en) * 2017-12-20 2018-04-20 中国科学院深圳先进技术研究院 A kind of image repair method, device and equipment
CN107993210A (en) * 2017-11-30 2018-05-04 北京小米移动软件有限公司 Image repair method, device and computer-readable recording medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107730458A (en) * 2017-09-05 2018-02-23 北京飞搜科技有限公司 A kind of fuzzy facial reconstruction method and system based on production confrontation network
CN107507153A (en) * 2017-09-21 2017-12-22 百度在线网络技术(北京)有限公司 Image de-noising method and device
CN107679483A (en) * 2017-09-27 2018-02-09 北京小米移动软件有限公司 Number plate recognition methods and device
CN107993210A (en) * 2017-11-30 2018-05-04 北京小米移动软件有限公司 Image repair method, device and computer-readable recording medium
CN107798669A (en) * 2017-12-08 2018-03-13 北京小米移动软件有限公司 Image defogging method, device and computer-readable recording medium
CN107945140A (en) * 2017-12-20 2018-04-20 中国科学院深圳先进技术研究院 A kind of image repair method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘峡壁 编著: "《人工智能导论:方法与系统》", 31 August 2008, 北京:国防工业出版社 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109727209A (en) * 2018-12-13 2019-05-07 北京爱奇艺科技有限公司 A kind of method and device of determining incomplete historical relic complete image
CN109784349A (en) * 2018-12-25 2019-05-21 东软集团股份有限公司 Image object detection model method for building up, device, storage medium and program product
CN111724310A (en) * 2019-03-21 2020-09-29 马上消费金融股份有限公司 Training method of image restoration model, image restoration method and device
CN111724310B (en) * 2019-03-21 2023-08-15 马上消费金融股份有限公司 Training method of image restoration model, image restoration method and device
CN110197716A (en) * 2019-05-20 2019-09-03 广东技术师范大学 Processing method, device and the computer readable storage medium of medical image
CN110288079A (en) * 2019-05-20 2019-09-27 阿里巴巴集团控股有限公司 Characteristic acquisition methods, device and equipment
CN110443746A (en) * 2019-07-25 2019-11-12 阿里巴巴集团控股有限公司 Based on image processing method, device and the electronic equipment for generating confrontation network
CN110796637A (en) * 2019-09-29 2020-02-14 郑州金惠计算机系统工程有限公司 Training and testing method and device of image defect detection model and storage medium
CN111127366A (en) * 2019-12-26 2020-05-08 山东浪潮人工智能研究院有限公司 Portrait picture restoration method, device and equipment
CN111353965A (en) * 2020-02-28 2020-06-30 Oppo广东移动通信有限公司 Image restoration method, device, terminal and storage medium
CN113177892A (en) * 2021-04-29 2021-07-27 北京百度网讯科技有限公司 Method, apparatus, medium, and program product for generating image inpainting model
CN113674176A (en) * 2021-08-23 2021-11-19 北京市商汤科技开发有限公司 Image restoration method and device, electronic equipment and storage medium
CN113674176B (en) * 2021-08-23 2024-04-16 北京市商汤科技开发有限公司 Image restoration method and device, electronic equipment and storage medium
CN116681980A (en) * 2023-07-31 2023-09-01 北京建筑大学 Deep learning-based large-deletion-rate image restoration method, device and storage medium
CN116681980B (en) * 2023-07-31 2023-10-20 北京建筑大学 Deep learning-based large-deletion-rate image restoration method, device and storage medium

Similar Documents

Publication Publication Date Title
CN108961174A (en) A kind of image repair method, device and electronic equipment
CN108765334A (en) A kind of image de-noising method, device and electronic equipment
CN108629220A (en) A kind of two dimension code reading method, apparatus and equipment
CN113095124B (en) Face living body detection method and device and electronic equipment
CN109658455A (en) Image processing method and processing equipment
CN107977634A (en) A kind of expression recognition method, device and equipment for video
CN108320296A (en) The detecting and tracking method, apparatus and equipment of target object in a kind of video
CN110348462A (en) A kind of characteristics of image determination, vision answering method, device, equipment and medium
CN107526666A (en) Alarm method, system, device and electronic equipment based on deep learning
CN107526667A (en) A kind of Indexes Abnormality detection method, device and electronic equipment
CN109034183A (en) A kind of object detection method, device and equipment
CN109784599A (en) A kind of method, device and equipment of model training, risk identification
CN108830266A (en) A kind of method, device and equipment of image recognition
CN107516105A (en) Image processing method and device
CN109359120A (en) Data-updating method, device and equipment in a kind of model training
CN110119860A (en) A kind of rubbish account detection method, device and equipment
CN108921190A (en) A kind of image classification method, device and electronic equipment
CN109670648A (en) The training of multi-energy data prediction model, the prediction technique of multi-energy data and device
CN110415263A (en) Image partition method and image segmentation device
CN109615171A (en) Characteristic threshold value determines that method and device, problem objects determine method and device
CN110414572A (en) A kind of method and device of image recognition
CN110532755A (en) A kind of method and device of computer implemented risk identification
Huang et al. CP3: Channel Pruning Plug-In for Point-Based Networks
CN109656946A (en) A kind of multilist relation query method, device and equipment
CN108519986A (en) A kind of webpage generating method, device and equipment

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: 20181207