CN110363709A - A kind of image processing method, image presentation method, model training method and device - Google Patents
A kind of image processing method, image presentation method, model training method and device Download PDFInfo
- Publication number
- CN110363709A CN110363709A CN201910667659.5A CN201910667659A CN110363709A CN 110363709 A CN110363709 A CN 110363709A CN 201910667659 A CN201910667659 A CN 201910667659A CN 110363709 A CN110363709 A CN 110363709A
- Authority
- CN
- China
- Prior art keywords
- image
- training
- trained
- processed
- multiplying power
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/4046—Scaling the whole image or part thereof using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/40—Scaling the whole image or part thereof
- G06T3/4053—Super resolution, i.e. output image resolution higher than sensor resolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Abstract
This application discloses a kind of image processing methods, comprising: obtains image to be processed, image to be processed corresponds to the first multiplying power;Scaling multiple information corresponding to image to be processed is obtained, scaling multiple information is used to indicate the multiple that processing is amplified to image to be processed, or reduce to image to be processed the multiple of processing;Cascade number is determined according to scaling multiple information, wherein cascade number indicates that image to be processed passes through the number of image processing model;According to cascade number, target image corresponding to image to be processed is obtained by image processing model, target image corresponds to the second multiplying power, and the second multiplying power and cascade number have incidence relation, and the second multiplying power is different from the first multiplying power.Disclosed herein as well is a kind of image presentation method, model training method and device.The application realizes the Image Super-resolution of arbitrarily enlarged multiple using image processing model, in the case where guaranteeing performance to the Image Super-resolution of arbitrarily enlarged multiple.
Description
Technical field
This application involves artificial intelligence field more particularly to a kind of image processing method, image presentation method, model trainings
Method and device.
Background technique
In plurality of application scenes, it is limited to image capture device cost or transmission of video images bandwidth, or at
It is not the image all had ready conditions obtain high definition each time, super-resolution technique is met the tendency of as a result, as the technical bottleneck of mode itself
And it gives birth to.Super-resolution technique can reconstruct corresponding high-definition picture from the low-resolution image observed, monitoring device,
There is important application value in the fields such as satellite image and medical image.
Currently, having been devised by a kind of arbitrarily enlarged net of super-resolution in order to which super-resolution technique can be better achieved
Network (A Magnification-Arbitrary Network for Super-Resolution, Meta-SR), Meta-SR are logical
It crosses and increases the filter generation module based on meta learning, and modification up-sampling mode, realize the arbitrarily enlarged multiple of single model
Image Super-resolution.
However, the input information due to Meta-SR includes amplification factor, the Meta-SR obtained after training can only be fitted
For the amplification factor in fixed range, it cannot achieve corresponding enhanced processing for some amplification factors, reduce figure as a result,
As the flexibility of processing, reduce the use scope of image amplification.
Summary of the invention
The embodiment of the present application provides a kind of image processing method, image presentation method, model training method and device, nothing
Different models need to be trained for different amplification, the image processing model under certain amplification factor can pass through cascade system reality
Now bigger amplification factor, the amplification factor with power relationship only need one model of training, need to train to reduce
With the pattern number of preservation, flexibility is improved as a result, increases the use scope of image amplification.
In view of this, the application first aspect provides a kind of image processing method, comprising:
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Obtain scaling multiple information corresponding to the image to be processed, wherein the scaling multiple information is used to indicate
The multiple of processing is amplified to the image to be processed, or reduce to the image to be processed the multiple of processing;
Cascade number is determined according to the scaling multiple information, wherein the cascade number is whole more than or equal to 1
Number, the cascade number indicate to carry out number of processing to the image to be processed using identical image processing model;
According to the cascade number, model is handled by described image and obtains target figure corresponding to the image to be processed
Picture, wherein the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and
Second multiplying power is different from first multiplying power.
The application second aspect provides a kind of image presentation method, comprising:
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Receive image adjustment instruction, wherein described image regulating command carries image magnification parameter, described image amplification ginseng
Number is used to indicate the multiple that processing is amplified to the image to be processed;
In response to described image regulating command, cascade number is determined according to described image amplifying parameters, wherein the cascade
Number is the integer more than or equal to 1, and the cascade number is indicated using identical image processing model to the figure to be processed
As carrying out number of processing;
According to the cascade number, model is handled by described image and obtains target figure corresponding to the image to be processed
Picture, wherein the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and
Second multiplying power is greater than first multiplying power;
Show the target image.
The application third aspect provides a kind of model training method, comprising:
It obtains to training image sample set, wherein described to belong to training image sample set to training image data
Set, described to training image sample set includes that at least one waits for training image sample, each includes to training image sample
First image, the second image and third image, the first image and second image have default sampling multiplying power, and described
Second image and the third image have the default sampling multiplying power;
Generate random number, wherein the random number is greater than or equal to 0, and is less than or equal to 1;
According to the random number and ratio value, from described to determine object set to be trained in training image sample set
It closes, wherein the object set to be trained includes at least one object to be trained, and each object to be trained includes second figure
Picture and the third image, alternatively, the object each to be trained includes the first forecast image and the third image, institute
Stating the first forecast image is the first image by obtaining after handling model to training image;
It is trained to described to training image processing model using the object set to be trained, obtains image procossing mould
Type.
The application fourth aspect provides a kind of image processing apparatus, comprising:
Module is obtained, for obtaining image to be processed, wherein the image to be processed corresponds to the first multiplying power;
The acquisition module is also used to obtain scaling multiple information corresponding to the image to be processed, wherein the contracting
It puts multiple information and is used to indicate the multiple for amplifying processing to the image to be processed, or the image to be processed is carried out
Reduce the multiple of processing;
Determining module, the scaling multiple information for being obtained according to the acquisition module determine cascade number, wherein
The cascade number is the integer more than or equal to 1, and the cascade number is indicated using identical image processing model to described
Image to be processed carries out number of processing;
The acquisition module is also used to the cascade number determined according to the determining module, at described image
Reason model obtains target image corresponding to the image to be processed, wherein the target image corresponds to the second multiplying power, described
Second multiplying power and the cascade number have incidence relation, and second multiplying power is different from first multiplying power.
The 5th aspect of the application provides a kind of image demonstration apparatus, comprising:
Module is obtained, for obtaining image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Receiving module, for receiving image adjustment instruction, wherein described image regulating command carries image magnification parameter,
Described image amplifying parameters are used to indicate the multiple that processing is amplified to the image to be processed;
Determining module, for being put according to described image in response to the received described image regulating command of the receiving module
Big parameter determines cascade number, wherein the cascade number is the integer more than or equal to 1, and the cascade number indicates to use
Identical image processing model carries out number of processing to the image to be processed;
The acquisition module is also used to the cascade number determined according to the determining module, at described image
Reason model obtains target image corresponding to the image to be processed, wherein the target image corresponds to the second multiplying power, described
Second multiplying power and the cascade number have incidence relation, and second multiplying power is greater than first multiplying power;
Display module, the target image obtained for showing the acquisition module.
The 6th aspect of the application provides a kind of image processing model training device, comprising:
Obtain module, for obtain to training image sample set, wherein it is described to training image sample set belong to
Training image data acquisition system, described to training image sample includes that at least one waits for training image sample, each to training image
Sample includes the first image, the second image and third image, and the first image and second image have default sampling times
Rate, and second image and the third image have the default sampling multiplying power;
Generation module, for generating random number, wherein the random number is greater than or equal to 0, and is less than or equal to 1;
Determining module, the random number and ratio value for being generated according to the generation module, from described wait instruct
Practice and determine object set to be trained in image pattern set, wherein the object set to be trained includes that at least one waits training
Object, each object to be trained includes second image and the third image, alternatively, the object packet each to be trained
Include the first forecast image and the third image, first forecast image is the first image by training image
It is obtained after reason model;
Training module, for object set to be trained described in use determining module determination to described to training image
Processing model is trained, and obtains image processing model.
In a kind of possible design, in the first implementation of the 6th aspect of the embodiment of the present application,
The determining module, specifically for judging whether the random number is greater than the ratio value;
If the random number is greater than the ratio value, from it is described to obtained in training image sample set it is described to
The first image corresponding to training image sample and third image;
First forecast image corresponding to model acquisition the first image is handled to training image by described;
According to first forecast image and the third image generate in object set train to trained pair
As.
In a kind of possible design, in second of implementation of the 6th aspect of the embodiment of the present application,
The determining module, specifically for judging whether the random number is greater than the ratio value;
If the random number is less than or equal to the ratio value, from described to obtain in training image sample set
It is described to second image and third image corresponding to training image sample;
The object to be trained in the object set to be trained is generated according to second image and the third image.
In a kind of possible design, in the third implementation of the 6th aspect of the embodiment of the present application,
The acquisition module is specifically used for obtaining first to training image sample, wherein described first to training image sample
This includes the first image, second image and the third image;
It obtains second to training image sample, wherein described second to training image sample includes the 4th image, described the
One image and second image, the 4th image and the first image have default sampling multiplying power;
It obtains third and waits for training image sample, wherein the third waits for that training image sample includes the 5th image, described the
Four images and the first image, the 5th image and the 4th image have default sampling multiplying power;
According to described first to training image sample, described second to training image sample and third figure to be trained
It decent, generates to training image sample.
In a kind of possible design, in the 4th kind of implementation of the 6th aspect of the embodiment of the present application,
The acquisition module is also used to the determining module according to the random number and ratio value, from described wait instruct
Practice before determining object set to be trained in image pattern set, obtains deviant and slope value;
The acquisition module is also used to obtain described to the number of iterations corresponding to training image sample set;
The determining module is also used to according to the deviant, the slope value and the institute for obtaining module and obtaining
It states to the number of iterations corresponding to training image sample set, determines described to the ratio corresponding to training image sample set
Rate score.
In a kind of possible design, in the 5th kind of implementation of the 6th aspect of the embodiment of the present application,
The training module is specifically used for handling the model acquisition object set to be trained to training image by described
In each the second forecast image corresponding to object to be trained;
It is right according to the second forecast image corresponding to the object each to be trained and the object institute each to be trained
The desired image answered determines network model parameter using target loss function;
It is closed using the network model parameter and is trained to described to training image processing model, obtained at described image
Manage model;
The training module specifically determines the network model parameter in the following way:
Wherein, the L (θ) indicates that the target loss function, the θ indicate the network model parameter, and the n is indicated
It is described in training image sample set to training image total sample number amount, the xiIt indicates in the object set to be trained
I-th of object to be trained, the net (xi, θ) and indicate the second forecast image corresponding to i-th of object to be trained, institute
State yiDesired image corresponding to i-th of object to be trained.
The 7th aspect of the application provides a kind of network equipment, comprising: memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Obtain scaling multiple information corresponding to the image to be processed, wherein the scaling multiple information is used to indicate
The multiple of processing is amplified to the image to be processed, or reduce to the image to be processed the multiple of processing;
Cascade number is determined according to the scaling multiple information, wherein the cascade number is whole more than or equal to 1
Number, the cascade number indicate to carry out number of processing to the image to be processed using identical image processing model;
According to the cascade number, model is handled by described image and obtains target figure corresponding to the image to be processed
Picture, wherein the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and
Second multiplying power is different from first multiplying power;
The bus system is for connecting the memory and the processor, so that the memory and the place
Reason device is communicated.
The application eighth aspect provides a kind of terminal device, comprising: memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Receive image adjustment instruction, wherein described image regulating command carries image magnification parameter, described image amplification ginseng
Number is used to indicate the multiple that processing is amplified to the image to be processed;
In response to described image regulating command, cascade number is determined according to described image amplifying parameters, wherein the cascade
Number is the integer more than or equal to 1, and the cascade number is indicated using identical image processing model to the figure to be processed
As carrying out number of processing;
According to the cascade number, model is handled by described image and obtains target figure corresponding to the image to be processed
Picture, wherein the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and
Second multiplying power is greater than first multiplying power;
Show the target image;
The bus system is for connecting the memory and the processor, so that the memory and the place
Reason device is communicated.
The 9th aspect of the application provides a kind of server, comprising: memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
It obtains to training image sample set, wherein described to belong to training image sample set to training image data
Set, described to training image sample includes that at least one waits for training image sample, includes each first to training image sample
Image, the second image and third image, the first image and second image have default sampling multiplying power, and described second
Image and the third image have the default sampling multiplying power;
Generate random number, wherein the random number is greater than or equal to 0, and is less than or equal to 1;
According to the random number and ratio value, from described to determine object set to be trained in training image sample set
It closes, wherein the object set to be trained includes at least one object to be trained, and each object to be trained includes second figure
Picture and the third image, alternatively, the object each to be trained includes the first forecast image and the third image, institute
Stating the first forecast image is the first image by obtaining after handling model to training image;
It is trained to described to training image processing model using the object set to be trained, obtains image procossing mould
Type;
The bus system is for connecting the memory and the processor, so that the memory and the place
Reason device is communicated.
The tenth aspect of the application provides a kind of computer readable storage medium, in the computer readable storage medium
It is stored with instruction, when run on a computer, so that computer executes method described in above-mentioned various aspects.
As can be seen from the above technical solutions, the embodiment of the present application has the advantage that
In the embodiment of the present application, a kind of image processing method is provided, obtains image to be processed first, wherein to be processed
Image corresponds to the first multiplying power, then obtains scaling multiple information corresponding to image to be processed, wherein scaling multiple information is used
The multiple of processing is amplified to image to be processed in instruction, or reduce to image to be processed the multiple of processing, is connect down
To determine cascade number according to scaling multiple information, wherein cascade number indicates image to be processed by image processing model
Number obtains target image corresponding to image to be processed by image processing model, wherein mesh finally according to cascade number
Logo image corresponds to the second multiplying power, and the second multiplying power and cascade number have incidence relation, and the second multiplying power is different from the first multiplying power.
By the above-mentioned means, the scaling processing to image can be realized according to cascade number, without additionally training for different multiplying
Model, but the Image Super-resolution of arbitrarily enlarged multiple is truly realized using image processing model, and guaranteeing performance
In the case of to the Image Super-resolution of arbitrarily enlarged multiple, improve the flexibility of image procossing as a result, increase image amplification
Use scope.
Detailed description of the invention
Fig. 1 is a configuration diagram of image display systems in the embodiment of the present application;
Fig. 2 is that a client-based image shows interface schematic diagram in the embodiment of the present application;
Fig. 3 is method one embodiment schematic diagram of image procossing in the embodiment of the present application;
Fig. 4 A is one embodiment signal for realizing 2 times of enhanced processings of image in the embodiment of the present application based on cascade number
Figure;
Fig. 4 B is one embodiment signal for realizing 4 times of enhanced processings of image in the embodiment of the present application based on cascade number
Figure;
Fig. 4 C is one embodiment signal for realizing 8 times of enhanced processings of image in the embodiment of the present application based on cascade number
Figure;
Fig. 5 is method one embodiment schematic diagram that image is shown in the embodiment of the present application;
Fig. 6 is method one embodiment schematic diagram of model training in the embodiment of the present application;
Fig. 7 is a structural schematic diagram of image processing model in the embodiment of the present application;
Fig. 8 is one flow diagram of method of model training in the embodiment of the present application;
Fig. 9 is one embodiment schematic diagram of image processing apparatus in the embodiment of the present application;
Figure 10 is one embodiment schematic diagram of image demonstration apparatus in the embodiment of the present application;
Figure 11 is one embodiment schematic diagram of image processing model training device in the embodiment of the present application;
Figure 12 is a structural schematic diagram of the network equipment in the embodiment of the present application;
Figure 13 is a structural schematic diagram of terminal device in the embodiment of the present application;
Figure 14 is a structural schematic diagram of server in the embodiment of the present application.
Specific embodiment
The embodiment of the present application provides a kind of image processing method, image presentation method, model training method and device, nothing
Different models need to be trained for different amplification, the image processing model under certain amplification factor can pass through cascade system reality
Now bigger amplification factor, the amplification factor with power relationship only need one model of training, need to train to reduce
With the pattern number of preservation, flexibility is improved as a result, increases the use scope of image amplification.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that embodiments herein described herein for example can be to remove
Sequence other than those of illustrating or describe herein is implemented.In addition, term " includes " and " corresponding to " and their times
What is deformed, it is intended that cover it is non-exclusive include, for example, contain the process, method of a series of steps or units, system,
Product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include be not clearly listed or for
The intrinsic other step or units of these process, methods, product or equipment.
It should be understood that image processing method provided by the present application and image presentation method can be applied to Image Super-resolution field
Scape can obtain information more more than single image according to training sample, then by specific in Image Super-resolution scene
Algorithm is dissolved into these additional information in original image, and a panel height quality and image high-definition are obtained.Image
Processing method application is gradually extensive, is related to many fields such as military affairs, medicine, bank and exploration.For storing the old photograph of many years
Piece can be used image presentation method provided by the present application and enable its details life-like;It, can in face of the bandwidth pressure of network transmission
To use image presentation method provided by the present application first by image compressing transmission, then with super Qinghua algorithm restore, in this way can be big
It is big to reduce transmitted data amount.
In order to make it easy to understand, present applicant proposes a kind of image show method, this method be suitable for image transmitting or
The related scene of picture quality enhancement, such as instant messaging class application program (application, APP), video playback class APP, caricature class
Using and interactive application (such as the online tactics competitive game of more people).This method is applied to image shown in FIG. 1 and shows system
System, referring to Fig. 1, Fig. 1 is a configuration diagram of image display systems in the embodiment of the present application, as shown, with caricature
For class APP, need constantly to request high-definition image to server when user watches caricature by caricature class APP, however, under
Load high-definition image not only consumes the time delay in the mobile data traffic but also transmission process of user and will cause user in the process of page turning
In, there is the bad experience of image load Caton.Therefore, in image presentation method provided by the present application altogether, work as customer flow
Alarm or network state it is bad when, user can by caricature class APP to server request send low resolution image it
Afterwards, caricature class APP locally uses image processing model by low-resolution image, and caricature class APP sends the image of low resolution, by
The image of low resolution is amplified processing using image processing model by caricature class APP, to obtain corresponding high-resolution
Image, so there is no need to servers directly to send high-resolution image to caricature class APP, thus to the caricature class is used
The user of APP has saved flow.
It should be noted that caricature class APP is deployed on terminal device, and similar APP (such as instant messaging class APP, view
Frequency broadcast message class APP and interactive application) it can be used as client deployment in terminal device.Wherein, terminal device includes but not
It is only limitted to tablet computer, laptop, palm PC, mobile phone, interactive voice equipment and PC (personal
Computer, PC), herein without limitation.
Specifically, image presentation method provided by the present application is illustrated below in conjunction with an application scenarios, please be join
Fig. 2 is read, Fig. 2 is that a client-based image shows interface schematic diagram in the embodiment of the present application, as shown, with client
For specially caricature class APP, server sends the cartoon image of low resolution to caricature class APP, gives user in caricature class APP
A status bar that can be continuously adjusted is provided, the value of status bar has corresponding relationship with the multiple locally amplified, and user passes through
The value of adjustment state item carries out local amplification to low-resolution image, and the value of status bar is bigger, shows that user can choose with more
High-resolution state watches caricature.It is 20% that the image on the left side, which corresponds to magnifying power, in Fig. 2, is more increased if the user desired that seeing
Clear image can show right image as shown in Figure 2 with dragging state item, when being dragged to 100%.
Higher amplification factor needs more cascade numbers, and the runing time of Image Super-resolution can accordingly increase, some
User thinks that smoothness when page turning feels more important when watching caricature, these users can choose lower amplification factor.And some
User thinks that the quality of picture is more important when watching caricature, these users can choose higher amplification factor.Due to the application
Arbitrary amplification factor may be implemented in the scheme of offer, and therefore, user can select suitable times magnification by adjustment state item
Number, finds between the fluency and image quality of viewing and preferably weighs.
It is understood that in practical applications, the magnifying power of image can be set to 2 multiple, such as 2 times of amplifications
Rate, 4 times of magnifying powers, 8 times of magnifying powers and 16 times of magnifying powers etc., can also be 3 times of magnifying powers or 5 times of magnifying powers, can be with
It is the magnifying power of other multiples.16 times of magnifying powers of image may be implemented in the application, however this should not be construed as to the application's
It limits.
In conjunction with above-mentioned introduction, the method for image procossing in the application will be introduced below, referring to Fig. 3, the application
Method one embodiment of image procossing includes: in embodiment
101, image to be processed is obtained, wherein image to be processed corresponds to the first multiplying power;
In the present embodiment, image processing apparatus obtains image to be processed, it is to be understood that the image processing apparatus can be with
It is deployed on the network equipment, the network equipment can be terminal device or server, herein without limitation.Image to be processed is the
One multiplying power, such as the first multiplying power are 10%.
It should be noted that the format of image to be processed is including but not limited to bitmap (bitmap, BMP) format, personal electricity
Brain exchanges (Personal Computer Exchange, PCX) format, label image file format (Tag Image File
Format, TIFF), GIF(Graphic Interchange format) (Graphics Interchange Format, GIF), joint photo expert group
(Joint Photographic Expert Group, JPEG) format, marked figure (Tagged Graphics, TGA)
Format, tradable image file format (Exchangeable Image File Format, EXIF), portable network figure
(Portable Network Graphics, PNG) format, scalable vector graphics (Scalable Vector Graphics,
SVG) format, diawing interchange format (Drawing Exchange Format, DXF) and packaged type PostScript
(Encapsulated Post Script, EPS) format.
102, scaling multiple information corresponding to image to be processed is obtained, wherein scaling multiple information, which is used to indicate, to be treated
Processing image amplifies the multiple of processing, or reduce to image to be processed the multiple of processing;
In the present embodiment, image processing apparatus obtains scaling multiple information corresponding to image to be processed, the scaling multiple
Information, which can refer to, treats the multiple that processing image amplifies, or refers to the multiple reduced to image to be processed.For example,
Scaling multiple information is 8 times of amplification or scalability information is to reduce 4 times.
103, cascade number is determined according to scaling multiple information, wherein cascade number is the integer more than or equal to 1, grade
Joining number indicates to carry out number of processing to image to be processed using identical image processing model;
In the present embodiment, image processing apparatus determines cascade number according to scaling multiple information, specifically, it is assumed that a figure
As processing model is used for N times of image amplification (or reduce), N can be non-zero positive number, such as 1.2 or 2 etc., if scaling multiple is believed
Breath is 2N times of amplification, then needs the enhanced processing by image processing model twice, i.e. cascade number is 2.It can be seen that cascade
Number indicates that image to be processed passes through the number of image processing model.
It is understood that image processing apparatus can be stored in advance at image to be selected corresponding to multiple and different multiplying powers
Model is managed, then according to scaling multiple information from wait select to select suitable image processing model in image processing model, and
Determine cascade number.If image processing apparatus only stores an image processing model in advance, then directly using the image procossing
Model.
104, according to cascade number, target image corresponding to image to be processed is obtained by image processing model, wherein
Target image corresponds to the second multiplying power, and the second multiplying power and cascade number have incidence relation, and the second multiplying power is different from first times
Rate.
In the present embodiment, image processing apparatus obtains image institute to be processed by image processing model according to cascade number
Corresponding target image.Specifically, it is assumed that an image processing model A is used to amplify 2 times to image, in order to make it easy to understand, asking
It is one embodiment signal for realizing 2 times of enhanced processings of image in the embodiment of the present application based on cascade number refering to Fig. 4 A, Fig. 4 A
Figure, as shown, determining that scaling multiple information is 2 times, therefore, it is necessary to pass through 1 figure when amplifying 2 times to image to be processed
As processing model A, i.e. cascade number is 1, and the image to be processed of X times (i.e. the first multiplying power) is input to image processing model A, from
And obtain the target image of 2X times (i.e. the second multiplying power).
Fig. 4 B is please referred to, Fig. 4 B is to realize one of 4 times of enhanced processings of image based on cascade number in the embodiment of the present application
Embodiment schematic diagram, as shown, determine that scaling multiple information is 4 times when amplifying 4 times to image to be processed, therefore, it is necessary to
By 2 image processing model A, i.e. cascade number is 2, and the image to be processed of X times (i.e. the first multiplying power) is input at image
Model is managed, to obtain the target image of 4X times (i.e. the second multiplying power).
Fig. 4 C is please referred to, Fig. 4 C is to realize one of 8 times of enhanced processings of image based on cascade number in the embodiment of the present application
Embodiment schematic diagram, as shown, determine that scaling multiple information is 8 times when amplifying 8 times to image to be processed, therefore, it is necessary to
By 3 image processing model A, i.e. cascade number is 1, and the image to be processed of X times (i.e. the first multiplying power) is input at image
Model A is managed, to obtain the target image of 2X times (i.e. the second multiplying power).
For the ease of introducing, table 1 is please referred to, table 1 is being associated between image magnification to be processed and cascade number
System.Assuming that an image processing model is used to amplify 2 times to image.
Table 1
First multiplying power | Amplification factor information | Cascade number | Second multiplying power |
X | 2 | 1 | 2X |
X | 4 | 2 | 4X |
X | 8 | 3 | 8X |
X | 2^N | N | (2^N)X |
For the ease of introducing, table 2 is please referred to, table 2 is being associated between image down multiple to be processed and cascade number
System.Assuming that an image processing model is used for 2 times of image down.It is understood that assuming that an image processing model is used
In amplifying 1.2 times to image, if amplification factor information is 1.2 times, cascade number is 1, if amplification factor information is
1.44 times, then cascade number is 2.
Table 2
First multiplying power | Amplification factor information | Cascade number | Second multiplying power |
X | 1/2 | 1 | 1/2X |
X | 1/4 | 2 | 1/4X |
X | 1/8 | 3 | 1/8X |
X | 1/(2^N) | N | 1/(2^N)X |
It can be seen that the first multiplying power of image to be processed, the second multiplying power of target image, scaling multiple information (times magnification
Number information or abbreviation multiple information) and cascade between number with corresponding relationship.The application designs achievable cascade structure
Image processing model, be that can pass through cascade to realize bigger times magnification by the model extension that can be only applied to single amplification factor
Several image processing models realizes the Image Super-resolution of arbitrarily enlarged multiple using image processing model.
In the embodiment of the present application, a kind of image processing method is provided, obtains image to be processed first, wherein to be processed
Image corresponds to the first multiplying power, then obtains scaling multiple information corresponding to image to be processed, wherein scaling multiple information is used
The multiple of processing is amplified to image to be processed in instruction, or reduce to image to be processed the multiple of processing, is connect down
To determine cascade number according to scaling multiple information, wherein cascade number indicates image to be processed by image processing model
Number obtains target image corresponding to image to be processed by image processing model, wherein mesh finally according to cascade number
Logo image corresponds to the second multiplying power, and the second multiplying power and cascade number have incidence relation, and the second multiplying power is different from the first multiplying power.
By the above-mentioned means, the scaling processing to image can be realized according to cascade number, without additionally training for different multiplying
Model, but the Image Super-resolution of arbitrarily enlarged multiple is truly realized using image processing model, and guaranteeing performance
In the case of to the Image Super-resolution of arbitrarily enlarged multiple, improve the flexibility of image procossing as a result, increase image amplification
Use scope.
In conjunction with above-mentioned introduction, the method shown to image in the application is introduced below, referring to Fig. 5, the application
Method one embodiment of image displaying includes: in embodiment
201, image to be processed is obtained, wherein image to be processed corresponds to the first multiplying power;
In the present embodiment, image demonstration apparatus obtains image to be processed, it is to be understood that the image demonstration apparatus can be with
It is deployed on terminal device, is specifically as follows a client.Image to be processed is the first multiplying power, for example the first multiplying power is
10%.
It should be noted that the format of image to be processed including but not limited to BMP format, PCX format, TIFF, GIF,
Jpeg format, TGA format, EXIF, PNG format, SVG format, DXF and EPS format.
202, image adjustment instruction is received, wherein image adjustment instruction carries image magnification parameter, and image magnification parameter is used
The multiple of processing is amplified to image to be processed in instruction;
In the present embodiment, image demonstration apparatus receives image adjustment instruction, and image adjustment instruction can be a sliding
Instruction or input instruction, carry image magnification parameter in image adjustment instruction, for example, amplify 8 times or
16 times etc., image magnification parameter is used to indicate the multiple that processing is amplified to image to be processed.
203, it is instructed in response to image adjustment, cascade number is determined according to image magnification parameter, wherein cascade number indicates
Image to be processed passes through the number of image processing model;
In the present embodiment, image demonstration apparatus is instructed in response to image adjustment, is instructed according to the image adjustment and is determined image
Amplifying parameters, and then determine cascade number.Specifically, it is assumed that image processing model is used to amplify image N times, and N can be with
The amplification by image processing model twice is needed if image magnification parameter is 2N times for non-zero positive number, such as 1.2 or 2 etc.
Processing, i.e. cascade number are 2.I.e. cascade number indicates that image to be processed passes through the number of image processing model.
204, according to cascade number, target image corresponding to image to be processed is obtained by image processing model, wherein
Target image corresponds to the second multiplying power, and the second multiplying power and cascade number have incidence relation, and the second multiplying power is greater than the first multiplying power;
In the present embodiment, image demonstration apparatus obtains image institute to be processed by image processing model according to cascade number
Corresponding target image.Specifically, it is assumed that an image processing model is used to amplify 2 times to image, puts when to image to be processed
When 2^N times big, determine that image magnification parameter is 2^N times, therefore, it is necessary to pass through n times image processing model, i.e., cascade number is N,
The image to be processed of X times (i.e. the first multiplying power) is input to image processing model, to obtain X times of (2^N) (i.e. the second multiplying power)
Target image.
205, target image is shown.
In the present embodiment, image demonstration apparatus can show the target image after getting target image.
It is understood that in practical applications, image processing model can also include the mould of multiple and different enlargement ratios
Type, it is assumed that an image processing model A is used to amplify image 2 times, and an image processing model B is used to amplify 3 times to image,
So by the way that 6 times can be amplified to image to be processed after an an image processing model A and image processing model B.Again
Assuming that an image processing model A is used to amplify image 1.2 times, an image processing model B is used to amplify 2 times to image,
So by the way that 2.4 times can be amplified to image to be processed after an an image processing model A and image processing model B.
It can be seen that the image processing model of one N times of amplification of training, this image processing model can to the image of any resolution ratio
N times of amplification, no matter the input of this image processing model is figure that true image or other image processing models export
Picture, the N times of image processing model that training is completed can repeatedly cascade the amplification factor for realizing the power of N, Ke Yitong by itself
Cross the amplification factor that the multiple of N is realized in the cascade with other amplification factor image processing models.
In order to realize the enhanced processing of arbitrarily enlarged multiple, only need to save some common times magnifications in practical applications
Number, such as 2 times, 3 times, 5 times and 1.2 times of model parameter.
In the embodiment of the present application, a kind of image presentation method is provided, image to be processed is obtained first, then receives image
Regulating command, wherein image adjustment instruction carries image magnification parameter, instructs in response to the image adjustment, is amplified according to image
Parameter determines cascade number, next according to cascade number, obtains mesh corresponding to image to be processed by image processing model
Logo image finally shows target image.By the above-mentioned means, can realize the enhanced processing to image, nothing according to cascade number
The model for different multiplying need to be additionally trained, but is truly realized the image of arbitrarily enlarged multiple using image processing model
Super-resolution can be greatly saved the flow bandwidth of forwarding server, in client for compression of images and transmission in transmission process
Decoding obtains the image of versus low definition, is handled by scheme provided by the present application and obtains high-definition image, to save
Flow improves transmission rate, and improves image quality on demand.
In conjunction with above-mentioned introduction, the method for model training in the application will be introduced below, referring to Fig. 6, the application
Method one embodiment of model training includes: in embodiment
301, it obtains to training image sample set, wherein belong to training image sample set to training image data
Set, includes that at least one waits for training image sample to training image sample set, includes each first to training image sample
Image, the second image and third image, the first image and the second image have default sampling multiplying power, and the second image and third figure
As having default sampling multiplying power;
In the present embodiment, model training apparatus is obtained to training image sample set, it is to be understood that the model training
Device can be deployed on server.Belong to training image sample set to training image data acquisition system, to training image number
It may include that at least one waits for training image sample set according to set, wherein one is trained every time to training image sample set
The sample number (batchsize) used can be 16,32,64 or 128, be also possible to other integers, theoretical
The value of upper batchsize is bigger, and trained performance is better.But batchsize is bigger, requires the video memory of video card bigger (i.e. pair
The requirement of hardware is higher), therefore, need to select reasonable batchsize, such as 128 in hands-on.
One includes that at least one waits for training image sample to training image sample set, and one can to training image sample
To be expressed as [x_pre, x, y], wherein x_pre indicates that the down-sampled image of the 1/r of x, x indicate the down-sampled image of the 1/r of y,
That is the first image is expressed as x_pre, and the second image is expressed as x, and third image is expressed as y, and presetting sampling multiplying power is 1/r, for example,
One format to training image sample can be [1/4,1/2,1].Wherein, " 1 " in [1/4,1/2,1] indicates to scheme to training
The resolution ratio of decent middle original image, the image resolution ratio that " 1/2 " obtains after indicating down-sampled to original image progress 1/2,
" 1/4 " is indicated to the image resolution ratio obtained after down-sampled to original image progress 1/4.
It is understood that the spatial resolution of the first image (x_pre) can be 16*16, the space of the second image (x)
Resolution ratio can be 32*32, and the spatial resolution of third image (y) can be 64*64, and can treat training image sample
In set it is each to training image sample into it is row stochastic spin upside down and left and right overturning.
302, random number is generated, wherein random number is greater than or equal to 0, and is less than or equal to 1;
In the present embodiment, model training apparatus generates uniform random number value, it is assumed that the distribution function of stochastic variable X is
F (X), { Xi, i=1,2 ... } independent same distribution F (X), then { Xi, i=1,2 ... } a observer { X1, X2, X3 ... } is known as
Be distributed F (X) random number sequence, abbreviation random data, the random number value range in the application be more than or equal to 0, and it is small
In or less than 1 numerical value.
The generator for generating these random numbers includes but is not limited only to linear congruential generator, feedback shift register
Generator and combination generator.
303, according to random number and ratio value, object set to be trained is determined to training image sample set,
Wherein, object set to be trained includes at least one object to be trained, and each object to be trained includes the second image and third
Image, alternatively, each object to be trained includes the first forecast image and third image, the first forecast image is logical for the first image
It crosses and handles what model obtained later to training image;
In the present embodiment, when model training apparatus is trained in a number of iterations (epoch), need first according to life
At the object of random number and ratio value selection training.Specifically, if random number is greater than ratio value, from wait train
Object set to be trained is obtained in image pattern set, object set to be trained includes the first forecast image (x ') and third image
(y), the first forecast image (x ') is the first image (x_pre) by obtaining after handling model to training image.Conversely, such as
Fruit random number is less than or equal to ratio value, then object set to be trained is obtained to training image sample set, wait instruct
Practicing object set includes the second image (x) and third image (y).
After completing once trained iteration, model training apparatus will regenerate a random number, judge again
Size between random number and ratio value selects object set to be trained to be trained again based on above-mentioned introduction.
304, training image processing model is treated using object set to be trained to be trained, obtain image processing model.
In the present embodiment, model training apparatus is treated training image processing model using object set to be trained and is instructed
Practice, specifically, is introduced so that object to be trained includes the second image and third image as an example, handles model to training image
Input be the second image (x), the output to training image processing model is net (x), and is preferably exported as third image
(y), by updating network model parameter, the process for reducing loss function is training network, to obtain image processing model.
In order to make it easy to understand, referring to Fig. 7, Fig. 7 is a structural representation of image processing model in the embodiment of the present application
Figure, as shown, the application is introduced with residual error dense network (Residual Dense Network, RDN) as example,
The input of RDN is low-resolution image (low resolution, LR), is exported as high-definition picture (high
Resolution, HR), wherein RDN mainly includes 4 modules, respectively shallow feature extraction network (shallow feature
Extraction net, SFENet) module, the intensive module of residual error (redidual dense block, RDB), dense feature melt
Close (dense feature fusion, DFF) module and up-sampling network (up-sampling net, UPNet) module.
SFENet module includes the convolutional layer of front 2.RDB module is mainly by residual error module (residual block) and close
Collection module (dense block) module is integrated, the two is gathered and forms RDB.DFF module includes global residual error
Learn (global residual learning) and global characteristics merge two portions (global feature fusion)
Point.UPNet indicates the last up-sampling and convolution operation of network, realizes the amplifying operation to input picture.
In the embodiment of the present application, a kind of method of model training is provided, is obtained first to training image sample set,
In, belong to training image sample set to training image data acquisition system, then generate random number, further according to random number with
Ratio value determines object set to be trained to training image sample set, is finally treated using object set to be trained
Training image processing model is trained, and obtains image processing model.By the above-mentioned means, can train to obtain fixation times
The image processing model of rate, the image procossing mould without training different models for different amplification, under certain amplification factor
Type can realize that bigger amplification factor, the amplification factor with power relationship only need one mould of training by cascade system
Type improves flexibility to reduce the pattern number for needing training and saving as a result, and increase image amplification uses model
It encloses, the Image Super-resolution of arbitrarily enlarged multiple is realized using the cascade number of image processing model, and in the feelings for guaranteeing performance
To the Image Super-resolution of arbitrarily enlarged multiple under condition, the flexibility of image procossing is improved as a result, increases making for image amplification
Use range.
Optionally, on the basis of above-mentioned Fig. 6 corresponding each embodiment, model training provided by the embodiments of the present application
In one alternative embodiment of method, according to random number and ratio value, determine to training image sample set wait train
Object set may include:
Judge whether random number is greater than ratio value;
If random number is greater than ratio value, it is right to training image sample institute to obtain to training image sample set
The first image and third image answered;
The first forecast image corresponding to the first image is obtained by handling model to training image;
The object to be trained in object set to be trained is generated according to the first forecast image and third image.
In the present embodiment, introduce it is a kind of obtain object set to be trained, for the ease of introduce, referring to Fig. 8, Fig. 8 be this
One flow diagram of method for applying for model training in embodiment, as shown, specifically:
In step S1, prepares to training image data acquisition system, include multiple to training image to training image data acquisition system
Sample set;
In step S2, image processing model is built, which is the subsequent image procossing for needing to be trained to
Model;
In step S3, when the number of iterations is i, obtaining quantity at random to training image data acquisition system is
Batchsize to training image sample set, wherein to training image sample set format be [x_pre, x, y], x_
Pre indicates that the first image, x indicate that the second image, y indicate third image, is that times magnification is completed in training using the purpose of x_pre
Number be r image processing models, can not only be make true picture (x_pre and x) amplify r times, also can will export image (x '=
Net (x_pre)) r times of amplification, therefore the second image (x) had both been needed during training, it is also desirable to by the first image (x_pre)
The first forecast image (x ') obtained by network;
In step S4, a random number t is generated, and t obeys being uniformly distributed for [0,1];
In step S5, ratio value ratio is calculated according to the number of iterations i, judges whether random number t is greater than ratio
Numerical value ratio, if random number t be greater than ratio value ratio, go to step S7, if random number t be less than or equal to than
Rate score ratio, then enter step S6;
In step S6, if random number t is less than or equal to ratio value ratio, to training image sample set
It obtains to the second image (x) corresponding to training image sample and third image (y), by the second image (x) and third image (y)
As object to be trained, treats trained image processing model and be trained;
In step S7, if random number t be greater than ratio value ratio, to training image sample set obtain to
First image (x_pre) and third image (y) corresponding to training image sample, the first image (x_pre) is input to wait instruct
Experienced image processing model, by this to image processing model output the first forecast image (x ') to be trained, by the first prognostic chart
As (x ') and third image (y) are used as object to be trained;
In step S8, trained image processing model is treated using the object to be trained obtained in step S7 and is trained,
Training objective is that the first forecast image (x ') is enabled to obtain desired third image by image processing model to be trained
(y), third image (y) is not limited solely to original image resolution ratio 1, can also use the image of 1/2 or 1/4 different resolution,
The purpose designed in this way is, it is desirable to training complete amplification factor be r network inputs either 1/r resolution ratio figure
Picture can also be the image of the resolution ratio such as 1/r*r or 1/r*r*r;
In step S9, judge whether the number of iterations i terminates, if the number of iterations i has terminated, that is, indicates to be completed once to treat
Each use to training image sample, then enter step S10 in training image sample set, whereas if the number of iterations i is also
It is not finished, then go to step S3;
In step S10, when the number of iterations i at the end of, judge "current" model training whether reach termination condition, if reached
To termination condition, then go to step S12, whereas if not up to termination condition, then enter to step S11, it is possible to understand that
It is that termination condition determines the opportunity that training terminates, includes but be not limited only to following termination condition:
The first termination condition is that the number of iterations i has reached the number of iterations maximum value, and the number of iterations maximum value is to set in advance
The maximum value of fixed the number of iterations;
Second of termination condition is that target loss functional value does not decline in for a period of time in training process;
The third termination condition is that the performance on verifying collection does not improve in for a period of time;
In step S11, if not up to termination condition, increase an iteration number, i.e. i=i+1, and ratio value
Ratio=function (i);
In step S12, if reaching termination condition, the image processing model that training obtains is exported.
Secondly, providing a kind of method for selecting object set to be trained in the embodiment of the present application, even random number is big
In ratio value, then obtain to training image sample set to the first image corresponding to training image sample and third figure
Then picture obtains the first forecast image corresponding to the first image by handling model to training image, according to the first prognostic chart
As generating the object to be trained in object set to be trained with third image.By the above-mentioned means, fully taking into account network model
The case where parameter constantly adjusts, and the uncertainty based on random number, can select different samples during training, from
And the reliability of training for promotion and the diversity of sample type.
Optionally, on the basis of above-mentioned Fig. 6 corresponding each embodiment, model training provided by the embodiments of the present application
In one alternative embodiment of method, according to random number and ratio value, determine to training image sample set wait train
Object set may include:
Judge whether random number is greater than ratio value;
If random number is less than or equal to ratio value, obtain to training image sample set to training image sample
The second image and third image corresponding to this;
The object to be trained in object set to be trained is generated according to the second image and third image.
It in the present embodiment, introduces another kind and obtains object set to be trained, for the ease of introducing, referring to Fig. 8, figure
8 be one flow diagram of method of model training in the embodiment of the present application, as shown, specifically, in step s 6, if with
Machine numerical value t is less than or equal to ratio value ratio, then it is right to training image sample institute to obtain to training image sample set
The second image (x) and third image (y) answered regard the second image (x) and third image (y) as object to be trained, treat instruction
Experienced image processing model is trained.
Training objective is that the second image (x) is enabled to obtain desired third image by image processing model to be trained
(y), third image (y) is not limited solely to original image resolution ratio 1, can also use the image of 1/2 or 1/4 different resolution,
The purpose designed in this way is, it is desirable to training complete amplification factor be r network inputs either 1/r resolution ratio figure
Picture can also be the image of the resolution ratio such as 1/r*r or 1/r*r*r.
Secondly, providing a kind of method for selecting object set to be trained in the embodiment of the present application, even random number is small
In or be equal to ratio value, then obtained to training image sample set to the second image corresponding to training image sample and
Then third image generates the object to be trained in object set to be trained according to the second image and third image.By above-mentioned
Mode fully takes into account the case where network model parameter constantly adjusts, and the uncertainty based on random number, in trained mistake
Cheng Zhonghui selects different samples, to promote the reliability of instruction and the diversity of sample type.
Optionally, on the basis of above-mentioned Fig. 6 corresponding each embodiment, model training provided by the embodiments of the present application
In one alternative embodiment of method, obtains to training image sample set, may include:
Obtain first to training image sample, wherein first to training image sample include the first image, the second image and
Third image;
Obtain second to training image sample, wherein second to training image sample include the 4th image, the first image and
Second image, the 4th image and the first image have default sampling multiplying power;
Obtain third wait for training image sample, wherein third wait for training image sample include the 5th image, the 4th image and
First image, the 5th image and the 4th image have default sampling multiplying power;
Training image sample is waited for training image sample and third to training image sample, second according to first, is generated
To training image sample.
In the present embodiment, describe a kind of to content included by training image sample set.If only preparing includes the
One image, the second image and third image first to training image sample, it would be possible that being unable to reach during training
Desired effect.For example, if only prepare the first of [1/4,1/2,1] format to training image sample, and image processing model
Magnifying power is 2 times, then just can only see original image (third image), 1/2 down-sampled image (the second image) in training process
With 1/4 down-sampled image (the first image), amplify 1/2 down-sampled image (the second figure using an image processing model
Picture), or cascade 1/4 down-sampled image (the first image) of image processing model amplification twice is all feasible.However, if
Amplify 1/8 down-sampled image (the 4th image) by cascading image processing model three times, it is possible that the feelings of performance decline
Condition, this is because to not occur 1/8 down-sampled image (the 4th image) in training image sample set.
For the performance of training for promotion, it is desirable to the obtained image processing model of training can cascade three times or four times, in
It is to increase second to wait for training image sample to training image sample and third, if first is to the format of training image sample
[1/4,1/2,1], then second can be [1/8,1/4,1/2] to the format of training image sample, and third waits for training image sample
Format can be [1/16,1/8,1/4].It therefore, is the concept of a union to training image sample set.
During hands-on, to training image sample set include first to training image sample, second wait instruct
Practice image pattern and third waits at least one of training image sample.It is understood that actually can also be according to figure
As herein the cascade number of processing model selects more first to training image sample set, selected abundant to training image
Sample, second wait for that training image sample is only a signal to training image sample and third, should not be construed as to the application
Restriction.
Secondly, in the embodiment of the present application, provide a kind of to content included by training image sample set, that is, obtains the
One waits for training image sample to training image sample and third to training image sample, second, and first to training image sample packet
The first image, the second image and third image are included, second includes the 4th image, the first image and the second figure to training image sample
Picture, third waits for that training image sample includes the 5th image, the 4th image and the first image, finally according to first to training image sample
Originally, second training image sample is waited for training image sample and third, generate to training image sample.By the above-mentioned means,
Further types of sample can be obtained, to obtain more inputting distribution in the training process, is increased in a manner of sample union
The diversity for adding training to gather.
Optionally, on the basis of above-mentioned Fig. 6 corresponding each embodiment, model training provided by the embodiments of the present application
In one alternative embodiment of method, according to random number and ratio value, determine to training image sample set wait train
Before object set, can also include:
Obtain deviant and slope value;
It obtains to the number of iterations corresponding to training image sample set;
According to deviant, slope value and to the number of iterations corresponding to training image sample set, determines and scheme to training
The ratio value as corresponding to sample set.
In the present embodiment, a kind of describe calculating ratio numerical value method.Ratio value (ratio) is according to the number of iterations
Determining, and ratio value is the monotone non-increasing function of the number of iterations, it may be assumed that
Ratio=function (i);
Wherein, three kinds of common functions are explained below in 0 < ratio_min < 1.
The first is linear function, i.e.,;
Ratio=max (ratio_min, k-cepoch);
Wherein, k indicates deviant, and c indicates slope value.
Second is anti-sigmoid function, i.e.,;
Ratio=max (ratio_min, 1/ (1+exp (c (epoch-k))));
Wherein, k indicates deviant, and c indicates slope value.
The third is exponential function, i.e.,;
Ratio=max (ratio_min, cepoch), c < 1;
Wherein, c indicates slope value.
It can be tested using anti-sigmoid function in the application, ratio_min is set as 0.8, deviant k setting
It is 50, slope value c is set as 0.1, and deviant k and slope value c determine the decrease speed with the number of iterations, ratio_min
Determine the minimum value that the number of iterations can take.
At the initial stage of model training, the value of the number of iterations is bigger, and the random number being randomly generated has biggish probability
It less than the number of iterations, is all trained using the second image when most of, expected image handles model for the second figure at this time
As having the effect of twice of amplification, with trained progress, the value of the number of iterations is gradually become smaller, is exported using image processing model
The ratio that is trained of the first forecast image be gradually increased, image processing model is gradually from can only amplify the second image, transition
To the image of energy enlarged drawing processing model output, super-resolution network at this time is gradually provided with cascade characteristic, becomes one
A twice of amplification general of image processing model.
Secondly, provide a kind of mode of determining ratio value in the embodiment of the present application, i.e., first obtain deviant and tiltedly
Then rate value is obtained to the number of iterations corresponding to training image sample set, finally according to deviant, slope value and wait instruct
Practice the number of iterations corresponding to image pattern set, determines to ratio value corresponding to training image sample set.By upper
Mode is stated, ratio value can be updated based on the variation of the number of iterations, to increase the diversity of training sample, and then Lifting Modules
The reliability of type training.
Optionally, on the basis of above-mentioned Fig. 6 corresponding each embodiment, model training provided by the embodiments of the present application
In one alternative embodiment of method, training image processing model is treated using object set to be trained and is trained, image is obtained
Model is handled, may include:
It is obtained in object set to be trained second corresponding to each object to be trained by handling model to training image
Forecast image;
According to expectation corresponding to the second forecast image corresponding to each object to be trained and each object to be trained
Image determines network model parameter using target loss function;
Training image processing model is treated using the conjunction of network model parameter to be trained, and obtains image processing model;
According to expectation corresponding to the second forecast image corresponding to each object to be trained and each object to be trained
Image determines network model parameter using target loss function, may include:
Network model parameter is determined in the following way:
Wherein, L (θ) indicates that target loss function, θ indicate network model parameter, and n is indicated in training image sample set
To training image total sample number amount, xiIndicate i-th of object to be trained in object set to be trained, net (xi, θ) and indicate the
Second forecast image corresponding to i objects to be trained, yiDesired image corresponding to i-th of object to be trained.
In the present embodiment, how introduction is treated into training image processing model and is trained.Specifically, for each iteration
All there is a ratio value for number, training is to obtain an object set to be trained every time in the number of iterations,
In, being somebody's turn to do object set to be trained can only include the second image and third image, or only include the first forecast image and third
Image, image included by object set to be trained depend on whether random number is greater than ratio value.Assuming that there are 10000
Object set to be trained, ratio value 0.8 are uniformly distributed between one [0,1] since each object set to be trained generates
Random number, therefore 10000 random numbers can be generated.Based on above-mentioned it is assumed that in general, 10000 values are in [0,1]
Between random number inside just have 80% less than 0.8, and 20% be greater than 0.8. so 80% in this epoch
Sample can select the second image (x) and third image (y) training network, and 20% sample can be selected with the first forecast image (x ')
With third image (y) training network.
In the trained initial stage, ratio value 1, at this time object set to be trained all use the second image (x) and
Third image (y), subsequent ratio value can be reduced as the number of iterations increases, to have more samples gradually to instruct
Practice image processing model, i.e., using the first forecast image (x ') and third image (y) training network.It can be seen that image procossing
The training of model can only be amplified to third image (y) from the second image (x) from the initial stage, be gradually transitions and can be realized first
Image (x_pre) is amplified to the first forecast image (x '), then is amplified to third image (y) from the first forecast image (x '), thus
So that image processing model has cascade property.
It is understood that the second image (x), which is amplified to third image (y), needs to amplify r times, and image processing model is only
It is able to achieve on the basis of amplifying r times, then amplifies r times, so needing first to use the second image (x) and third image (y) to allow figure
R times can be amplified as handling model, then consider the first image (x_pre) amplifying r times, obtain the first forecast image (x '),
The first forecast image (x ') is amplified r times again, obtains third image (y).
It specifically, can be by i-th of object x to be trainedi(i.e. the second image or the first forecast image) is input to wait train
Image processing model, by this wait for training image processing model export the second forecast image net (xi, θ), and it is expected to obtain true
Output image is yi(i.e. third image) is then calculated using following target loss function:
Wherein, L (θ) indicates target loss function, specifically can be mean square error function, and θ indicates network model parameter, n
Indicate in training image sample set to training image total sample number amount,
When target loss function is minimum value, network model parameter is exported, adaptability moments estimation can be used in the application
(adaptive moment estimation, Adam) optimization algorithm optimizes network model parameter θ, and learning rate initial value is
1e-4, learning rate is every 100 the number of iterations multiplied by 0.1.
Again, in the embodiment of the present application, a kind of method of model training is provided, first by handling mould to training image
Type obtains in object set to be trained the second forecast image corresponding to each object to be trained, then according to each to training pair
The desired image as corresponding to corresponding the second forecast image and each object to be trained is determined using target loss function
Network model parameter, then treat training image processing model with the conjunction of network model parameter and be trained, obtain image processing model.
By the above-mentioned means, concrete implementation foundation on the one hand is provided for the training of model, thus the reliability of lift scheme training, separately
On the one hand, the network structure for being not necessarily to treat training image processing model based on above-mentioned training method is modified, keeping characteristics
The up-sampling module of extraction module and increase based on meta learning, can be realized the more amplification factors of single model, thus lift scheme
Trained compatibility.
For the ease of introducing, technical solution provided by the present application is illustrated below in conjunction with experimental result, is please referred to
Table 3, table 3 are the Y-PSNR (Peak on common test set B100 using distinct methods when amplification factor is 2 and 4
Signal to Noise Ratio, PSNR) value, PSNR value is bigger, indicates that performance is better.
Table 3
Amplification factor | Bicubic | SRCNN | MemNet | RDN | Meta-SR | This programme |
X2 | 29.56 | 31.36 | 32.08 | 32.34 | 32.35 | 32.17 |
X4 | 25.96 | 26.90 | 27.40 | 27.72 | 27.75 | 27.61 |
Wherein, for being respectively bicubic interpolation algorithm (bicubic with the scheme that this programme compares in experiment
Interpolation, Bicubic), super resolution algorithm (the Image Super-Resolution based on convolutional neural networks
Using Deep Convolutional Networks, SRCNN), depth persistent memory network (deep persistent
Memory network, MemNet), super-resolution network (the A Magnification- of RDN and arbitrarily enlarged multiple
Arbitrary Network for Super-Resolution, Meta-SR).In addition to Meta-SR and this programme, other party
2 independent network models have all been respectively trained for the amplification factor of X2 and X4 in case, and this programme only trains the figure of an X2
As processing model, the image processing model of X2 is used into the amplification factor that X4 can be realized twice.
Seen from table 3, the training method that this programme proposes, suitable with other methods in performance, therefore, this experiment is also demonstrate,proved
The feasibility of cascade structure is illustrated.
It is understood that Meta-SR realizes a model suitable for a certain range of amplification factor, such as
Meta-SR realizes the amplification factor in 1 times to 4 times every 0.1.The training method that this programme proposes makes image processing model
With cascade characteristic, Meta-SR has been realized in the continuous amplification in 1 times to 4 times, and 2 Meta-SR cascades can be achieved with 1
Again to the continuous amplification in 16 times, 3 Meta-SR cascades can be achieved with the continuous amplification in 1 times to 64 times, therefore, by this Shen
The network structure for the training method set Meta-SR that please be provided can be achieved with single network model suitable for arbitrary times magnification
Number.
The image processing apparatus in the application is described in detail below, referring to Fig. 9, Fig. 9 is the embodiment of the present application
Middle image processing apparatus one embodiment schematic diagram, image processing apparatus 40 include:
Module 401 is obtained, for obtaining image to be processed, wherein the image to be processed corresponds to the first multiplying power;
The acquisition module 401, is also used to obtain scaling multiple information corresponding to the image to be processed, wherein institute
It states scaling multiple information and is used to indicate the multiple for amplifying processing to the image to be processed, or to the image to be processed
Reduce the multiple of processing;
Determining module 402, the scaling multiple information for being obtained according to the acquisition module 401 determine cascade time
Number, wherein the cascade number is the integer more than or equal to 1, and the cascade number indicates to use identical image procossing mould
Type carries out number of processing to the image to be processed;
The acquisition module 401 is also used to the cascade number determined according to the determining module 402, by described
Image processing model obtains target image corresponding to the image to be processed, wherein the target image corresponds to second times
Rate, second multiplying power and the cascade number have incidence relation, and second multiplying power is different from first multiplying power.
In the present embodiment, obtains module 401 and obtain image to be processed, wherein the image to be processed corresponds to first times
Rate, the acquisition module 401 obtain scaling multiple information corresponding to the image to be processed, wherein the scaling multiple letter
Breath is used to indicate the multiple that processing is amplified to the image to be processed, or carries out diminution processing to the image to be processed
Multiple, determining module 402 according to it is described acquisition module 401 obtain the scaling multiple information determine cascade number, wherein
The cascade number is the integer more than or equal to 1, and the cascade number is indicated using identical image processing model to described
Image to be processed carries out number of processing, the cascade time for obtaining module 401 and determining according to the determining module 402
Number handles model by described image and obtains target image corresponding to the image to be processed, wherein the target image pair
There should be incidence relation in the second multiplying power, second multiplying power and the cascade number, and second multiplying power is different from described
First multiplying power.
In the embodiment of the present application, a kind of image processing apparatus is provided, obtains image to be processed first, wherein to be processed
Image corresponds to the first multiplying power, then obtains scaling multiple information corresponding to image to be processed, wherein scaling multiple information is used
The multiple of processing is amplified to image to be processed in instruction, or reduce to image to be processed the multiple of processing, is connect down
To determine cascade number according to scaling multiple information, wherein cascade number indicates image to be processed by image processing model
Number obtains target image corresponding to image to be processed by image processing model, wherein mesh finally according to cascade number
Logo image corresponds to the second multiplying power, and the second multiplying power and cascade number have incidence relation, and the second multiplying power is different from the first multiplying power.
By the above-mentioned means, the scaling processing to image can be realized according to cascade number, without additionally training for different multiplying
Model, but the Image Super-resolution of arbitrarily enlarged multiple is truly realized using image processing model, and guaranteeing performance
In the case of to the Image Super-resolution of arbitrarily enlarged multiple, improve the flexibility of image procossing as a result, increase image amplification
Use scope.
The image demonstration apparatus in the application is described in detail below, referring to Fig. 10, Figure 10 is the application implementation
Image demonstration apparatus one embodiment schematic diagram in example, image demonstration apparatus 50 include:
Module 501 is obtained, for obtaining image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Receiving module 502, for receiving image adjustment instruction, wherein described image regulating command carries image amplification ginseng
Number, described image amplifying parameters are used to indicate the multiple that processing is amplified to the image to be processed;
Determining module 503 is used in response to the received described image regulating command of the receiving module 502, according to described
Image magnification parameter determines cascade number, wherein the cascade number is the integer more than or equal to 1, the cascade frequency table
Show and number of processing is carried out to the image to be processed using identical image processing model;
The acquisition module 501 is also used to the cascade number determined according to the determining module 503, by described
Image processing model obtains target image corresponding to the image to be processed, wherein the target image corresponds to second times
Rate, second multiplying power and the cascade number have incidence relation, and second multiplying power is greater than first multiplying power;
Display module 504, the target image obtained for showing the acquisition module 501.
In the present embodiment, obtains module 501 and obtain image to be processed, wherein the image to be processed corresponds to first times
Rate, receiving module 502 receive image adjustment instruction, wherein described image regulating command carries image magnification parameter, described image
Amplifying parameters are used to indicate the multiple that processing is amplified to the image to be processed, and determining module 503 is in response to the reception
The received described image regulating command of module 502 determines cascade number according to described image amplifying parameters, wherein the cascade
Number is the integer more than or equal to 1, and the cascade number is indicated using identical image processing model to the figure to be processed
As carrying out number of processing, the cascade number for obtaining module 501 and determining according to the determining module 503 passes through institute
It states image processing model and obtains target image corresponding to the image to be processed, wherein the target image corresponds to second
Multiplying power, second multiplying power and the cascade number have incidence relation, and second multiplying power is greater than first multiplying power, exhibition
Show the target image that module 504 shows that the acquisition module 501 obtains.
In the embodiment of the present application, a kind of image presentation method is provided, image to be processed is obtained first, then receives image
Regulating command, wherein image adjustment instruction carries image magnification parameter, instructs in response to the image adjustment, is amplified according to image
Parameter determines cascade number, next according to cascade number, obtains mesh corresponding to image to be processed by image processing model
Logo image finally shows target image.By the above-mentioned means, can realize the enhanced processing to image, nothing according to cascade number
The model for different multiplying need to be additionally trained, but is truly realized the image of arbitrarily enlarged multiple using image processing model
Super-resolution can be greatly saved the flow bandwidth of forwarding server, in client for compression of images and transmission in transmission process
Decoding obtains the image of versus low definition, is handled by scheme provided by the present application and obtains high-definition image, to save
Flow improves transmission rate, and improves image quality on demand.
The image processing model training device in the application is described in detail below, please refers to Figure 11, Figure 11 is this
Apply for that image processing model training device one embodiment schematic diagram in embodiment, image processing model training device 60 include:
Module 601 is obtained, for obtaining to training image sample set, wherein described to training image sample set category
In to training image data acquisition system, described to training image sample includes that at least one waits for training image sample, each wait train
Image pattern includes the first image, the second image and third image, and the first image has default adopt with second image
Sample multiplying power, and second image and the third image have the default sampling multiplying power;
Generation module 602, for generating random number, wherein the random number is greater than or equal to 0, and is less than or waits
In 1;
Determining module 603, the random number and ratio value for being generated according to the generation module 602, from obtaining
Modulus block 601 obtains described to determine object set to be trained in training image sample set, wherein the object to be trained
Set includes at least one object to be trained, and each object to be trained includes second image and the third image, or
Person, the object each to be trained include the first forecast image and the third image, and first forecast image is described
First image is by handling what model obtained later to training image;
Training module 604, for object set to be trained described in the use determining module 603 determination to described wait instruct
Practice image processing model to be trained, obtains image processing model.
In the present embodiment, obtains module 601 and obtain to training image sample set, wherein is described to training image sample
Set belongs to training image data acquisition system, and described to training image sample includes that at least one waits for training image sample, each
It include the first image, the second image and third image to training image sample, the first image has with second image
Default sampling multiplying power, and second image and the third image have the default sampling multiplying power, generation module 602 generates
Random number, wherein the random number is greater than or equal to 0, and is less than or equal to 1, and determining module 603 is according to the generation mould
The random number and ratio value that block 602 generates, from obtaining described in the acquisition of module 601 in training image sample set
Determine object set to be trained, wherein the object set to be trained includes at least one object to be trained, each to training pair
As include second image and the third image, alternatively, the object each train including the first forecast image with
And the third image, first forecast image are the first image by obtaining after handling model to training image
, the object set to be trained that training module 604 is determined using the determining module 603 is to described to training image processing
Model is trained, and obtains image processing model.
In the embodiment of the present application, a kind of method of model training is provided, is obtained first to training image sample set,
In, belong to training image sample set to training image data acquisition system, then generate random number, further according to random number with
Ratio value determines object set to be trained to training image sample set, is finally treated using object set to be trained
Training image processing model is trained, and obtains image processing model.By the above-mentioned means, can train to obtain fixation times
The image processing model of rate is directed to the model of different multiplying without additionally training, real using the cascade number of image processing model
The Image Super-resolution of incumbent meaning amplification factor, and in the case where guaranteeing performance to the Image Super-resolution of arbitrarily enlarged multiple,
The flexibility of image procossing is improved as a result, increases the use scope of image amplification.
Optionally, on the basis of the embodiment corresponding to above-mentioned Figure 11, image procossing mould provided by the embodiments of the present application
In another embodiment of type training device 60,
The determining module 603, specifically for judging whether the random number is greater than the ratio value;
If the random number is greater than the ratio value, from it is described to obtained in training image sample set it is described to
The first image corresponding to training image sample and third image;
First forecast image corresponding to model acquisition the first image is handled to training image by described;
According to first forecast image and the third image generate in object set train to trained pair
As.
Secondly, providing a kind of method for selecting object set to be trained in the embodiment of the present application, even random number is big
In ratio value, then obtain to training image sample set to the first image corresponding to training image sample and third figure
Then picture obtains the first forecast image corresponding to the first image by handling model to training image, according to the first prognostic chart
As generating the object to be trained in object set to be trained with third image.By the above-mentioned means, fully taking into account network model
The case where parameter constantly adjusts, and the uncertainty based on random number, can select different samples during training, from
And promote the reliability of instruction and the diversity of sample type.
Optionally, on the basis of the embodiment corresponding to above-mentioned Figure 11, image procossing mould provided by the embodiments of the present application
In another embodiment of type training device 60,
The determining module 603, specifically for judging whether the random number is greater than the ratio value;
If the random number is less than or equal to the ratio value, from described to obtain in training image sample set
It is described to second image and third image corresponding to training image sample;
The object to be trained in the object set to be trained is generated according to second image and the third image.
Secondly, providing a kind of method for selecting object set to be trained in the embodiment of the present application, even random number is small
In or be equal to ratio value, then obtained to training image sample set to the second image corresponding to training image sample and
Then third image generates the object to be trained in object set to be trained according to the second image and third image.By above-mentioned
Mode fully takes into account the case where network model parameter constantly adjusts, and the uncertainty based on random number, in trained mistake
Cheng Zhonghui selects different samples, to promote the reliability of instruction and the diversity of sample type.
Optionally, on the basis of the embodiment corresponding to above-mentioned Figure 11, image procossing mould provided by the embodiments of the present application
In another embodiment of type training device 60,
The acquisition module 601 is specifically used for obtaining first to training image sample, wherein described first schemes to training
Decent includes the first image, second image and the third image;
It obtains second to training image sample, wherein described second to training image sample includes the 4th image, described the
One image and second image, the 4th image and the first image have default sampling multiplying power;
It obtains third and waits for training image sample, wherein the third waits for that training image sample includes the 5th image, described the
Four images and the first image, the 5th image and the 4th image have default sampling multiplying power;
According to described first to training image sample, described second to training image sample and third figure to be trained
It decent, generates to training image sample.
Secondly, in the embodiment of the present application, provide a kind of to content included by training image sample set, that is, obtains the
One waits for training image sample to training image sample and third to training image sample, second, and first to training image sample packet
The first image, the second image and third image are included, second includes the 4th image, the first image and the second figure to training image sample
Picture, third waits for that training image sample includes the 5th image, the 4th image and the first image, finally according to first to training image sample
Originally, second training image sample is waited for training image sample and third, generate to training image sample.By the above-mentioned means,
Further types of sample can be obtained, to obtain more inputting distribution in the training process, is increased in a manner of sample union
The diversity for adding training to gather.
Optionally, on the basis of the embodiment corresponding to above-mentioned Figure 11, image procossing mould provided by the embodiments of the present application
In another embodiment of type training device 60,
The acquisition module 601 is also used to the determining module 603 according to the random number and ratio value, from institute
It states to obtain deviant and slope value before determining object set to be trained in training image sample set;
The acquisition module 601 is also used to obtain described to the number of iterations corresponding to training image sample set;
The determining module 603 is also used to be obtained according to the deviant, the slope value and the acquisition module 601
What is taken is described to the number of iterations corresponding to training image sample set, determines described to corresponding to training image sample set
The ratio value.
Secondly, provide a kind of mode of determining ratio value in the embodiment of the present application, i.e., first obtain deviant and tiltedly
Then rate value is obtained to the number of iterations corresponding to training image sample set, finally according to deviant, slope value and wait instruct
Practice the number of iterations corresponding to image pattern set, determines to ratio value corresponding to training image sample set.By upper
Mode is stated, ratio value can be updated based on the variation of the number of iterations, to increase the diversity of training sample, and then Lifting Modules
The reliability of type training.
Optionally, on the basis of the embodiment corresponding to above-mentioned Figure 11, image procossing mould provided by the embodiments of the present application
In another embodiment of type training device 60,
The training module 604 is specifically used for handling the model acquisition object to be trained to training image by described
Each the second forecast image corresponding to object to be trained in set;
It is right according to the second forecast image corresponding to the object each to be trained and the object institute each to be trained
The desired image answered determines network model parameter using target loss function;
It is closed using the network model parameter and is trained to described to training image processing model, obtained at described image
Manage model;
The training module 604 specifically determines the network model parameter in the following way:
Wherein, the L (θ) indicates that the target loss function, the θ indicate the network model parameter, and the n is indicated
It is described in training image sample set to training image total sample number amount, the xiIt indicates in the object set to be trained
I-th of object to be trained, the net (xi, θ) and indicate the second forecast image corresponding to i-th of object to be trained, institute
State yiDesired image corresponding to i-th of object to be trained.
Again, in the embodiment of the present application, a kind of method of model training is provided, first by handling mould to training image
Type obtains in object set to be trained the second forecast image corresponding to each object to be trained, then according to each to training pair
The desired image as corresponding to corresponding the second forecast image and each object to be trained is determined using target loss function
Network model parameter, then treat training image processing model with the conjunction of network model parameter and be trained, obtain image processing model.
By the above-mentioned means, concrete implementation foundation on the one hand is provided for the training of model, thus the reliability of lift scheme training, separately
On the one hand, the network structure for being not necessarily to treat training image processing model based on above-mentioned training method is modified, keeping characteristics
The up-sampling module of extraction module and increase based on meta learning, can be realized the more amplification factors of single model, thus lift scheme
Trained compatibility.
Figure 12 is the structural schematic diagram of the embodiment of the present application network equipment 70.The network equipment 70 may include input equipment 710,
Output equipment 720, processor 730 and memory 740.Output equipment in the embodiment of the present application can be display equipment.
Memory 740 may include read-only memory and random access memory, and provide instruction sum number to processor 730
According to.The a part of of memory 740 can also include nonvolatile RAM (Non-Volatile Random
Access Memory, NVRAM).
Memory 740 stores following element, executable modules or data structures perhaps their subset or
Their superset:
Operational order: including various operational orders, for realizing various operations.
Operating system: including various system programs, for realizing various basic businesses and the hardware based task of processing.
Processor 730 is used in the embodiment of the present application:
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Obtain scaling multiple information corresponding to the image to be processed, wherein the scaling multiple information is used to indicate
The multiple of processing is amplified to the image to be processed, or reduce to the image to be processed the multiple of processing;
Cascade number is determined according to the scaling multiple information, wherein the cascade number is whole more than or equal to 1
Number, the cascade number indicate to carry out number of processing to the image to be processed using identical image processing model;
According to the cascade number, model is handled by described image and obtains target figure corresponding to the image to be processed
Picture, wherein the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and
Second multiplying power is different from first multiplying power.
Processor 730 controls the operation of the network equipment 70, and processor 730 can also be known as central processing unit (Central
Processing Unit, CPU).Memory 740 may include read-only memory and random access memory, and to processor
730 provide instruction and data.The a part of of memory 740 can also include NVRAM.In specific application, the network equipment 70
Various components are coupled by bus system 750, and wherein bus system 750 can also wrap in addition to including data/address bus
Include power bus, control bus and status signal bus in addition etc..But for the sake of clear explanation, various buses are all marked in figure
For bus system 750.
The method that above-mentioned the embodiment of the present application discloses can be applied in processor 730, or be realized by processor 730.
Processor 730 may be a kind of IC chip, the processing capacity with signal.During realization, the above method it is each
Step can be completed by the integrated logic circuit of the hardware in processor 730 or the instruction of software form.Above-mentioned processing
Device 730 can be general processor, digital signal processor (Digital Signal Processing, DSP), dedicated integrated
Circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present application.It is general
Processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with the embodiment of the present application institute
The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor
And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only
In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.The storage medium is located at
The step of memory 740, processor 730 reads the information in memory 740, completes the above method in conjunction with its hardware.
The associated description of Figure 12 can be understood that this place was not done refering to the associated description and effect of Fig. 3 method part
It repeats more.
The embodiment of the present application also provides another image demonstration apparatus, as shown in figure 13, for ease of description, only show
Part relevant to the embodiment of the present application, it is disclosed by specific technical details, please refer to the embodiment of the present application method part.It should
Terminal device can be include mobile phone, tablet computer, personal digital assistant (personal digital assistant, PDA),
Any terminal devices such as point-of-sale terminal equipment (point of sales, POS), vehicle-mounted computer, by taking terminal device is mobile phone as an example:
Figure 13 shows the block diagram of the part-structure of mobile phone relevant to terminal device provided by the embodiments of the present application.Ginseng
Figure 13 is examined, mobile phone includes: radio frequency (radio frequency, RF) circuit 810, memory 820, input unit 830, display list
First 840, sensor 850, voicefrequency circuit 860, Wireless Fidelity (wireless fidelity, WiFi) module 870, processor
The components such as 880 and power supply 890.It will be understood by those skilled in the art that handset structure shown in Figure 13 does not constitute opponent
The restriction of machine may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
It is specifically introduced below with reference to each component parts of the Figure 13 to mobile phone:
RF circuit 810 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station
After downlink information receives, handled to processor 880;In addition, the data for designing uplink are sent to base station.In general, RF circuit 810
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (low noise
Amplifier, LNA), duplexer etc..In addition, RF circuit 810 can also be communicated with network and other equipment by wireless communication.
Any communication standard or agreement, including but not limited to global system for mobile communications (global can be used in above-mentioned wireless communication
System of mobile communication, GSM), general packet radio service (general packet radio
Service, GPRS), CDMA (code division multiple access, CDMA), wideband code division multiple access
(wideband code division multiple access, WCDMA), long term evolution (long term evolution,
LTE), Email, short message service (short messaging service, SMS) etc..
Memory 820 can be used for storing software program and module, and processor 880 is stored in memory 820 by operation
Software program and module, thereby executing the various function application and data processing of mobile phone.Memory 820 can mainly include
Storing program area and storage data area, wherein storing program area can application journey needed for storage program area, at least one function
Sequence (such as sound-playing function, image player function etc.) etc.;Storage data area can be stored to be created according to using for mobile phone
Data (such as audio data, phone directory etc.) etc..It, can be in addition, memory 820 may include high-speed random access memory
Including nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-states
Part.
Input unit 830 can be used for receiving the number or character information of input, and generate with the user setting of mobile phone with
And the related key signals input of function control.Specifically, input unit 830 may include that touch panel 831 and other inputs are set
Standby 832.Touch panel 831, also referred to as touch screen, collect user on it or nearby touch operation (such as user use
The operation of any suitable object or attachment such as finger, stylus on touch panel 831 or near touch panel 831), and root
Corresponding attachment device is driven according to preset formula.Optionally, touch panel 831 may include touch detecting apparatus and touch
Two parts of controller.Wherein, the touch orientation of touch detecting apparatus detection user, and touch operation bring signal is detected,
Transmit a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into touching
Point coordinate, then gives processor 880, and can receive order that processor 880 is sent and be executed.Furthermore, it is possible to using electricity
The multiple types such as resistive, condenser type, infrared ray and surface acoustic wave realize touch panel 831.In addition to touch panel 831, input
Unit 830 can also include other input equipments 832.Specifically, other input equipments 832 can include but is not limited to secondary or physical bond
One of disk, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. are a variety of.
Display unit 840 can be used for showing information input by user or be supplied to user information and mobile phone it is various
Menu.Display unit 840 may include display panel 841, optionally, can use liquid crystal display (liquid crystal
Display, LCD), the forms such as Organic Light Emitting Diode (organic light-emitting diode, OLED) it is aobvious to configure
Show panel 841.Further, touch panel 831 can cover display panel 841, when touch panel 831 detect it is on it or attached
After close touch operation, processor 880 is sent to determine the type of touch event, is followed by subsequent processing device 880 according to touch event
Type corresponding visual output is provided on display panel 841.Although in Figure 13, touch panel 831 and display panel 841
It is that the input and input function of mobile phone are realized as two independent components, but in some embodiments it is possible to by touch-control
Panel 831 and display panel 841 are integrated and that realizes mobile phone output and input function.
Mobile phone may also include at least one sensor 850, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light
Light and shade adjust the brightness of display panel 841, proximity sensor can close display panel 841 when mobile phone is moved in one's ear
And/or backlight.As a kind of motion sensor, accelerometer sensor can detect (generally three axis) acceleration in all directions
Size, can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture, (for example horizontal/vertical screen is cut
Change, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;May be used also as mobile phone
The other sensors such as gyroscope, barometer, hygrometer, thermometer, the infrared sensor of configuration, details are not described herein.
Voicefrequency circuit 860, loudspeaker 861, microphone 862 can provide the audio interface between user and mobile phone.Audio-frequency electric
Electric signal after the audio data received conversion can be transferred to loudspeaker 861, be converted to sound by loudspeaker 861 by road 860
Signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 862, is turned after being received by voicefrequency circuit 860
It is changed to audio data, then by after the processing of audio data output processor 880, such as another mobile phone is sent to through RF circuit 810,
Or audio data is exported to memory 820 to be further processed.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics postal by WiFi module 870
Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Figure 13 is shown
WiFi module 870, but it is understood that, and it is not belonging to must be configured into for mobile phone, it can according to need do not changing completely
Become in the range of the essence of invention and omits.
Processor 880 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone, is led to
It crosses operation or executes the software program and/or module being stored in memory 820, and call and be stored in memory 820
Data execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.Optionally, processor 880 can wrap
Include one or more processing units;Optionally, processor 880 can integrate application processor and modem processor, wherein answer
With the main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication.
It is understood that above-mentioned modem processor can not also be integrated into processor 880.
Mobile phone further includes the power supply 890 (such as battery) powered to all parts, and optionally, power supply can pass through power supply pipe
Reason system and processor 880 are logically contiguous, to realize management charging, electric discharge and power managed by power-supply management system
Etc. functions.
Although being not shown, mobile phone can also include camera, bluetooth module etc., and details are not described herein.
In the embodiment of the present application, processor 880 included by the terminal device is also with the following functions:
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Receive image adjustment instruction, wherein described image regulating command carries image magnification parameter, described image amplification ginseng
Number is used to indicate the multiple that processing is amplified to the image to be processed;
In response to described image regulating command, cascade number is determined according to described image amplifying parameters, wherein the cascade
Number is the integer more than or equal to 1, and the cascade number is indicated using identical image processing model to the figure to be processed
As carrying out number of processing;
According to the cascade number, model is handled by described image and obtains target figure corresponding to the image to be processed
Picture, wherein the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and
Second multiplying power is greater than first multiplying power;
Show the target image.
Figure 14 is a kind of server architecture schematic diagram provided by the embodiments of the present application, which can be because of configuration or property
Energy is different and generates bigger difference, may include one or more central processing units (central processing
Units, CPU) 922 (for example, one or more processors) and memory 932, one or more storages apply journey
The storage medium 930 (such as one or more mass memory units) of sequence 942 or data 944.Wherein, 932 He of memory
Storage medium 930 can be of short duration storage or persistent storage.The program for being stored in storage medium 930 may include one or one
With upper module (diagram does not mark), each module may include to the series of instructions operation in server.Further, in
Central processor 922 can be set to communicate with storage medium 930, execute on server 900 a series of in storage medium 930
Instruction operation.
Server 900 can also include one or more power supplys 926, one or more wired or wireless networks
Interface 950, one or more input/output interfaces 958, and/or, one or more operating systems 941, such as
Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
The step as performed by server can be based on server architecture shown in the Figure 14 in above-described embodiment.
In the embodiment of the present application, CPU 922 included by the server is also with the following functions:
It obtains to training image sample set, wherein described to belong to training image sample set to training image data
Set, described to training image sample set includes that at least one waits for training image sample, each includes to training image sample
First image, the second image and third image, the first image and second image have default sampling multiplying power, and described
Second image and the third image have the default sampling multiplying power;
Generate random number, wherein the random number is greater than or equal to 0, and is less than or equal to 1;
According to the random number and ratio value, from described to determine object set to be trained in training image sample set
It closes, wherein the object set to be trained includes at least one object to be trained, and each object to be trained includes second figure
Picture and the third image, alternatively, the object each to be trained includes the first forecast image and the third image, institute
Stating the first forecast image is the first image by obtaining after handling model to training image;
It is trained to described to training image processing model using the object set to be trained, obtains image procossing mould
Type.
Optionally, CPU 922 is specifically used for executing following steps:
Judge whether the random number is greater than the ratio value;
If the random number is greater than the ratio value, from it is described to obtained in training image sample set it is described to
The first image corresponding to training image sample and third image;
First forecast image corresponding to model acquisition the first image is handled to training image by described;
According to first forecast image and the third image generate in object set train to trained pair
As.
Optionally, CPU 922 is specifically used for executing following steps:
Judge whether the random number is greater than the ratio value;
If the random number is less than or equal to the ratio value, from described to obtain in training image sample set
It is described to second image and third image corresponding to training image sample;
The object to be trained in the object set to be trained is generated according to second image and the third image.
Optionally, CPU 922 is specifically used for executing following steps:
It obtains first to training image sample, wherein described first to training image sample includes the first image, institute
State the second image and the third image;
It obtains second to training image sample, wherein described second to training image sample includes the 4th image, described the
One image and second image, the 4th image and the first image have default sampling multiplying power;
It obtains third and waits for training image sample, wherein the third waits for that training image sample includes the 5th image, described the
Four images and the first image, the 5th image and the 4th image have default sampling multiplying power;
According to described first to training image sample, described second to training image sample and third figure to be trained
It decent, generates to training image sample.
Optionally, CPU 922 is also used to execute following steps:
Obtain deviant and slope value;
It obtains described to the number of iterations corresponding to training image sample set;
According to the deviant, the slope value and described to the number of iterations corresponding to training image sample set,
It determines described to the ratio value corresponding to training image sample set.
Optionally, CPU 922 is specifically used for executing following steps:
By described to which each object institute to be trained is right in the training image processing model acquisition object set to be trained
The second forecast image answered;
It is right according to the second forecast image corresponding to the object each to be trained and the object institute each to be trained
The desired image answered determines network model parameter using target loss function;
It is closed using the network model parameter and is trained to described to training image processing model, obtained at described image
Manage model;
The network model parameter is determined in the following way:
Wherein, the L (θ) indicates that the target loss function, the θ indicate the network model parameter, and the n is indicated
It is described in training image sample set to training image total sample number amount, the xiIt indicates in the object set to be trained
I-th of object to be trained, the net (xi, θ) and indicate the second forecast image corresponding to i-th of object to be trained, institute
State yiDesired image corresponding to i-th of object to be trained.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (read-only memory,
ROM), random access memory (random access memory, RAM), magnetic or disk etc. are various can store program
The medium of code.
The above, above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although referring to before
Embodiment is stated the application is described in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.
Claims (15)
1. a kind of image processing method characterized by comprising
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Obtain scaling multiple information corresponding to the image to be processed, wherein the scaling multiple information is used to indicate to institute
The multiple that image to be processed amplifies processing is stated, or reduce to the image to be processed the multiple of processing;
Cascade number is determined according to the scaling multiple information, wherein the cascade number is the integer more than or equal to 1, institute
Stating cascade number indicates to carry out number of processing to the image to be processed using identical image processing model;
According to the cascade number, model is handled by described image and obtains target image corresponding to the image to be processed,
Wherein, the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and described
Second multiplying power is different from first multiplying power.
2. a kind of image presentation method characterized by comprising
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Receive image adjustment instruction, wherein described image regulating command carries image magnification parameter, and described image amplifying parameters are used
The multiple of processing is amplified to the image to be processed in instruction;
In response to described image regulating command, cascade number is determined according to described image amplifying parameters, wherein the cascade number
For the integer more than or equal to 1, the cascade number indicate using identical image processing model to the image to be processed into
Row number of processing;
According to the cascade number, model is handled by described image and obtains target image corresponding to the image to be processed,
Wherein, the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and described
Second multiplying power is greater than first multiplying power;
Show the target image.
3. a kind of model training method characterized by comprising
It obtains to training image sample set, wherein it is described to belong to training image sample set to training image data acquisition system,
Described to training image sample set includes that at least one waits for training image sample, includes each the first figure to training image sample
Picture, the second image and third image, the first image and second image have default sampling multiplying power, and second figure
As there is the default sampling multiplying power with the third image;
Generate random number, wherein the random number is greater than or equal to 0, and is less than or equal to 1;
According to the random number and ratio value, from described to determine object set to be trained in training image sample set,
Wherein, the object set to be trained includes at least one object to be trained, and each object to be trained includes second image
And the third image, alternatively, the object each to be trained includes the first forecast image and the third image, it is described
First forecast image is the first image by obtaining after handling model to training image;
It is trained to described to training image processing model using the object set to be trained, obtains image processing model.
4. model training method according to claim 3, which is characterized in that described according to the random number and ratio number
Value, from described to determine object set to be trained in training image sample set, comprising:
Judge whether the random number is greater than the ratio value;
If the random number is greater than the ratio value, from described described wait train to be obtained in training image sample set
The first image corresponding to image pattern and third image;
First forecast image corresponding to model acquisition the first image is handled to training image by described;
The object to be trained in the object set to be trained is generated according to first forecast image and the third image.
5. model training method according to claim 3, which is characterized in that described according to the random number and ratio number
Value, from described to determine object set to be trained in training image sample set, comprising:
Judge whether the random number is greater than the ratio value;
If the random number is less than or equal to the ratio value, from described to described in acquisition in training image sample set
To second image and third image corresponding to training image sample;
The object to be trained in the object set to be trained is generated according to second image and the third image.
6. model training method according to claim 3, which is characterized in that it is described to obtain to training image sample set,
Include:
It obtains first to training image sample, wherein described first to training image sample includes the first image, described the
Two images and the third image;
Second is obtained to training image sample, wherein described second includes the 4th image, first figure to training image sample
Picture and second image, the 4th image and the first image have default sampling multiplying power;
It obtains third and waits for training image sample, wherein the third waits for that training image sample includes the 5th image, the 4th figure
Picture and the first image, the 5th image and the 4th image have default sampling multiplying power;
Training image sample is waited for training image sample and the third to training image sample, described second according to described first
This, generates to training image sample.
7. model training method according to claim 3, which is characterized in that described according to the random number and ratio number
Value, from described to before determining object set to be trained in training image sample set, the method also includes:
Obtain deviant and slope value;
It obtains described to the number of iterations corresponding to training image sample set;
According to the deviant, the slope value and described to the number of iterations corresponding to training image sample set, determine
It is described to the ratio value corresponding to training image sample set.
8. the model training method according to any one of claim 3 to 7, which is characterized in that the use is described wait instruct
Practice object set to be trained to described to training image processing model, obtain image processing model, comprising:
By described model is handled to training image obtain in the object set to be trained corresponding to each object to be trained
Second forecast image;
According to corresponding to the second forecast image corresponding to the object each to be trained and the object each to be trained
Desired image determines network model parameter using target loss function;
It is closed using the network model parameter and is trained to described to training image processing model, obtain described image processing mould
Type;
Second forecast image according to corresponding to the object each to be trained and the object institute each to be trained are right
The desired image answered determines network model parameter using target loss function, comprising:
The network model parameter is determined in the following way:
Wherein, the L (θ) indicates the target loss function, and the θ indicates the network model parameter, described in the n expression
To in training image sample set to training image total sample number amount, the xiIndicate the in the object set to be trained
I objects to be trained, the net (xi, θ) and indicate the second forecast image corresponding to i-th of object to be trained, the yi
Desired image corresponding to i-th of object to be trained.
9. a kind of image processing apparatus characterized by comprising
Module is obtained, for obtaining image to be processed, wherein the image to be processed corresponds to the first multiplying power;
The acquisition module is also used to obtain scaling multiple information corresponding to the image to be processed, wherein the scaling times
Number information is used to indicate the multiple that processing is amplified to the image to be processed, or reduces to the image to be processed
The multiple of processing;
Determining module, the scaling multiple information for being obtained according to the acquisition module determine cascade number, wherein described
Cascading number is the integer more than or equal to 1, and the cascade number is indicated using identical image processing model to described wait locate
It manages image and carries out number of processing;
The acquisition module is also used to the cascade number determined according to the determining module, handles mould by described image
Type obtains target image corresponding to the image to be processed, wherein the target image correspond to the second multiplying power, described second
Multiplying power and the cascade number have incidence relation, and second multiplying power is different from first multiplying power.
10. a kind of image demonstration apparatus characterized by comprising
Module is obtained, for obtaining image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Receiving module, for receiving image adjustment instruction, wherein described image regulating command carries image magnification parameter, described
Image magnification parameter is used to indicate the multiple that processing is amplified to the image to be processed;
Determining module, for being amplified according to described image and being joined in response to the received described image regulating command of the receiving module
Number determines cascade number, wherein the cascade number is the integer more than or equal to 1, and the cascade number is indicated using identical
Image processing model number of processing is carried out to the image to be processed;
The acquisition module is also used to the cascade number determined according to the determining module, handles mould by described image
Type obtains target image corresponding to the image to be processed, wherein the target image correspond to the second multiplying power, described second
Multiplying power and the cascade number have incidence relation, and second multiplying power is greater than first multiplying power;
Display module, the target image obtained for showing the acquisition module.
11. a kind of image processing model training device characterized by comprising
Module is obtained, for obtaining to training image sample set, wherein described to belong to training image sample set wait train
Sets of image data, described to training image sample includes that at least one waits for training image sample, each to training image sample
Including the first image, the second image and third image, the first image and second image have default sampling multiplying power, and
Second image and the third image have the default sampling multiplying power;
Generation module, for generating random number, wherein the random number is greater than or equal to 0, and is less than or equal to 1;
Determining module, the random number and ratio value for being generated according to the generation module are schemed from described to training
As determining object set to be trained in sample set, wherein the object set to be trained includes at least one object to be trained,
Each object to be trained includes second image and the third image, alternatively, the object each to be trained includes the
One forecast image and the third image, first forecast image are the first image by handling mould to training image
It is obtained after type;
Training module, for object set to be trained described in use determining module determination to described to training image processing
Model is trained, and obtains image processing model.
12. a kind of network equipment characterized by comprising memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Obtain scaling multiple information corresponding to the image to be processed, wherein the scaling multiple information is used to indicate to institute
The multiple that image to be processed amplifies processing is stated, or reduce to the image to be processed the multiple of processing;
Cascade number is determined according to the scaling multiple information, wherein the cascade number is the integer more than or equal to 1, institute
Stating cascade number indicates to carry out number of processing to the image to be processed using identical image processing model;
According to the cascade number, model is handled by described image and obtains target image corresponding to the image to be processed,
Wherein, the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and described
Second multiplying power is different from first multiplying power;
The bus system is for connecting the memory and the processor, so that the memory and the processor
It is communicated.
13. a kind of terminal device characterized by comprising memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
Obtain image to be processed, wherein the image to be processed corresponds to the first multiplying power;
Receive image adjustment instruction, wherein described image regulating command carries image magnification parameter, and described image amplifying parameters are used
The multiple of processing is amplified to the image to be processed in instruction;
In response to described image regulating command, cascade number is determined according to described image amplifying parameters, wherein the cascade number
For the integer more than or equal to 1, the cascade number indicate using identical image processing model to the image to be processed into
Row number of processing;
According to the cascade number, model is handled by described image and obtains target image corresponding to the image to be processed,
Wherein, the target image corresponds to the second multiplying power, and second multiplying power and the cascade number have incidence relation, and described
Second multiplying power is greater than first multiplying power;
Show the target image;
The bus system is for connecting the memory and the processor, so that the memory and the processor
It is communicated.
14. a kind of server characterized by comprising memory, transceiver, processor and bus system;
Wherein, the memory is for storing program;
The processor is used to execute the program in the memory, includes the following steps:
It obtains to training image sample set, wherein it is described to belong to training image sample set to training image data acquisition system,
Described to training image sample includes that at least one waits for training image sample, each to training image sample include the first image,
Second image and third image, the first image and second image have default sampling multiplying power, and second image
There is the default sampling multiplying power with the third image;
Generate random number, wherein the random number is greater than or equal to 0, and is less than or equal to 1;
According to the random number and ratio value, from described to determine object set to be trained in training image sample set,
Wherein, the object set to be trained includes at least one object to be trained, and each object to be trained includes second image
And the third image, alternatively, the object each to be trained includes the first forecast image and the third image, it is described
First forecast image is the first image by obtaining after handling model to training image;
It is trained to described to training image processing model using the object set to be trained, obtains image processing model;
The bus system is for connecting the memory and the processor, so that the memory and the processor
It is communicated.
15. a kind of computer readable storage medium, including instruction, when run on a computer, so that computer executes such as
Method described in claim 1, or method according to claim 2 is executed, or execute such as any one of claim 3 to 8
The method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910667659.5A CN110363709A (en) | 2019-07-23 | 2019-07-23 | A kind of image processing method, image presentation method, model training method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910667659.5A CN110363709A (en) | 2019-07-23 | 2019-07-23 | A kind of image processing method, image presentation method, model training method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110363709A true CN110363709A (en) | 2019-10-22 |
Family
ID=68219928
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910667659.5A Pending CN110363709A (en) | 2019-07-23 | 2019-07-23 | A kind of image processing method, image presentation method, model training method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110363709A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110446071A (en) * | 2019-08-13 | 2019-11-12 | 腾讯科技(深圳)有限公司 | Multi-media processing method, device, equipment and medium neural network based |
CN111654627A (en) * | 2020-06-09 | 2020-09-11 | 展讯通信(上海)有限公司 | Digital zooming method, device, equipment and storage medium |
CN112927136A (en) * | 2021-03-05 | 2021-06-08 | 江苏实达迪美数据处理有限公司 | Image reduction method and system based on convolutional neural network domain adaptation |
CN116703718A (en) * | 2022-09-08 | 2023-09-05 | 荣耀终端有限公司 | Image amplification method and electronic equipment |
-
2019
- 2019-07-23 CN CN201910667659.5A patent/CN110363709A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110446071A (en) * | 2019-08-13 | 2019-11-12 | 腾讯科技(深圳)有限公司 | Multi-media processing method, device, equipment and medium neural network based |
CN111654627A (en) * | 2020-06-09 | 2020-09-11 | 展讯通信(上海)有限公司 | Digital zooming method, device, equipment and storage medium |
CN111654627B (en) * | 2020-06-09 | 2021-11-26 | 展讯通信(上海)有限公司 | Digital zooming method, device, equipment and storage medium |
CN112927136A (en) * | 2021-03-05 | 2021-06-08 | 江苏实达迪美数据处理有限公司 | Image reduction method and system based on convolutional neural network domain adaptation |
CN116703718A (en) * | 2022-09-08 | 2023-09-05 | 荣耀终端有限公司 | Image amplification method and electronic equipment |
CN116703718B (en) * | 2022-09-08 | 2024-03-22 | 荣耀终端有限公司 | Image amplification method and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110363709A (en) | A kind of image processing method, image presentation method, model training method and device | |
CN106156807B (en) | Training method and device of convolutional neural network model | |
CN110232696A (en) | A kind of method of image region segmentation, the method and device of model training | |
CN110162799A (en) | Model training method, machine translation method and relevant apparatus and equipment | |
CN103905885B (en) | Net cast method and device | |
CN107734179A (en) | A kind of message prompt method, mobile terminal | |
CN108551519B (en) | Information processing method, device, storage medium and system | |
CN110472145A (en) | A kind of content recommendation method and electronic equipment | |
CN106780684B (en) | Animation effect realization method and device | |
CN108090855A (en) | Method and mobile terminal are recommended in a kind of study plan | |
CN108846274A (en) | A kind of safe verification method, device and terminal | |
CN107193518A (en) | The method and terminal device of a kind of presentation of information | |
CN107464290A (en) | Three-dimensional information methods of exhibiting, device and mobile terminal | |
CN112184548A (en) | Image super-resolution method, device, equipment and storage medium | |
CN108920119A (en) | A kind of sharing method and mobile terminal | |
CN107943390A (en) | A kind of word clone method and mobile terminal | |
CN107749919A (en) | A kind of application program page display method and equipment | |
CN107886321A (en) | A kind of method of payment and mobile terminal | |
CN109947650A (en) | Script step process methods, devices and systems | |
CN104156406A (en) | Method and device for displaying embedded pages of application programs | |
CN107436712A (en) | To breathe out the method, apparatus and terminal of menu setting skin | |
CN107730460A (en) | A kind of image processing method and mobile terminal | |
CN109300099A (en) | A kind of image processing method, mobile terminal and computer readable storage medium | |
CN107734281A (en) | A kind of image magnification method and mobile terminal | |
CN108009031A (en) | The control method and mobile terminal of a kind of application program |
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 |